IndividualLoanServiceFacadeWebTier implements IndividualLoanServiceFacade { @Override public void create(IndividualLoanRequest individualLoan) { IndividualLoan loan = loanAssembler.assembleFrom(individualLoan); } IndividualLoanServiceFacadeWebTier(LoanService loanService, LoanAssembler loanAssembler); @Override void create(IndividualLoanRequest individualLoan);  }
@Test public void shouldAssembleIndividualLoanWhenCreatingLoan() { IndividualLoanRequest individualLoanRequest = new IndividualLoanRequestBuilder().build(); individualLoanServiceFacade.create(individualLoanRequest); verify(loanAssembler).assembleFrom(individualLoanRequest); }
@Test public void shouldCreateLoanAssembledFromIndividualLoanRequest() { IndividualLoanRequest individualLoanRequest = new IndividualLoanRequestBuilder().build(); when(loanAssembler.assembleFrom(individualLoanRequest)).thenReturn(individualLoan); individualLoanServiceFacade.create(individualLoanRequest); }