}
@Test
public void verifyWholeBill2011S1462A() throws IOException // Testing Amendment A of the bill 2011S1462
{
Bill theBill;
File sobiDirectory = new File("/home/shweta/test/processed/2013/bills/");
Storage storage = new Storage(env.getStorageDirectory());
ArrayList<File> file = (ArrayList<File>) TestHelper.getFilesByNameCollection(sobiDirectory,"SOBI.D110110.T142112.TXT",
"SOBI.D110613.T222123.TXT", "SOBI.D110614.T192241.TXT","SOBI.D120130.T202912.TXT", "SOBI.D120126.T103841.TXT",
"SOBI.D110614.T195743.TXT", "SOBI.D120104.T223233.TXT", "SOBI.D110215.T151615.TXT", "SOBI.D110209.T105617.TXT",
"SOBI.D110209.T110618.TXT", "SOBI.D110614.T152729.TXT", "SOBI.D110112.T175532.TXT", "SOBI.D110107.T144910.TXT",
"SOBI.D110614.T185240.TXT", "SOBI.D120125.T130337.TXT", "SOBI.D110209.T171147.TXT", "SOBI.D110107.T150914.TXT",
"SOBI.D110209.T170214.TXT", "SOBI.D110107.T141407.TXT");
// NO test for SOBI.D110210.T102843.TXT ,SOBI.D110210.T221519.TXT (Memo),SOBI.D110209.T171647.TXT
// Test for SOBI.D110209.T105617.TXT
TestHelper.processFileC(env ,file.get(8));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110209.T110618.TXT
TestHelper.processFileC(env ,file.get(9));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110215.T151615.TXT
TestHelper.processFileC(env ,file.get(7));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110613.T222123.TXT
TestHelper.processFileC(env ,file.get(1));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110614.T152729.TXT
TestHelper.processFileC(env ,file.get(10));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110209.T170214.TXT,
TestHelper.processFileC(env ,file.get(17));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110209.T171147.TXT
TestHelper.processFileC(env ,file.get(15));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
//assertEquals(theBill.getSameAs(),"A1415A"); ?? Have to check why its failing? Not written in json file ..why?
// Test for SOBI.D110614.T195743.TXT
TestHelper.processFileC(env ,file.get(5));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
String[] voteDate=(theBill.getVotes().get(0).getOid()).split("-");
String date=voteDate[2];
// Checking vote Date
assertEquals(date.equals("2011/06/14"),true);
Vote vote=processExpectedVote2011S1462A();
boolean flag=VoteTests.voteCheck(theBill,vote);
assertEquals(flag,true);
// Test for SOBI.D110614.T185240.TXT
TestHelper.processFileC(env ,file.get(13));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D110614.T192241.TXT
TestHelper.processFileC(env ,file.get(2));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// Test for SOBI.D120104.T223233.TXT
TestHelper.processFileC(env ,file.get(6));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
assertNotNull("The title should not be null",theBill.getTitle());
// assertEquals(theBill.getSameAs(),"A1415A"); ( In json file we dont have sameAs in amendment A??
// Tests for SOBI.D120125.T130337.TXT
TestHelper.processFileC(env ,file.get(14));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
ArrayList<Person> list=(ArrayList<Person>)theBill.getCoSponsors();
assertEquals(list.get(0).toString(),"DUANE");
// Tests for SOBI.D120126.T103841.TXT
TestHelper.processFileC(env ,file.get(4));
theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
assertEquals(theBill.getSponsor().getFullname(),"LAVALLE");
ArrayList<Person> list1=(ArrayList<Person>)theBill.getCoSponsors();
assertEquals(list1.get(0).toString(),"DUANE");
assertEquals(list1.get(1).toString(),"MONTGOMERY");
}