public PaymentAuthorizationDTO create(String processor, String code1) {

    PaymentAuthorizationDTO auto = new PaymentAuthorizationDTO();
    auto.setProcessor(processor);
    auto.setCode1(code1);
    auto.setCreateDate(Calendar.getInstance().getTime());

    return save(auto);
  }
 private PaymentAuthorizationDTO createAuthorizationDTO(
     boolean isAuthorized, String transactionId) {
   PaymentAuthorizationDTO auth = new PaymentAuthorizationDTO();
   auth.setProcessor(getFakeProcessorName());
   auth.setCode1(getFakeCode1());
   auth.setTransactionId(transactionId);
   auth.setResponseMessage(
       isAuthorized ? "The transaction has been approved" : "Transaction failed");
   return auth;
 }