### Question:
DmaapPropertiesClient { public void dmaapPublishRequest(String requestId, String clientSource, String correlator, String serviceInstanceId, String startTime, String finishTime, String requestScope, String requestType, String timestamp, String requestState, String statusMessage, String percentProgress, Boolean wasRolledBack) throws MapperException, JsonProcessingException { AVPNDmaapBean bean = this.buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope, requestType, timestamp, requestState, statusMessage, percentProgress, wasRolledBack); String request = jsonToString(bean); dmaapPublisher.get().send(request); }  void dmaapPublishRequest(String requestId, String clientSource, String correlator, String serviceInstanceId,
            String startTime, String finishTime, String requestScope, String requestType, String timestamp,
            String requestState, String statusMessage, String percentProgress, Boolean wasRolledBack);  }### Answer:
@Test public void testDmaapPublishRequest() throws JsonProcessingException, MapperException { DmaapPropertiesClient client = Mockito.spy(DmaapPropertiesClient.class); GlobalDmaapPublisher mockedClientDmaapPublisher = Mockito.mock(GlobalDmaapPublisher.class); AVPNDmaapBean mockedDmaapBean = Mockito.mock(AVPNDmaapBean.class); String request = "test"; doReturn(mockedDmaapBean).when(client).buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope, requestType, timestamp, requestState, statusMessage, percentProgress, false); AVPNDmaapBean actualDmaapBean = client.buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope, requestType, timestamp, requestState, statusMessage, percentProgress, false); mockedClientDmaapPublisher.send(request); doNothing().when(mockedClientDmaapPublisher).send(anyString()); verify(client, times(1)).buildRequestJson(requestId, clientSource, correlator, serviceInstanceId, startTime, finishTime, requestScope, requestType, timestamp, requestState, statusMessage, percentProgress, false); verify(mockedClientDmaapPublisher, times(1)).send(request); assertNotNull(actualDmaapBean); }