### Question:
Utils { static String getTableName(Class<? extends Model> clazz) { if (clazz.isAnnotationPresent(Table.class)) { return clazz.getAnnotation(Table.class).value(); } throw new NoTableAnnotationException(); }    }### Answer:
@Test public void getTableName() { assertEquals(Utils.getTableName(TestModel.class), "Tests"); }
@Test(expected = NoTableAnnotationException.class) public void getTableNameNoAnnotation() { Utils.getTableName(AbsTestModel.class); }