### Question:
SelfDescribedEnumDto { public static <E extends Enum & SelfDescribedEnum> SelfDescribedEnumDto apply(E describedEnum) { if (describedEnum == null || describedEnum.name().equals("NONE")) { return null; } return new SelfDescribedEnumDto(describedEnum.name(), describedEnum.getDescription()); }  static SelfDescribedEnumDto apply(E describedEnum); static List<SelfDescribedEnumDto> apply(Class<E> eClass);  }### Answer:
@Test public void apply() { SelfDescribedEnumDto t1Vo = SelfDescribedEnumDto.apply(TestEnum.T1); Assert.assertEquals("T1", t1Vo.getKey()); Assert.assertEquals("t1", t1Vo.getDesc()); SelfDescribedEnumDto t2Vo = SelfDescribedEnumDto.apply(TestEnum.T2); Assert.assertEquals("T2", t2Vo.getKey()); Assert.assertEquals("t2", t2Vo.getDesc()); }
@Test public void apply1() { List<SelfDescribedEnumDto> vos = SelfDescribedEnumDto.apply(TestEnum.class); Assert.assertTrue(vos.contains(SelfDescribedEnumDto.apply(TestEnum.T1))); Assert.assertTrue(vos.contains(SelfDescribedEnumDto.apply(TestEnum.T2))); }