final MaskFacetAnnotationForProperty maskFacet = (MaskFacetAnnotationForProperty) facet;
assertEquals("###", maskFacet.value());
}
public void testMaskAnnotationPickedUpOnActionParameter() {
final MaskAnnotationForParameterFacetFactory facetFactory = new MaskAnnotationForParameterFacetFactory();
facetFactory.setSpecificationLookup(reflector);
class Customer {
@SuppressWarnings("unused")
public void someAction(@Mask("###") final String foo) {
}
}
final Method method = findMethod(Customer.class, "someAction", new Class[] { String.class });
facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));
final Facet facet = facetedMethodParameter.getFacet(MaskFacet.class);
assertNotNull(facet);
assertTrue(facet instanceof MaskFacetAnnotationForParameter);
final MaskFacetAnnotationForParameter maskFacet = (MaskFacetAnnotationForParameter) facet;