### Question:
SimpleUnit { public static boolean isCompatibleWithExceptions(String unitString1, String unitString2) throws UnitException { UnitFormat format = UnitFormatManager.instance(); Unit uu1 = format.parse(unitString1); Unit uu2 = format.parse(unitString2); return uu1.isCompatible(uu2); } protected  SimpleUnit();   SimpleUnit(ucar.units.Unit uu); static SimpleUnit factory(String name); static SimpleUnit factoryWithExceptions(String name); static boolean isCompatible(String unitString1, String unitString2); static boolean isCompatibleWithExceptions(String unitString1, String unitString2); static boolean isDateUnit(ucar.units.Unit uu); static boolean isTimeUnit(ucar.units.Unit uu); static boolean isDateUnit(String unitString); static boolean isTimeUnit(String unitString); static double getConversionFactor(String inputUnitString, String outputUnitString); String toString(); Unit getUnit(); double convertTo(double value, SimpleUnit outputUnit); boolean isCompatible(String unitString); boolean isUnknownUnit(); double getValue(); String getUnitString(); String getCanonicalString(); String getImplementingClass(); static final SimpleUnit kmUnit; static final SimpleUnit meterUnit; static final SimpleUnit pressureUnit; }### Answer:
@Test public void testCompatibleWithException() throws UnitException { assertThat(SimpleUnit.isCompatibleWithExceptions("11 hPa", "mbar")).isTrue(); assertThat(SimpleUnit.isCompatibleWithExceptions("11 hPa", "m")).isFalse(); assertThat(SimpleUnit.isCompatibleWithExceptions("11 hPa", "sec")).isFalse(); try { SimpleUnit.isCompatibleWithExceptions("11 hPa", "3 bad days since 1930-07-27 12:00:00-05:00"); fail(); } catch (Exception e) { } }