### Question:
ArgumentAcceptingOptionSpec extends AbstractOptionSpec<V> { public final <T> ArgumentAcceptingOptionSpec<T> ofType( Class<T> argumentType ) { return withValuesConvertedBy( findConverter( argumentType ) ); } ArgumentAcceptingOptionSpec( String option, boolean argumentRequired );   ArgumentAcceptingOptionSpec( List<String> options, boolean argumentRequired, String description ); final ArgumentAcceptingOptionSpec<T> ofType( Class<T> argumentType ); @SuppressWarnings( "unchecked" ) final ArgumentAcceptingOptionSpec<T> withValuesConvertedBy( ValueConverter<T> aConverter ); final ArgumentAcceptingOptionSpec<V> describedAs( String description ); final ArgumentAcceptingOptionSpec<V> withValuesSeparatedBy( char separator ); final ArgumentAcceptingOptionSpec<V> withValuesSeparatedBy( String separator ); @SafeVarargs final ArgumentAcceptingOptionSpec<V> defaultsTo( V value, V... values ); ArgumentAcceptingOptionSpec<V> defaultsTo( V[] values ); ArgumentAcceptingOptionSpec<V> required(); boolean isRequired(); boolean acceptsArguments(); boolean requiresArgument(); String argumentDescription(); String argumentTypeIndicator(); List<V> defaultValues(); @Override boolean equals( Object that ); @Override int hashCode();  }### Answer:
@Test( expected = NullPointerException.class ) public void requiredArgOfNullType() { new RequiredArgumentOptionSpec<Void>( "a" ).ofType( null ); }
@Test( expected = NullPointerException.class ) public void optionalArgOfNullType() { new OptionalArgumentOptionSpec<Void>( "verbose" ).ofType( null ); }
@Test( expected = IllegalArgumentException.class ) public void requiredArgOfNonValueType() { new RequiredArgumentOptionSpec<Void>( "threshold" ).ofType( Object.class ); }
@Test( expected = IllegalArgumentException.class ) public void optionalArgOfNonValueType() { new OptionalArgumentOptionSpec<Void>( "max" ).ofType( Object.class ); }
@Test public void requiredArgOfValueTypeBasedOnValueOf() { assertNoException( new Block() { public void execute() { new RequiredArgumentOptionSpec<Void>( "threshold" ).ofType( ValueOfHaver.class ); } } ); }
@Test public void optionalArgOfValueTypeBasedOnValueOf() { assertNoException( new Block() { public void execute() { new OptionalArgumentOptionSpec<Void>( "abc" ).ofType( ValueOfHaver.class ); } } ); }
@Test public void requiredArgOfValueTypeBasedOnCtor() { assertNoException( new Block() { public void execute() { new RequiredArgumentOptionSpec<Void>( "threshold" ).ofType( Ctor.class ); } } ); }