DefaultWorldpayCheckoutService implements WorldpayCheckoutService { @Override public void setPaymentAddress(final CartModel cartModel, final AddressModel addressModel) { cartModel.setPaymentAddress(addressModel); getModelService().save(cartModel); getModelService().refresh(cartModel); }  @Override void setPaymentAddress(final CartModel cartModel, final AddressModel addressModel); ModelService getModelService(); @Required void setModelService(final ModelService modelService);  }
@Test public void testSetPaymentAddress() throws Exception { testObj.setPaymentAddress(cartModelMock, addressModelMock); verify(modelServiceMock).save(cartModelMock); verify(modelServiceMock).refresh(cartModelMock); verify(cartModelMock).setPaymentAddress(addressModelMock); }