### Question:
ThriftSerDeUtils { static <E extends TFieldIdEnum, T extends TBase<?, ?>> E[] fields(Class<T> tClazz) { for (Class<?> clazz : tClazz.getDeclaredClasses()) { if (TFieldIdEnum.class.isAssignableFrom(clazz)) { return (E[]) clazz.getEnumConstants(); } } return null; } private  ThriftSerDeUtils();   }### Answer:
@Test public void returnFields() { TFieldIdEnum[] fields = ThriftSerDeUtils.fields(Table.class); assertThat(fields).isNotNull().isEqualTo(Table._Fields.values()); }
@Test public void returnNull() { assertThat(ThriftSerDeUtils.fields(InvalidTBase.class)).isNull(); }