### Question:
UtilMongoDB { public static <T extends IDeepType> Object getId(T t) throws IllegalAccessException, InstantiationException, InvocationTargetException { Field[] fields = AnnotationUtils.filterDeepFields(t.getClass()); for (Field field : fields) { if (MONGO_DEFAULT_ID.equals(AnnotationUtils.deepFieldName(field))) { return Utils.findGetter(field.getName(), t.getClass()).invoke(t); } } return null; } private  UtilMongoDB(); static T getObjectFromBson(Class<T> classEntity, BSONObject bsonObject); static DBObject getBsonFromObject(T t); static Object getId(T t); static Cells getCellFromBson(BSONObject bsonObject, String tableName); static DBObject getDBObjectFromCell(Cells cells); static final String MONGO_DEFAULT_ID; }### Answer:
@Test public void testGetId() throws UnknownHostException, NoSuchFieldException, IllegalAccessException, InvocationTargetException, InstantiationException { MongoDBTestEntity commonsBaseTestEntity = new MongoDBTestEntity(); commonsBaseTestEntity.setId(ID_EXAMPLE); assertEquals(UtilMongoDB.getId(commonsBaseTestEntity), ID_EXAMPLE); WordCount wordCount = new WordCount(); assertNull(UtilMongoDB.getId(wordCount)); }