@@ -0,0 +1,881 @@
+package com.mmnaseri.utils.spring.data.domain.impl.key;%0A%0Aimport org.bson.types.ObjectId;%0Aimport org.testng.annotations.BeforeMethod;%0Aimport org.testng.annotations.Test;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.*;%0A%0Apublic class BsonObjectIdKeyGeneratorTest %7B%0A%0A    private BsonObjectIdKeyGenerator generator;%0A%0A    @BeforeMethod%0A    public void setUp() %7B%0A        generator = new BsonObjectIdKeyGenerator();%0A    %7D%0A%0A    @Test%0A    public void testNotNullValue() %7B%0A        assertThat(generator.generate(), is(notNullValue()));%0A    %7D%0A%0A    @Test%0A    public void testUniqueness() %7B%0A        final Set%3CObjectId%3E set = new HashSet%3C%3E();%0A        for (int i = 0; i %3C 1000; i++) %7B%0A            final ObjectId id = generator.generate();%0A            assertThat(set, not(contains(id)));%0A        %7D%0A    %7D%0A%7D

Add tests for BSON ObjectID key generation