}
@Test
- public void testRequest_InvalidArgs() {
+ void testRequest_InvalidArgs() {
// null params
assertThatThrownBy(() -> new MyRequest(null, MY_REQ_NAME, msg)).isInstanceOf(NullPointerException.class);
}
@Test
- public void testReconfigure2_WrongMsgClass() {
+ void testReconfigure2_WrongMsgClass() {
assertThatIllegalArgumentException().isThrownBy(() -> req.reconfigure(new PdpUpdate()))
.withMessage("expecting PdpStateChange instead of PdpUpdate");
}
@Test
- public void testReconfigure2_NotPublishing() {
+ void testReconfigure2_NotPublishing() {
// replace the message with a new message
req.reconfigure(new PdpStateChange());
}
@Test
- public void testRequestImpl_testReconfigure2_Publishing() {
+ void testRequestImpl_testReconfigure2_Publishing() {
req.startPublishing();
// replace the message with a new message
}
@Test
- public void testIsPublishing() {
+ void testIsPublishing() {
assertFalse(req.isPublishing());
req.startPublishing();
}
@Test
- public void testStartPublishingQueueToken_NoListener() {
+ void testStartPublishingQueueToken_NoListener() {
req.setListener(null);
assertThatIllegalStateException().isThrownBy(() -> req.startPublishing())
.withMessage("listener has not been set");
}
@Test
- public void testStartPublishing() {
+ void testStartPublishing() {
req.startPublishing();
assertTrue(req.isPublishing());
}
@Test
- public void testStopPublishing() {
+ void testStopPublishing() {
// not publishing yet
req.stopPublishing();
assertFalse(req.isPublishing());
}
@Test
- public void testStopPublishingBoolean_NotPublishing() {
+ void testStopPublishingBoolean_NotPublishing() {
// should not throw an exception
Assertions.assertThatCode(() -> req.stopPublishing()).doesNotThrowAnyException();
}
@Test
- public void testStopPublishingBoolean_TruePublishing() {
+ void testStopPublishingBoolean_TruePublishing() {
req.startPublishing();
req.stopPublishing();
}
@Test
- public void testEnqueue() {
+ void testEnqueue() {
req.startPublishing();
// replace the message with a new message
}
@Test
- public void testResetRetryCount_testBumpRetryCount() {
+ void testResetRetryCount_testBumpRetryCount() {
req = new MyRequest(new RequestParams().setMaxRetryCount(2).setModifyLock(lock).setPdpPublisher(publisher)
.setResponseDispatcher(dispatcher).setTimers(timers), MY_REQ_NAME, msg);
req.setListener(listener);
}
@Test
- public void testProcessResponse() {
+ void testProcessResponse() {
req.startPublishing();
invokeProcessResponse(response);
}
@Test
- public void testProcessResponse_NotPublishing() {
+ void testProcessResponse_NotPublishing() {
// force registration with the dispatcher - needed by invokeProcessResponse(response)
req.startPublishing();
req.stopPublishing();
}
@Test
- public void testProcessResponse_WrongRequest() {
+ void testProcessResponse_WrongRequest() {
req.startPublishing();
response.getResponse().setResponseTo(DIFFERENT);
}
@Test
- public void testProcessResponse_ResponseFailed() {
+ void testProcessResponse_ResponseFailed() {
req.startPublishing();
response.setName(DIFFERENT);
}
@Test
- public void testHandleTimeout() {
+ void testHandleTimeout() {
req.startPublishing();
// remove it from the queue
}
@Test
- public void testHandleTimeout_NotPublishing() {
+ void testHandleTimeout_NotPublishing() {
req.startPublishing();
req.stopPublishing();
}
@Test
- public void testHandleTimeout_RetryExhausted() {
+ void testHandleTimeout_RetryExhausted() {
req.startPublishing();
// exhaust the count
}
@Test
- public void testCheckResponse_Matched() {
+ void testCheckResponse_Matched() {
req.startPublishing();
invokeProcessResponse(response);
}
@Test
- public void testCheckResponse_NullName() {
+ void testCheckResponse_NullName() {
req.startPublishing();
response.setName(null);
}
@Test
- public void testCheckResponse_MismatchedName() {
+ void testCheckResponse_MismatchedName() {
req.startPublishing();
response.setName(DIFFERENT);
}
@Test
- public void testCheckResponse_MismatchedNameWithBroadcast() {
+ void testCheckResponse_MismatchedNameWithBroadcast() {
msg.setName(null);
req.startPublishing();
}
@Test
- public void testGetName() {
+ void testGetName() {
assertEquals(MY_REQ_NAME, req.getName());
}
@Test
- public void testGetMessage() {
+ void testGetMessage() {
assertSame(msg, req.getMessage());
PdpStateChange msg2 = new PdpStateChange();
}
@Test
- public void testGetParams() {
+ void testGetParams() {
assertSame(reqParams, req.getParams());
}
@Test
- public void testGetUndeployPolicies() {
+ void testGetUndeployPolicies() {
assertTrue(req.getUndeployPolicies().isEmpty());
}