@@ -0,0 +1,1384 @@
+package de.bwaldvogel;%0A%0Aimport static org.fest.assertions.Assertions.assertThat;%0Aimport static org.junit.Assert.fail;%0A%0Aimport org.bson.Document;%0Aimport org.junit.After;%0Aimport org.junit.Assume;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport com.mongodb.MongoClient;%0Aimport com.mongodb.MongoQueryException;%0Aimport com.mongodb.client.MongoCollection;%0Aimport com.mongodb.client.model.Filters;%0A%0Apublic class RealMongoDatabaseTest %7B%0A%0A    private MongoClient mongoClient;%0A    private MongoCollection%3CDocument%3E collection;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        Assume.assumeTrue(Boolean.getBoolean(getClass().getName() + %22.enabled%22));%0A        mongoClient = new MongoClient(%22localhost%22);%0A        collection = mongoClient.getDatabase(%22testdb%22).getCollection(getClass().getSimpleName());%0A        collection.deleteMany(new Document());%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A        if (mongoClient != null) %7B%0A            mongoClient.close();%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testEmptyArrayQuery() throws Exception %7B%0A        collection.insertOne(new Document(%22_id%22, 1));%0A%0A        try %7B%0A            collection.find(Filters.and()).first();%0A            fail(%22MongoQueryException expected%22);%0A        %7D catch (MongoQueryException e) %7B%0A            assertThat(e.getMessage()).contains(%22must be a nonempty array%22);%0A        %7D%0A    %7D%0A%7D%0A

add test case against real mongodb