@Test
public void testGetDimensionName() {

    assertThat(UnitUtils.getDimensionName(SIUnits.CELSIUS), is(Temperature.class.getSimpleName()));
    assertThat(UnitUtils.getDimensionName(SmartHomeUnits.KILOWATT_HOUR), is(Energy.class.getSimpleName()));
    assertThat(UnitUtils.getDimensionName(SmartHomeUnits.WATT), is(Power.class.getSimpleName()));
    assertThat(UnitUtils.getDimensionName(MetricPrefix.MEGA(SmartHomeUnits.KILOWATT_HOUR)),
            is(Energy.class.getSimpleName()));
    Unit<?> unit = UnitUtils.parseUnit("°F");
    assertNotNull(unit);
    if (unit != null) {
        assertThat(UnitUtils.getDimensionName(unit), is(Temperature.class.getSimpleName()));
    }
    unit = UnitUtils.parseUnit("m");
    assertNotNull(unit);
    if (unit != null) {
        assertThat(UnitUtils.getDimensionName(unit), is(Length.class.getSimpleName()));
    }
}