### Question:
MetricTypeConverter implements ParamConverter<MetricType<?>> { @Override public MetricType<?> fromString(String s) { return MetricType.fromTextCode(s); }  @Override MetricType<?> fromString(String s); @Override String toString(MetricType<?> metricType);  }### Answer:
@Test public void shouldThrowIllegalArgumentExceptionWithInvalidText() throws Exception { expectedException.expect(IllegalArgumentException.class); String invalidText = MetricType.all().stream().map(MetricType::getText).collect(joining(".")); new MetricTypeConverter().fromString(invalidText); }