@Test
public void getCustomCompoundIndexDBObjectTest() throws MongoValidationException {

    IndexMetadataBuilder indexMetaBuilder = new IndexMetadataBuilder(DB_NAME, TABLE_NAME, INDEX_NAME,
                    IndexType.CUSTOM);
    indexMetaBuilder.addOption(IndexOptions.INDEX_TYPE.getOptionName(),
                    CustomMongoIndexType.COMPOUND.getIndexType());
    indexMetaBuilder.addOption(IndexOptions.COMPOUND_FIELDS.getOptionName(), COLUMN_NAME + ":desc," + COLUMN_NAME2
                    + ":asc");
    IndexMetadata indexMetadata = indexMetaBuilder.build();
    DBObject object = IndexUtils.getIndexDBObject(indexMetadata);
    assertEquals("The value of the descending index " + COLUMN_NAME + " should be '-1'", -1,
                    object.get(COLUMN_NAME));
    assertEquals("The value of the ascending index " + COLUMN_NAME2 + " should be '1'", 1, object.get(COLUMN_NAME2));
}