DataSourceHelper { public static boolean isValidConfigurationOption(IDataSource dataSource, String propertyName) { List<DataSourceConfigurationOption> properties = getConfigurationOptionsFor(dataSource); String realPropertyName = StringUtil.toFirstUpper(propertyName); for (DataSourceConfigurationOption p : properties) { if (p.getName().equals(realPropertyName)) { return true; } } return false; } private  DataSourceHelper(); static List<DataSourceConfigurationOption> getConfigurationOptionsFor(
			Class<? extends IDataSource> dataSource); static List<DataSourceConfigurationOption> getConfigurationOptionsFor(
			IDataSource dataSource); static boolean isValidConfigurationOption(IDataSource dataSource,
			String propertyName); static void setConfigurationOption(IDataSource dataSource,
			String name, String value); static List<String> validateDataSourceAnnotation(
			Class<? extends IDataSource> ds); static List<String> validateMethodAnnotations(
			Class<? extends IDataSource> ds); static String getName(IDataSource ds); static String getShortName(IDataSource ds);  }
@Test public void testIsValidParameter() throws Exception { assertTrue(DataSourceHelper.isValidConfigurationOption(dataSource, "A")); assertTrue(DataSourceHelper.isValidConfigurationOption(dataSource, "a")); assertTrue(DataSourceHelper.isValidConfigurationOption(dataSource, "B")); assertTrue(DataSourceHelper.isValidConfigurationOption(dataSource, "b")); assertFalse(DataSourceHelper .isValidConfigurationOption(dataSource, "C")); assertFalse(DataSourceHelper.isValidConfigurationOption(dataSource, "AB")); }