class EthSubscribe extends AbstractSubscriptionMethod {

  @Override
  public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
    try {
      final SubscribeRequest subscribeRequest = getMapper().mapSubscribeRequest(requestContext);
      final Long subscriptionId = subscriptionManager().subscribe(subscribeRequest);

      return new JsonRpcSuccessResponse(
          requestContext.getRequest().getId(), Quantity.create(subscriptionId));
    } catch (final InvalidSubscriptionRequestException isEx) {
      return new JsonRpcErrorResponse(
          requestContext.getRequest().getId(), JsonRpcError.INVALID_REQUEST);
    } catch (final Exception e) {
      return new JsonRpcErrorResponse(
          requestContext.getRequest().getId(), JsonRpcError.INTERNAL_ERROR);
    }
  }

    EthSubscribe(
      final SubscriptionManager subscriptionManager, final SubscriptionRequestMapper mapper);

}