FlagDescriptors implements Family<FlagDescriptor> { @Override public final List<FlagDescriptor> asList() { return Collections.unmodifiableList(descriptorList); } FlagDescriptors(List<String[]> recordList); @Override final List<FlagDescriptor> asList(); @Override final FlagDescriptor getMember(String flagName);  }
@Test public void testAsList() { final List<FlagDescriptor> descriptorList = flagDescriptors.asList(); assertNotNull(descriptorList); assertThat(descriptorList, is(instanceOf(Collections.unmodifiableList(recordList).getClass()))); assertEquals(2, descriptorList.size()); assertEquals("description_2", descriptorList.get(1).getDescription()); }