BillService { public void populateBillRegister(final EgBillregister egBillregister, final BillRegister billRegister) throws ClassNotFoundException { populateEgBillregister(egBillregister, billRegister); populateEgBillregisterMis(egBillregister, billRegister); for (final BillDetails details : billRegister.getBillDetails()) populateEgBilldetails(egBillregister, details, billRegister); }  Session getCurrentSession(); List<RestErrors> validateBillRegister(final BillRegister billRegister); void populateBillRegister(final EgBillregister egBillregister, final BillRegister billRegister); void createProjectCode(final BillRegister billRegister); EgBillregister createBill(final EgBillregister egBillregister); List<BillPaymentDetails> getBillAndPaymentDetails(String billNo);  }
@Test public void shouldPopulateEgBillregister() throws ClassNotFoundException { billService.populateBillRegister(egBillregister, billRegister); assertEquals(2, egBillregister.getEgBilldetailes().size()); assertEquals(WorksConstants.APPROVED, egBillregister.getStatus().getCode()); }