@Test public void shouldConvert() throws Exception { RequestMap expectedMap = new RequestMap(); expectedMap.putMap(new HashMap<String, String>() {{ put("cardBrand", "cardBrand"); put("amount", "99.99"); put("maxInstallmentNoInterest", "3"); }}); RequestMap map = mapConverter.convert(installmentRequest); assertEquals(expectedMap, map); }
@Override protected void convert(RequestMap requestMap, InstallmentRequest installmentRequest) { requestMap.putString("cardBrand", installmentRequest.getCardBrand()); requestMap.putCurrency("amount", installmentRequest.getAmount()); requestMap.putInteger("maxInstallmentNoInterest", installmentRequest.getMaxInstallmentNoInterest()); requestMap.putMap(PARAMETER_MC.convert(installmentRequest.getParameters())); }
InstallmentRequestV2MapConverter extends AbstractMapConverter<InstallmentRequest> { @Override protected void convert(RequestMap requestMap, InstallmentRequest installmentRequest) { requestMap.putString("cardBrand", installmentRequest.getCardBrand()); requestMap.putCurrency("amount", installmentRequest.getAmount()); requestMap.putInteger("maxInstallmentNoInterest", installmentRequest.getMaxInstallmentNoInterest()); requestMap.putMap(PARAMETER_MC.convert(installmentRequest.getParameters())); } }
InstallmentRequestV2MapConverter extends AbstractMapConverter<InstallmentRequest> { @Override protected void convert(RequestMap requestMap, InstallmentRequest installmentRequest) { requestMap.putString("cardBrand", installmentRequest.getCardBrand()); requestMap.putCurrency("amount", installmentRequest.getAmount()); requestMap.putInteger("maxInstallmentNoInterest", installmentRequest.getMaxInstallmentNoInterest()); requestMap.putMap(PARAMETER_MC.convert(installmentRequest.getParameters())); } InstallmentRequestV2MapConverter(); }
InstallmentRequestV2MapConverter extends AbstractMapConverter<InstallmentRequest> { @Override protected void convert(RequestMap requestMap, InstallmentRequest installmentRequest) { requestMap.putString("cardBrand", installmentRequest.getCardBrand()); requestMap.putCurrency("amount", installmentRequest.getAmount()); requestMap.putInteger("maxInstallmentNoInterest", installmentRequest.getMaxInstallmentNoInterest()); requestMap.putMap(PARAMETER_MC.convert(installmentRequest.getParameters())); } InstallmentRequestV2MapConverter();  }
InstallmentRequestV2MapConverter extends AbstractMapConverter<InstallmentRequest> { @Override protected void convert(RequestMap requestMap, InstallmentRequest installmentRequest) { requestMap.putString("cardBrand", installmentRequest.getCardBrand()); requestMap.putCurrency("amount", installmentRequest.getAmount()); requestMap.putInteger("maxInstallmentNoInterest", installmentRequest.getMaxInstallmentNoInterest()); requestMap.putMap(PARAMETER_MC.convert(installmentRequest.getParameters())); } InstallmentRequestV2MapConverter();   }