deviceCommandService.findOne(id, guid)
.thenAccept(deviceCommand -> assertTrue(deviceCommand.isPresent()))
.get(2, TimeUnit.SECONDS);
verify(requestHandler, times(1)).handle(argument.capture());
}
<BUG>@Test
public void testInsertCommands() throws Exception {</BUG>
final int num = 10;
when(requestHandler.handle(any(Request.class))).then(invocation -> {
CommandInsertRequest insertRequest = invocation.getArgumentAt(0, Request.class)

deviceCommandService.findOne(id, guid)
.thenAccept(deviceCommand -> assertTrue(deviceCommand.isPresent()))
.get(2, TimeUnit.SECONDS);
verify(requestHandler, times(1)).handle(argument.capture());
}
@Test
@DirtiesContext(methodMode = DirtiesContext.MethodMode.BEFORE_METHOD)
public void testInsertCommands() throws Exception {
final int num = 10;
when(requestHandler.handle(any(Request.class))).then(invocation -> {
CommandInsertRequest insertRequest = invocation.getArgumentAt(0, Request.class)
