### Question:
EthProtocolVersion implements JsonRpcMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { return new JsonRpcSuccessResponse( requestContext.getRequest().getId(), highestEthVersion == null ? null : Quantity.create(highestEthVersion)); } EthProtocolVersion(final Set<Capability> supportedCapabilities); @Override String getName(); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext);  }### Answer:
@Test public void shouldReturn63WhenMaxProtocolIsETH63() { setupSupportedEthProtocols(); final JsonRpcRequestContext request = requestWithParams(); final JsonRpcResponse expectedResponse = new JsonRpcSuccessResponse(request.getRequest().getId(), "0x3f"); final JsonRpcResponse actualResponse = method.response(request); assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse); }
@Test public void shouldReturnNullNoEthProtocolsSupported() { supportedCapabilities = new HashSet<>(); supportedCapabilities.add(Capability.create("istanbul", 64)); method = new EthProtocolVersion(supportedCapabilities); final JsonRpcRequestContext request = requestWithParams(); final JsonRpcResponse expectedResponse = new JsonRpcSuccessResponse(request.getRequest().getId(), null); final JsonRpcResponse actualResponse = method.response(request); assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse); }
@Test public void shouldReturn63WhenMixedProtocolsSupported() { setupSupportedEthProtocols(); supportedCapabilities.add(Capability.create("istanbul", 64)); method = new EthProtocolVersion(supportedCapabilities); final JsonRpcRequestContext request = requestWithParams(); final JsonRpcResponse expectedResponse = new JsonRpcSuccessResponse(request.getRequest().getId(), "0x3f"); final JsonRpcResponse actualResponse = method.response(request); assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse); }