@SuppressWarnings("unchecked")
@Test
public void testCurrentDataSetContainsDataAndExpectedDataSetIsEmpty() {

    // GIVEN
    final List<String> collectionNames = Arrays.asList(COLLECTION_NAME_1);
    final Iterator<String> collectionNamesIt = collectionNames.iterator();
    final MongoCursor<String> iterator = mock(MongoCursor.class);
    when(iterator.hasNext()).thenAnswer((final InvocationOnMock invocation) -> collectionNamesIt.hasNext());
    when(iterator.next()).thenAnswer((final InvocationOnMock invocation) -> collectionNamesIt.next());
    final MongoIterable<String> collectionIterable = mock(MongoIterable.class);
    when(collectionIterable.iterator()).thenReturn(iterator);
    when(mongoDatabase.listCollectionNames()).thenReturn(collectionIterable);
    final MongoCollection<Document> collection = mock(MongoCollection.class);
    when(mongoDatabase.getCollection(eq(COLLECTION_NAME_1))).thenReturn(collection);
    when(collection.count()).thenReturn(1l);
    final String[] toExclude = new String[] {};
    final Document expectedDataSet = new Document();
    final DataSetComparator comparator = new DataSetComparator(toExclude, false);
    // WHEN
    comparator.compare(mongoDatabase, expectedDataSet, errorCollector);
    // THEN
    assertThat(errorCollector.amountOfErrors(), equalTo(1));
    try {
        errorCollector.report();
        fail("AssertionError expected");
    } catch (final AssertionError e) {
        assertThat(e.getMessage(), containsString("failed in 1 case"));
        assertThat(e.getMessage(), containsString(COLLECTION_NAME_1 + " was expected to be empty, but has <" + 1 + "> entries"));
    }
}