@Before public void setUp() throws Exception { gen.clearAllTables(); b1 = new BillingBean(); b1.setAmt(40); b1.setInsAddress1("123 else drive"); b1.setInsAddress2(" "); b1.setInsCity("Durham"); b1.setInsHolderName("dad"); b1.setInsID("1234"); b1.setInsPhone("333-333-3333"); b1.setInsProviderName("Cigna"); b1.setInsState("NC"); b1.setInsZip("27607"); b1.setPatient(PATIENT_MID); b1.setStatus(BillingBean.PENDING); b1.setSubTime(new Timestamp(new Date().getTime())); ov = new OfficeVisitBean(); ov.setAppointmentType("Mammogram"); ov.setBilled(true); ov.setHcpID(DOCTOR_MID); ov.setPatientID(PATIENT_MID); int ovID = (int) init2.add(ov); b1.setApptID(ovID); b1.setBillID((int) init.addBill(b1)); init.editBill(b1); subject = new VerifyClaimAction(factory, b1.getBillID()); }
@Test public void testApproveClaim() { subject.approveClaim(); try { b1 = init.getBillId(b1.getBillID()); } catch (DBException e) { e.printStackTrace(); fail(); } assertEquals(BillingBean.APPROVED, b1.getStatus()); }