@Test
public void testHierEncoderAnotherSimpleInheritance() {
HierarchyEncoder encoder = new HierarchyEncoderImpl();
encoder.encode( "R", Collections.EMPTY_LIST );
encoder.encode( "A1", Arrays.asList( "R" ) );
encoder.encode( "A2", Arrays.asList( "R" ) );
encoder.encode( "A3", Arrays.asList( "R" ) );
encoder.encode( "B1", Arrays.asList( "R" ) );
encoder.encode( "B2", Arrays.asList( "R" ) );
encoder.encode( "B3", Arrays.asList( "R" ) );
encoder.encode( "B4", Arrays.asList( "B1", "B2" ) );
encoder.encode( "B5", Arrays.asList( "B1", "B3" ) );
encoder.encode( "B6", Arrays.asList( "B2", "B3" ) );
encoder.encode( "B7", Arrays.asList( "B4", "B5", "B6" ) );
System.out.println( encoder );
assertEquals( parseBitSet( "0"), encoder.getCode("R"));
assertEquals( parseBitSet( "1" ), encoder.getCode( "A1" ) );
assertEquals( parseBitSet( "10" ), encoder.getCode( "A2" ) );
assertEquals( parseBitSet( "100" ), encoder.getCode( "A3" ) );
assertEquals( parseBitSet( "1000" ), encoder.getCode( "B1" ) );
assertEquals( parseBitSet( "10000" ), encoder.getCode( "B2" ) );
assertEquals( parseBitSet( "100000" ), encoder.getCode( "B3" ) );
assertEquals( parseBitSet( "11000" ), encoder.getCode( "B4" ) );
assertEquals( parseBitSet( "101000" ), encoder.getCode( "B5" ) );
assertEquals( parseBitSet( "110000" ), encoder.getCode( "B6" ) );
assertEquals( parseBitSet( "111000" ), encoder.getCode( "B7" ) );
}