DimensionDescriptor { public boolean hasDimension( final String dimension ) { return trimToEmpty( dimension ).equalsIgnoreCase( trimToEmpty( getDimension() ) ); }  boolean hasDimension( final String dimension ); static String getDimensionIdentifierFor( final String dimension,
        final List<DimensionDescriptor> dimensionDescriptors );  }
@Test public void testHasDimensionWithSuccess() { final String anyDimensionValue = "dx"; final DimensionType theDimensionType = DATA_X; final DimensionDescriptor aDimensionDescriptor = new DimensionDescriptor( anyDimensionValue, theDimensionType ); final String dimensionAbbreviation = "dx"; final boolean actualResult = aDimensionDescriptor.hasDimension( dimensionAbbreviation ); assertThat( actualResult, is( true ) ); }
@Test public void testHasDimensionFails() { final String anyDimensionValue = "dx"; final DimensionType theDimensionType = DATA_X; final DimensionDescriptor aDimensionDescriptor = new DimensionDescriptor( anyDimensionValue, theDimensionType ); final String nonExistingDimensionAbbreviation = "ou"; final boolean actualResult = aDimensionDescriptor.hasDimension( nonExistingDimensionAbbreviation ); assertThat( actualResult, is( false ) ); }