### Question:
StormSinkConfiguration implements Supplier<Configuration> { public void setLocationServiceFactoryClassName(String locationServiceFactoryClassName) throws ClassNotFoundException { Class<?> locationServiceFactoryClass = Class.forName(locationServiceFactoryClassName); Preconditions.checkArgument(LocationServiceFactory.class.isAssignableFrom(locationServiceFactoryClass), "The class must implement " + LocationServiceFactory.class.getCanonicalName()); this.locationServiceFactoryClassName = locationServiceFactoryClassName; } StormSinkConfiguration();  StormSinkConfiguration(final StormSinkConfiguration other); static StormSinkConfiguration from(Configuration config); int getBatchSize(); void setBatchSize(int batchSize); String getLocationServiceFactoryClassName(); void setLocationServiceFactoryClassName(String locationServiceFactoryClassName); String getServiceProviderSerializationClassName(); void setServiceProviderSerializationClassName(String serviceProviderSerializationClassName); String getEventSenderFactoryClassName(); void setEventSenderFactoryClassName(String eventSenderFactoryClassName); String getConnectionParametersFactoryClassName(); void setConnectionParametersFactoryClassName(String connectionParametersFactoryClassName); Configuration get(); void setConfiguration(Configuration configuration); static final String BATCH_SIZE; static final int BATCH_SIZE_DEFAULT; static final String LOCATION_SERVICE_FACTORY_CLASS; static final String LOCATION_SERVICE_FACTORY_CLASS_DEFAULT; static final String SERVICE_PROVIDER_SERIALIZATION_CLASS; static final String SERVICE_PROVIDER_SERIALIZATION_CLASS_DEFAULT; static final String EVENT_SENDER_FACTORY_CLASS; static final String EVENT_SENDER_FACTORY_CLASS_DEFAULT; static final String CONNECTION_PARAMETERS_FACTORY_CLASS; static final String CONNECTION_PARAMETERS_FACTORY_CLASS_DEFAULT; }### Answer:
@Test(expected = ClassNotFoundException.class) public void testLocationServiceFactoryClassName1() throws ClassNotFoundException { new StormSinkConfiguration().setLocationServiceFactoryClassName("not-a-class"); }
@Test(expected = IllegalArgumentException.class) public void testLocationServiceFactoryClassName2() throws ClassNotFoundException { new StormSinkConfiguration().setLocationServiceFactoryClassName("java.lang.String"); }