### Question:
MinerSetEtherbase implements JsonRpcMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { return minerSetCoinbaseMethod.response(requestContext); } MinerSetEtherbase(final MinerSetCoinbase minerSetCoinbaseMethod); @Override String getName(); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext);  }### Answer:
@Test public void shouldDelegateToMinerSetCoinbase() { final JsonRpcRequestContext request = new JsonRpcRequestContext( new JsonRpcRequest(null, "miner_setEtherbase", new Object[] {"0x0"})); final ArgumentCaptor<JsonRpcRequestContext> requestCaptor = ArgumentCaptor.forClass(JsonRpcRequestContext.class); when(minerSetCoinbase.response(requestCaptor.capture())) .thenReturn(new JsonRpcSuccessResponse(null, true)); method.response(request); final JsonRpcRequestContext delegatedRequest = requestCaptor.getValue(); assertThat(delegatedRequest).isEqualToComparingFieldByField(request); }