@Test public void shouldConvert() throws Exception { RequestMap expectedMap = new RequestMap(); expectedMap.putMap(new HashMap<String, String>(){{ put("acceptPaymentMethodGroup", "CREDIT_CARD"); put("acceptPaymentMethodName", "BRASILCARD"); put("excludePaymentMethodGroup", "BOLETO"); put("excludePaymentMethodName", "DEBITO_BRADESCO"); }}); RequestMap map = mapConverter.convert(acceptedPaymentMethods); assertEquals(expectedMap, map); }
@Override protected void convert(RequestMap requestMap, AcceptedPaymentMethods acceptedPaymentMethods) { requestMap.putMap(INCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getIncludes())); requestMap.putMap(EXCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getExcludes())); }
AcceptedPaymentMethodsV2MapConverter extends
    AbstractMapConverter<AcceptedPaymentMethods> { @Override protected void convert(RequestMap requestMap, AcceptedPaymentMethods acceptedPaymentMethods) { requestMap.putMap(INCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getIncludes())); requestMap.putMap(EXCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getExcludes())); } }
AcceptedPaymentMethodsV2MapConverter extends
    AbstractMapConverter<AcceptedPaymentMethods> { @Override protected void convert(RequestMap requestMap, AcceptedPaymentMethods acceptedPaymentMethods) { requestMap.putMap(INCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getIncludes())); requestMap.putMap(EXCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getExcludes())); }  }
AcceptedPaymentMethodsV2MapConverter extends
    AbstractMapConverter<AcceptedPaymentMethods> { @Override protected void convert(RequestMap requestMap, AcceptedPaymentMethods acceptedPaymentMethods) { requestMap.putMap(INCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getIncludes())); requestMap.putMap(EXCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getExcludes())); }   }
AcceptedPaymentMethodsV2MapConverter extends
    AbstractMapConverter<AcceptedPaymentMethods> { @Override protected void convert(RequestMap requestMap, AcceptedPaymentMethods acceptedPaymentMethods) { requestMap.putMap(INCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getIncludes())); requestMap.putMap(EXCLUDE_PAYMENT_METHOD_MC.convert(acceptedPaymentMethods.getExcludes())); }    }