    @Test
    public void selectClosestValueTypes()
    {

        List<ValueType> list = new ArrayList<ValueType>()
        {{
            add( ValueType.of( String.class ) );
            add( ValueType.of( Identity.class ) );
        }};

        List<ValueType> result = list.stream()
                                     .collect( HasTypesCollectors.closestTypes( StringIdentity.class ) );
        assertThat( result.size(), is( 1 ) );
        assertThat( result.get( 0 ), equalTo( ValueType.of( Identity.class ) ) );
    }