@Test
    public void test() {
        //Set up connection
        //MongoHelper.setDB("iCrossFit");
        MongoHelper.setDB("iCrossFit");

        //Clear out DB
        MongoHelper.getCollection("gyms").drop();
        MongoHelper.getCollection("users").drop();
        MongoHelper.getCollection("trainingClasses").drop();

        //Set up data objects
        //Create First Gym
        Gym gym1 = new Gym();

        //Set variables
        gym1.setAddress(new Address("20 W Main Street", "Wappingers Falls", "NY", "12590"));
        gym1.setComments("Hottest and greatest!!!");
        gym1.setEmail("wfcrossfit@wfcrossfit.com");
        gym1.setEquipment("Kettle balls, bench, squat rack");
        gym1.setHold(false);
        gym1.setMaxCapacity(50);
        gym1.setName("Wappingers Falls Crossfit");
        gym1.setNickName("Wappers Crossfit");
        gym1.setPhone("8454445555");
        gym1.setPrice(95.00);
        gym1.setWebsite("http://www.wfcrossfit.com");
        gym1.getClassIds().add(1);
        gym1.getClassIds().add(2);
        gym1.getClassIds().add(3);


        //Save
        if(!MongoHelper.save(gym1,"gyms")) {
            TestHelper.failed("Save gym 1 failed.");
        }

        //Report Status
        System.out.println("\nSuccessfully saved GYM id = " + gym1.getId() + ".\n\n");


        //Create second gym
        Gym gym2 = new Gym();

        //Set variables
        gym2.setAddress(new Address("12 Main Street", "Poughkeepsie", "NY", "12601"));
        gym2.setComments("Biggest and best in the Hudson Valley!!!");
        gym2.setEmail("pokcrossfit@pokcrossfit.com");
        gym2.setEquipment("Kettle balls, rope climb, flip tire, bench, squat rack");
        gym2.setHold(false);
        gym2.setMaxCapacity(75);
        gym2.setName("Poughkeepsie Crossfit");
        gym2.setNickName("Pok Crossfit");
        gym2.setPhone("8453331111");
        gym2.setPrice(105.00);
        gym2.setWebsite("http://www.pokcrossfit.com");
        gym2.getClassIds().add(4);
        gym2.getClassIds().add(5);


        //Save
        if(!MongoHelper.save(gym2,"gyms")) {
            TestHelper.failed("Save gym 2 failed.");
        }

        //Report Status
        System.out.println("\nSuccessfully saved GYM id = " + gym2.getId() + ".\n\n");


        //Create third gym
        Gym gym3 = new Gym();

        //Set variables
        gym3.setAddress(new Address("891 New York Router 82", "Hopewell Junction", "NY", "12533"));
        gym3.setComments("New and Improved!!!");
        gym3.setEmail("hopewellcrossfit@pokcrossfit.com");
        gym3.setEquipment("Kettle balls, rope climb, flip tire, bench, squat rack");
        gym3.setHold(false);
        gym3.setMaxCapacity(75);
        gym3.setName("Hopewell Junction Crossfit");
        gym3.setNickName("Hopewell Crossfit");
        gym3.setPhone("8451115555");
        gym3.setPrice(95.00);
        gym3.setWebsite("http://www.hopewellcrossfit.com");
        gym3.getClassIds().add(6);
        gym3.getClassIds().add(7);
        gym3.getClassIds().add(8);


        //Save
        if(!MongoHelper.save(gym3,"gyms")) {
            TestHelper.failed("Save gym 3 failed.");
        }

        //Report Status
        System.out.println("\nSuccessfully saved GYM id = " + gym3.getId() + ".\n\n");


         //Create fourth gym
        Gym gym4 = new Gym();

        //Set variables
        gym4.setAddress(new Address("100 Lexington Avenue", "New York", "NY", "10016"));
        gym4.setComments("Student discounts available");
        gym4.setEmail("midtown1@NYcrossfit.com");
        gym4.setEquipment("rope climb, flip tire, bench, squat rack");
        gym4.setHold(false);
        gym4.setMaxCapacity(23);
        gym4.setName("Midtown Manhattan Crossfit");
        gym4.setNickName("Midtown Crossfit");
        gym4.setPhone("6461115212");
        gym4.setPrice(105.00);
        gym4.setWebsite("http://www.midtownNYcrossfit.com");
        gym4.getClassIds().add(9);
        gym4.getClassIds().add(10);
        gym4.getClassIds().add(11);


        //Save
        if(!MongoHelper.save(gym4,"gyms")) {
            TestHelper.failed("Save gym 4 failed.");
        }

        //Report Status
        System.out.println("\nSuccessfully saved GYM id = " + gym4.getId() + ".\n\n");
        
        User user1 = new User();
        User user2 = new User();
        User user3 = new User();
        User user4 = new User();
        User user5 = new User();
        
        user1.setFirstName("Michael");
        user1.setLastName("Gildein");
        user1.setAddress(new Address("100 iCossFit Way", "Poughkeepsie", "NY", "12603"));
        user1.setPhone("8454445555");
        user1.setClassLevel("Expert");
        user1.setUserName("admin");
        user1.setPassword("password");
        user1.setAdmin(true);
        user1.setBillingPlan("Annually");

        user2.setFirstName("Ron");
        user2.setLastName("Coleman");
        user2.setAddress(new Address("100 iCossFit Way", "Poughkeepsie", "NY", "12603"));
        user2.setPhone("8454445556");
        user2.setClassLevel("Intermediate");
        user2.setUserName("user");
        user2.setPassword("password");
        user2.setAdmin(false);
        user2.setBillingPlan("Annually");

        user3.setFirstName("Best");
        user3.setLastName("Debugger");
        user3.setAddress(new Address("100 iCossFit Way", "Poughkeepsie", "NY", "12603"));
        user3.setPhone("8454445557");
        user3.setClassLevel("Advance");
        user3.setUserName("debug");
        user3.setPassword("password");
        user3.setAdmin(true);
        user3.setBillingPlan("Annually");
        
        user4.setFirstName("Artur");
        user4.setLastName("Sahakyan");
        user4.setAddress(new Address("100 One Way", "Poughkeepsie", "NY", "12603"));
        user4.setPhone("8454448888");
        user4.setClassLevel("Advance");
        user4.setUserName("admin1");
        user4.setPassword("password");
        user4.setAdmin(true);
        user4.setBillingPlan("Annually");
        
        user5.setFirstName("Patrick");
        user5.setLastName("Collins");
        user5.setAddress(new Address("200 Onlybest Way", "Poughkeepsie", "NY", "12603"));
        user5.setPhone("8454412888");
        user5.setClassLevel("Expert");
        user5.setUserName("admin2");
        user5.setPassword("password");
        user5.setAdmin(true);
        user5.setBillingPlan("Annually");

        user1.setPassword(getMD5(user1.getPassword()));

        if(!MongoHelper.save(user1,"users")) {
            TestHelper.failed("Save user 1 failed.");
        }


        user2.setPassword(getMD5(user2.getPassword()));

        if(!MongoHelper.save(user2,"users")) {
            TestHelper.failed("Save user 2 failed.");
        }


        user3.setPassword(getMD5(user3.getPassword()));

        if(!MongoHelper.save(user3,"users")) {
            TestHelper.failed("Save user 3 failed.");
        }
        
        user4.setPassword(getMD5(user4.getPassword()));

        if(!MongoHelper.save(user4,"users")) {
            TestHelper.failed("Save user 4 failed.");
        }


        user5.setPassword(getMD5(user5.getPassword()));

        if(!MongoHelper.save(user5,"users")) {
            TestHelper.failed("Save user 5 failed.");
        }

        //Pass test case
        TestHelper.passed();
    }