use of com.thinkbiganalytics.guava.PredicateImpl in project kylo by Teradata.
the class TestStandardizationTransform method testUiCreation.
@Test
public void testUiCreation() {
List<FieldStandardizationRule> standardizationRules = AvailablePolicies.discoverStandardizationRules();
FieldStandardizationRule defaultValue = Iterables.tryFind(standardizationRules, new PredicateImpl<FieldStandardizationRule>() {
@Override
public boolean test(FieldStandardizationRule fieldStandardizationRule) {
return fieldStandardizationRule.getName().equalsIgnoreCase("Default Value");
}
}).orNull();
defaultValue.getProperty("Default Value").setValue("a new default value");
DefaultValueStandardizer convertedPolicy = fromUI(defaultValue, DefaultValueStandardizer.class);
Assert.assertEquals("a new default value", convertedPolicy.getDefaultStr());
}
Aggregations