// Scenario Registration Customer @Before public void init() { // initializeSpring context = new ClassPathXmlApplicationContext("res/spring/application-context-test.xml"); customer = context.getBean(CustomerDTO.class); logonCredentialsDTO = context.getBean(CapturedCredentialsDTO.class); encryptionModule = context.getBean(EncryptionModule.class); paymentDetailsDTO = context.getBean(PaymentDetailsDTO.class); contactInforMationDTO = context.getBean(ContactInformationDTO.class); customerRepository = context.getBean(CustomerRepository.class); customer.setFirstName("Samuel"); customer.setLastname("Sam"); customer.setDateOfBirth( DateUtil.formatDate(ApplicationContants.DATE_OF_BIRTH_FORMAT, "12/12/1979")); // customer payment details paymentDetailsDTO.setPaymentType(PaymentType.CREDIT_CARD.getPaymentType()); paymentDetailsDTO.setValue("111111111111"); customer.setPaymentDetails(paymentDetailsDTO); contactInforMationDTO.setContactType(ContactType.EMAIL.getContactType()); contactInforMationDTO.setContactValue("*****@*****.**"); customer.setContactDetails(contactInforMationDTO); // set Encryption model customer.setEncryptionModule(encryptionModule); // Captured Credentials to validate Password and Captured Password; logonCredentialsDTO.setUserName("userName"); logonCredentialsDTO.setPassword("password"); logonCredentialsDTO.setConfirmPasword("p@ssword!"); // Use a dynamic proxy to lookup for interface userManagerImpl = new UserManagerImpl(customerRepository); userManager = new APSMockObjectGenerator<UserManagerImpl>().mock(userManagerImpl); }