reading at fongo documentation i found that it supports the @Rule annotation to delete the contents of the DB before executing a test.
i want to achieve the same thing using TestNG but i can't find the correct way to do this, i tried calling fongo.dropDatabase(dbName)
but it doesn't work as expected, if i call this method it seems that DB is droped but no new instance is created when inserting a new document.
also tried to delete and instance again fongo, but also no results. its the same i can create or update documents but if i try to fetch a document there will be no results.
to delete contents of fongo db i'm using @BeforeMethod annotation and there call to dropDatabase().
how should i delete db before every test?