@Test public void shouldConvert() throws Exception { RequestMap expectedMap = new RequestMap(); expectedMap.putMap(new HashMap<String, String>(){{ put("installmentQuantity", "1"); put("installmentValue", "99.99"); put("noInterestInstallmentQuantity", "6"); }}); RequestMap map = mapConverter.convert(installment); assertEquals(expectedMap, map); }
@Override protected void convert(RequestMap requestMap, Installment installment) { requestMap.putInteger("installmentQuantity", installment.getQuantity()); requestMap.putCurrency("installmentValue", installment.getValue()); requestMap.putInteger("noInterestInstallmentQuantity", installment.getNoInterestInstallmentQuantity()); }
InstallmentV2MapConverter extends AbstractMapConverter<Installment> { @Override protected void convert(RequestMap requestMap, Installment installment) { requestMap.putInteger("installmentQuantity", installment.getQuantity()); requestMap.putCurrency("installmentValue", installment.getValue()); requestMap.putInteger("noInterestInstallmentQuantity", installment.getNoInterestInstallmentQuantity()); } }
InstallmentV2MapConverter extends AbstractMapConverter<Installment> { @Override protected void convert(RequestMap requestMap, Installment installment) { requestMap.putInteger("installmentQuantity", installment.getQuantity()); requestMap.putCurrency("installmentValue", installment.getValue()); requestMap.putInteger("noInterestInstallmentQuantity", installment.getNoInterestInstallmentQuantity()); }  }
InstallmentV2MapConverter extends AbstractMapConverter<Installment> { @Override protected void convert(RequestMap requestMap, Installment installment) { requestMap.putInteger("installmentQuantity", installment.getQuantity()); requestMap.putCurrency("installmentValue", installment.getValue()); requestMap.putInteger("noInterestInstallmentQuantity", installment.getNoInterestInstallmentQuantity()); }   }
InstallmentV2MapConverter extends AbstractMapConverter<Installment> { @Override protected void convert(RequestMap requestMap, Installment installment) { requestMap.putInteger("installmentQuantity", installment.getQuantity()); requestMap.putCurrency("installmentValue", installment.getValue()); requestMap.putInteger("noInterestInstallmentQuantity", installment.getNoInterestInstallmentQuantity()); }    }