Mockito.doReturn(new SubobjectContainerBuilder().build()).when(this.rroSubobjectParser).parseSubobject(this.input);
final ArgumentCaptor<SubobjectContainer> arg = ArgumentCaptor.forClass(SubobjectContainer.class);
final ArgumentCaptor<ByteBuf> bufArg = ArgumentCaptor.forClass(ByteBuf.class);
- Mockito.doAnswer(new Answer<Object>() {
- @Override
- public Object answer(final InvocationOnMock invocation) throws Throwable {
- final Object[] args = invocation.getArguments();
- ((ByteBuf) args[1]).writeBoolean(Boolean.TRUE);
- return null;
- }
+ Mockito.doAnswer(invocation -> {
+ final Object[] args = invocation.getArguments();
+ ((ByteBuf) args[1]).writeBoolean(Boolean.TRUE);
+ return null;
}).when(this.rroSubobjectSerializer).serializeSubobject(arg.capture(), bufArg.capture());
}