@Test
public void getCustomDescendIndexDBObjectTest() throws MongoValidationException {

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