### Question:
MetricCategoryConverter implements CommandLine.ITypeConverter<MetricCategory> { @Override public MetricCategory convert(final String value) { final MetricCategory category = metricCategories.get(value); if (category == null) { throw new IllegalArgumentException("Unknown category: " + value); } return category; }  @Override MetricCategory convert(final String value); void addCategories(final Class<T> categoryEnum); void addRegistryCategory(final MetricCategory metricCategory);  }### Answer:
@Test public void convertShouldFailIfValueNotRegistered() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> metricCategoryConverter.convert("notRegistered")); }