class SubscriptionRequestMapper {

  public PrivateUnsubscribeRequest mapPrivateUnsubscribeRequest(
      final JsonRpcRequestContext jsonRpcRequestContext)
      throws InvalidSubscriptionRequestException {
    try {
      final WebSocketRpcRequest webSocketRpcRequestBody = validateRequest(jsonRpcRequestContext);

      final String privacyGroupId = webSocketRpcRequestBody.getRequiredParameter(0, String.class);
      final long subscriptionId =
          webSocketRpcRequestBody.getRequiredParameter(1, UnsignedLongParameter.class).getValue();
      return new PrivateUnsubscribeRequest(
          subscriptionId, webSocketRpcRequestBody.getConnectionId(), privacyGroupId);
    } catch (final Exception e) {
      throw new InvalidSubscriptionRequestException("Error parsing unsubscribe request", e);
    }
  }

  public  SubscriptionRequestMapper();

}