final MaskFacetAnnotationForType maskFacet = (MaskFacetAnnotationForType) facet;
assertEquals("###", maskFacet.value());
}
public void testMaskAnnotationPickedUpOnProperty() {
final MaskAnnotationForPropertyFacetFactory facetFactory = new MaskAnnotationForPropertyFacetFactory();
facetFactory.setSpecificationLookup(reflector);
class Customer {
@SuppressWarnings("unused")
@Mask("###")
public String getFirstName() {
return null;
}
}
final Method method = findMethod(Customer.class, "getFirstName");
facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, methodRemover, facetedMethod));
final Facet facet = facetedMethod.getFacet(MaskFacet.class);
assertNotNull(facet);
assertTrue(facet instanceof MaskFacetAnnotationForProperty);
final MaskFacetAnnotationForProperty maskFacet = (MaskFacetAnnotationForProperty) facet;