@Test public void shouldConvert() { RequestMap expectedMap = new RequestMap(); expectedMap.putMap(new HashMap<String, String>() {{ put("extraAmount", "10.00"); put("paymentMode", "paymentMode"); put("currency", "BRL"); put("notificationURL", "notificationURL"); put("reference", "reference"); }}); RequestMap map = mapConverter.convert(transactionRegistration); assertEquals(expectedMap, map); }
@Override protected void convert(RequestMap requestMap, TransactionRegistration transactionRegistration) { requestMap.putString("paymentMode", transactionRegistration.getPaymentMode()); requestMap.putCurrency("currency", transactionRegistration.getCurrency()); requestMap.putMap(PAYMENT_ITEMS_MC.convert(transactionRegistration.getItems())); requestMap.putString("notificationURL", transactionRegistration.getNotificationURL()); requestMap.putString("reference", transactionRegistration.getReference()); requestMap.putMap(SENDER_MC.convert(transactionRegistration.getSender())); requestMap.putMap(SHIPPING_MC.convert(transactionRegistration.getShipping())); requestMap.putMap(PARAMETER_MC.convert(transactionRegistration.getParameters())); requestMap.putCurrency("extraAmount", transactionRegistration.getExtraAmount()); }
TransactionRegistrationV2MapConverter extends
    AbstractMapConverter<TransactionRegistration> { @Override protected void convert(RequestMap requestMap, TransactionRegistration transactionRegistration) { requestMap.putString("paymentMode", transactionRegistration.getPaymentMode()); requestMap.putCurrency("currency", transactionRegistration.getCurrency()); requestMap.putMap(PAYMENT_ITEMS_MC.convert(transactionRegistration.getItems())); requestMap.putString("notificationURL", transactionRegistration.getNotificationURL()); requestMap.putString("reference", transactionRegistration.getReference()); requestMap.putMap(SENDER_MC.convert(transactionRegistration.getSender())); requestMap.putMap(SHIPPING_MC.convert(transactionRegistration.getShipping())); requestMap.putMap(PARAMETER_MC.convert(transactionRegistration.getParameters())); requestMap.putCurrency("extraAmount", transactionRegistration.getExtraAmount()); } }
TransactionRegistrationV2MapConverter extends
    AbstractMapConverter<TransactionRegistration> { @Override protected void convert(RequestMap requestMap, TransactionRegistration transactionRegistration) { requestMap.putString("paymentMode", transactionRegistration.getPaymentMode()); requestMap.putCurrency("currency", transactionRegistration.getCurrency()); requestMap.putMap(PAYMENT_ITEMS_MC.convert(transactionRegistration.getItems())); requestMap.putString("notificationURL", transactionRegistration.getNotificationURL()); requestMap.putString("reference", transactionRegistration.getReference()); requestMap.putMap(SENDER_MC.convert(transactionRegistration.getSender())); requestMap.putMap(SHIPPING_MC.convert(transactionRegistration.getShipping())); requestMap.putMap(PARAMETER_MC.convert(transactionRegistration.getParameters())); requestMap.putCurrency("extraAmount", transactionRegistration.getExtraAmount()); } TransactionRegistrationV2MapConverter(); }
TransactionRegistrationV2MapConverter extends
    AbstractMapConverter<TransactionRegistration> { @Override protected void convert(RequestMap requestMap, TransactionRegistration transactionRegistration) { requestMap.putString("paymentMode", transactionRegistration.getPaymentMode()); requestMap.putCurrency("currency", transactionRegistration.getCurrency()); requestMap.putMap(PAYMENT_ITEMS_MC.convert(transactionRegistration.getItems())); requestMap.putString("notificationURL", transactionRegistration.getNotificationURL()); requestMap.putString("reference", transactionRegistration.getReference()); requestMap.putMap(SENDER_MC.convert(transactionRegistration.getSender())); requestMap.putMap(SHIPPING_MC.convert(transactionRegistration.getShipping())); requestMap.putMap(PARAMETER_MC.convert(transactionRegistration.getParameters())); requestMap.putCurrency("extraAmount", transactionRegistration.getExtraAmount()); } TransactionRegistrationV2MapConverter();  }
TransactionRegistrationV2MapConverter extends
    AbstractMapConverter<TransactionRegistration> { @Override protected void convert(RequestMap requestMap, TransactionRegistration transactionRegistration) { requestMap.putString("paymentMode", transactionRegistration.getPaymentMode()); requestMap.putCurrency("currency", transactionRegistration.getCurrency()); requestMap.putMap(PAYMENT_ITEMS_MC.convert(transactionRegistration.getItems())); requestMap.putString("notificationURL", transactionRegistration.getNotificationURL()); requestMap.putString("reference", transactionRegistration.getReference()); requestMap.putMap(SENDER_MC.convert(transactionRegistration.getSender())); requestMap.putMap(SHIPPING_MC.convert(transactionRegistration.getShipping())); requestMap.putMap(PARAMETER_MC.convert(transactionRegistration.getParameters())); requestMap.putCurrency("extraAmount", transactionRegistration.getExtraAmount()); } TransactionRegistrationV2MapConverter();   }