### Question:
MetadataTime implements Comparable<MetadataTime> { public static TimeType getType(char code) { switch (code) { case 'M': return TimeType.MILLIS; case 'L': return TimeType.LOGICAL; default: throw new IllegalArgumentException("Unknown time type code : " + code); } } MetadataTime(long time, TimeType type); static MetadataTime parse(String timestr); static TimeType getType(char code); static char getCode(TimeType type); char getCode(); String encode(); TimeType getType(); long getTime(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(MetadataTime mtime);  }### Answer:
@Test public void testValueOfM() { assertEquals(TimeType.MILLIS, MetadataTime.getType('M')); }
@Test public void testValueOfL() { assertEquals(TimeType.LOGICAL, MetadataTime.getType('L')); }
@Test(expected = IllegalArgumentException.class) public void testValueOfOtherChar() { MetadataTime.getType('x'); }