### Question:
HardwareVersion { public static HardwareVersion get(int value) { HardwareVersionEnum hvEnum = HardwareVersionEnum.get(value); if (hvEnum == null) return new HardwareVersion(value, "Unknown"); return new HardwareVersion(hvEnum.getValue(), hvEnum.getDescription()); } private  HardwareVersion(int value, String description); int getValue(); String getDescription(); static HardwareVersion get(int value); static HardwareVersion get(int value, String description); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testGetHardwareVersionInvalid() { try { HardwareVersion.get(0, null); } catch(Exception e) { assertEquals(NullPointerException.class, e.getClass()); } try { HardwareVersion.get(-1, "Description"); } catch(Exception e) { assertEquals(IllegalArgumentException.class, e.getClass()); } try { HardwareVersion.get(0, ""); } catch(Exception e) { assertEquals(IllegalArgumentException.class, e.getClass()); } }