final Method actionMethod = findMethod(CustomerEx.class, "someAction", new Class[] { int.class, long.class });
final Method choices0Method = findMethod(CustomerEx.class, "choices0SomeAction", new Class[] {});
final Method choices1Method = findMethod(CustomerEx.class, "choices1SomeAction", new Class[] {});
final Method disableMethod = findMethod(CustomerEx.class, "disableSomeAction", new Class[] { int.class, long.class });
final FacetedMethod facetHolderWithParms = FacetedMethod.createForAction(CustomerEx.class, actionMethod);
final ProcessMethodContext processMethodContext = new ProcessMethodContext(CustomerEx.class, null, null, actionMethod, methodRemover, facetHolderWithParms);
facetFactory.process(processMethodContext);
facetFactoryForChoices.process(processMethodContext);
facetFactoryForDisable.process(processMethodContext);
final Facet facet0 = facetHolderWithParms.getFacet(ActionInvocationFacet.class);
assertNotNull(facet0);
final Facet facet1 = facetHolderWithParms.getParameters().get(0).getFacet(ActionParameterChoicesFacet.class);
assertNotNull(facet1);
assertTrue(facet1 instanceof ActionParameterChoicesFacetViaMethod);
final ActionParameterChoicesFacetViaMethod actionChoicesFacetViaMethod0 = (ActionParameterChoicesFacetViaMethod) facet1;
assertEquals(choices0Method, actionChoicesFacetViaMethod0.getMethods().get(0));
final Facet facet2 = facetHolderWithParms.getParameters().get(1).getFacet(ActionParameterChoicesFacet.class);
assertNotNull(facet2);
assertTrue(facet2 instanceof ActionParameterChoicesFacetViaMethod);
final ActionParameterChoicesFacetViaMethod actionChoicesFacetViaMethod1 = (ActionParameterChoicesFacetViaMethod) facet2;
assertEquals(choices1Method, actionChoicesFacetViaMethod1.getMethods().get(0));
final Facet facet3 = facetHolderWithParms.getFacet(DisableForContextFacet.class);
assertNotNull(facet3);
assertTrue(facet3 instanceof DisableForContextFacetViaMethod);
final DisableForContextFacetViaMethod disableFacetViaMethod = (DisableForContextFacetViaMethod) facet3;
assertEquals(disableMethod, disableFacetViaMethod.getMethods().get(0));