package eu.dozd.mongo;

import eu.dozd.mongo.codec.CustomFieldCodecProvider;
import org.bson.codecs.configuration.CodecProvider;
import org.junit.Assert;
import org.junit.Test;

import java.util.List;

public class MongoMapperTest {
    @Test
    public void testMongoMapper() throws Exception {
        List<CodecProvider> providers = MongoMapper.getProviders();
        Assert.assertEquals(5, providers.size());

        // Check for unmodifiable list.
        providers.add(new CustomFieldCodecProvider());

        MongoMapper.addProvider(new CustomFieldCodecProvider());
        providers = MongoMapper.getProviders();
        Assert.assertEquals(6, providers.size());
    }
}

@@ -382,17 +382,55 @@
 sert
-Equals(5,
+False(providers.isEmpty());%0A%0A        int size =
  pro
@@ -442,19 +442,17 @@
 s.size()
-);%0A
+;
 %0A       
@@ -685,9 +685,16 @@
 als(
-6
+size + 1
 , pr

Fix concurrent test runs.