### Question:
IbftGetValidatorsByBlockHash implements JsonRpcMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { return new JsonRpcSuccessResponse( requestContext.getRequest().getId(), blockResult(requestContext)); } IbftGetValidatorsByBlockHash(
      final Blockchain blockchain, final BlockInterface blockInterface); @Override String getName(); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext);  }### Answer:
@Test public void shouldReturnListOfValidatorsFromBlock() { when(blockchain.getBlockHeader(Hash.ZERO)).thenReturn(Optional.of(blockHeader)); final List<Address> addresses = Collections.singletonList(Address.ID); final List<String> expectedOutput = Collections.singletonList(Address.ID.toString()); when(ibftBlockInterface.validatorsInBlock(blockHeader)).thenReturn(addresses); request = requestWithParams(ZERO_HASH); JsonRpcSuccessResponse response = (JsonRpcSuccessResponse) method.response(request); Assertions.assertThat(response.getResult()).isEqualTo(expectedOutput); }