### Question:
EnumProvider implements Provider<T> { @Nullable @Override public T get(CommandArgs arguments, List<? extends Annotation> modifiers) throws ArgumentException, ProvisionException { String name = arguments.next(); String test = simplify(name); for (T entry : enumClass.getEnumConstants()) { if (simplify(entry.name()).equalsIgnoreCase(test)) { return entry; } } throw new ArgumentParseException( "No matching value found in the '" + enumClass.getSimpleName() + "' list."); } EnumProvider(Class<T> enumClass); @Override String getName(); @Nullable @Override T get(CommandArgs arguments, List<? extends Annotation> modifiers); @Override List<String> getSuggestions(
      String prefix, Namespace namespace, List<? extends Annotation> modifiers);  }### Answer:
@Test public void testGet() throws Exception { assertThat(provider.get(Arguments.of("small"), ImmutableList.<Annotation>of()), is(Size.SMALL)); assertThat( provider.get(Arguments.of("verylarge"), ImmutableList.<Annotation>of()), is(Size.VERY_LARGE)); assertThat( provider.get(Arguments.of("very_large"), ImmutableList.<Annotation>of()), is(Size.VERY_LARGE)); }
@Test(expected = ArgumentParseException.class) public void testGetMissing() throws Exception { provider.get(Arguments.of("tiny"), ImmutableList.<Annotation>of()); }