EnumCodeList extends AbstractCodeList { @Override public Map<String, String> asMap() { return this.codeListMap; } EnumCodeList(Class<? extends Enum<?>> enumClass); @Override Map<String, String> asMap();  }
@Test public void testAsMap() { EnumCodeList codeList = new EnumCodeList(OrderStatus.class); Map<String, String> expected = new LinkedHashMap<String, String>(); expected.put("1", "Received"); expected.put("2", "Sent"); expected.put("3", "Cancelled"); assertThat(codeList.asMap(), is(expected)); }