### Question:
PageObjectEnricher extends AbstractSearchContextEnricher { @Override public Object[] resolve(SearchContext searchContext, Method method, Object[] resolvedParams) { StringBuffer errorMsgBegin = new StringBuffer(""); List<Object[]> paramCouple = new LinkedList<Object[]>(); paramCouple.addAll(ReflectionHelper.getParametersWithAnnotation(method, Page.class)); for (int i = 0; i < resolvedParams.length; i++) { if (paramCouple.get(i) != null) { Class<?> param = (Class<?>) paramCouple.get(i)[0]; Annotation[] parameterAnnotations = (Annotation[]) paramCouple.get(i)[1]; Object page = createPage(searchContext, parameterAnnotations, null, null, method, param); resolvedParams[i] = page; } } return resolvedParams; }  @Override void enrich(final SearchContext searchContext, Object target); @Override Object[] resolve(SearchContext searchContext, Method method, Object[] resolvedParams); static P setupPage(GrapheneContext context, SearchContext searchContext, Class<?> pageClass); @Override int getPrecedence();  }### Answer:
@Test public void testNoArgConstructorResolveMethod() throws NoSuchMethodException { thrown.expect(PageObjectInitializationException.class); getGrapheneEnricher().resolve(NoArgConstructorMethodParamTest.class.getMethod("methodToResolve", NoArgConstructorMethodParamTest.WrongPageObject.class)); }
@Test public void testAbstractTypeResolveMethod() throws NoSuchMethodException { thrown.expect(PageObjectInitializationException.class); getGrapheneEnricher() .resolve(AbstractTypeMethodParamTest.class.getMethod("methodToResolve", AbstractPageType.class)); }