* ONAP
* ================================================================================
* Copyright (C) 2018, 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.drools.pooling.state;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.when;
import org.apache.commons.lang3.tuple.Pair;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.drools.pooling.message.BucketAssignments;
import org.onap.policy.drools.pooling.message.Identification;
import org.onap.policy.drools.pooling.message.Leader;
import org.onap.policy.drools.pooling.message.Query;
-public class InactiveStateTest extends SupportBasicStateTester {
+class InactiveStateTest extends SupportBasicStateTester {
private InactiveState state;
*
*/
@Override
- @Before
+ @BeforeEach
public void setUp() throws Exception {
super.setUp();
}
@Test
- public void testProcessLeader() {
+ void testProcessLeader() {
State next = mock(State.class);
when(mgr.goActive()).thenReturn(next);
}
@Test
- public void testProcessLeader_Invalid() {
+ void testProcessLeader_Invalid() {
Leader msg = new Leader(PREV_HOST, null);
// should stay in the same state, and not start distributing
}
@Test
- public void testProcessQuery() {
+ void testProcessQuery() {
State next = mock(State.class);
when(mgr.goQuery()).thenReturn(next);
}
@Test
- public void testGoInatcive() {
+ void testGoInatcive() {
assertNull(state.goInactive());
}
@Test
- public void testStart() {
+ void testStart() {
state.start();
Pair<Long, StateTimerTask> timer = onceTasks.remove();
}
@Test
- public void testInactiveState() {
+ void testInactiveState() {
/*
* Prove the state is attached to the manager by invoking getHost(), which
* delegates to the manager.