@Override
  protected void reset() {
    if (testContext != null) {
      testContext.close();

      testContext = null;
    }
  }
  @Before
  public void setUp() {
    testContext =
        new TestContext(
            "MongoDAOTest.spring.xml", "MongoDAOTest.properties", new MongoDatabaseProvider(false));

    //noinspection unchecked
    simpleObjectDAO =
        (GenericDAO<SimpleObject, String>) testContext.getBean("simpleObjectMongoQueryModelDAO");
  }
  @Override
  protected SimpleObjectDAO getSimpleObjectDAO() {
    if (testContext == null) {
      testContext =
          new TestContext(
              "MongoDAOTest.spring.xml", "MongoDAOTest.properties", new MongoDatabaseProvider());
    }

    return (SimpleObjectDAO) testContext.getBean("simpleObjectDAO");
  }
 @After
 public void tearDown() {
   if (testContext != null) {
     testContext.close();
   }
 }