@Test
public void newInstanceWithDefaultKeys() {

    final List<String> fields = Arrays.asList(FIELD_1_NAME, FIELD_2_NAME);
    final Index actual = IndexFactory.newInstance(INDEX_NAME, fields, UNIQUE);
    final BsonDocument expectedKeys = new BsonDocument();
    expectedKeys.put(FIELD_1_NAME, IndexDirection.DEFAULT.getBsonInt());
    expectedKeys.put(FIELD_2_NAME, IndexDirection.DEFAULT.getBsonInt());
    final Index expected = Index.of(expectedKeys, INDEX_NAME, UNIQUE, UNIQUE, BACKGROUND);
    assertThat(actual).isEqualTo(expected);
}