- Mockito.doAnswer(new Answer<Void>() {
- @Override
- public Void answer(InvocationOnMock invocation) throws Throwable {
- TableFeaturesBuilder tableFeaturesBld = new TableFeaturesBuilder()
- .setTableId((short) 0)
- .setName("Zafod")
- .setMaxEntries(42L)
- .setTableFeatureProperties(Collections.<TableFeatureProperties>emptyList());
- MultipartReplyTableFeaturesBuilder mpTableFeaturesBld = new MultipartReplyTableFeaturesBuilder()
- .setTableFeatures(Collections.singletonList(tableFeaturesBld.build()));
- MultipartReplyTableFeaturesCaseBuilder mpBodyBld = new MultipartReplyTableFeaturesCaseBuilder()
- .setMultipartReplyTableFeatures(mpTableFeaturesBld.build());
- MultipartReplyMessageBuilder mpResultBld = new MultipartReplyMessageBuilder()
- .setType(MultipartType.OFPMPTABLEFEATURES)
- .setMultipartReplyBody(mpBodyBld.build())
- .setXid(21L);
- final RpcResult<List<MultipartReply>> rpcResult = RpcResultBuilder
- .success(Collections.singletonList((MultipartReply) mpResultBld.build()))
- .build();
- handleResultFuture.set(rpcResult);
- return null;
- }
+ Mockito.doAnswer((Answer<Void>) invocation -> {
+ TableFeaturesBuilder tableFeaturesBld = new TableFeaturesBuilder()
+ .setTableId((short) 0)
+ .setName("Zafod")
+ .setMaxEntries(42L)
+ .setTableFeatureProperties(Collections.<TableFeatureProperties>emptyList());
+ MultipartReplyTableFeaturesBuilder mpTableFeaturesBld = new MultipartReplyTableFeaturesBuilder()
+ .setTableFeatures(Collections.singletonList(tableFeaturesBld.build()));
+ MultipartReplyTableFeaturesCaseBuilder mpBodyBld = new MultipartReplyTableFeaturesCaseBuilder()
+ .setMultipartReplyTableFeatures(mpTableFeaturesBld.build());
+ MultipartReplyMessageBuilder mpResultBld = new MultipartReplyMessageBuilder()
+ .setType(MultipartType.OFPMPTABLEFEATURES)
+ .setMultipartReplyBody(mpBodyBld.build())
+ .setXid(21L);
+ final RpcResult<List<MultipartReply>> rpcResult = RpcResultBuilder
+ .success(Collections.singletonList((MultipartReply) mpResultBld.build()))
+ .build();
+ handleResultFuture.set(rpcResult);
+ return null;