### Question:
MojarraDecorateAllHandlerDelegate implements DecorateAllHandler.Delegate { public Type getType(FaceletHandler handler) { if (handler instanceof ParamHandler || handler instanceof DefineHandler) { return Type.VARIABLE_DECLARATION; } if (handler instanceof ComponentHandler) { return Type.COMPONENT; } return Type.OTHER; }  Type getType(FaceletHandler handler); DecoratedChild createdDecoratedChild(FaceletHandler handler, List<FaceletHandler> variableDeclarationHandlers);  }### Answer:
@Test public void shouldDetectParamHandlerType() throws Exception { assertThat(this.delegate.getType(mock(ParamHandler.class)), is(DecorateAllHandler.Type.VARIABLE_DECLARATION)); }
@Test public void shouldDetectDefineHandlerType() throws Exception { assertThat(this.delegate.getType(mockDefineHandler()), is(DecorateAllHandler.Type.VARIABLE_DECLARATION)); }
@Test public void shouldDetectComponentHandlerType() throws Exception { assertThat(this.delegate.getType(mock(ComponentHandler.class)), is(DecorateAllHandler.Type.COMPONENT)); }
@Test public void shouldDetectOtherHandlerType() throws Exception { assertThat(this.delegate.getType(mock(FaceletHandler.class)), is(DecorateAllHandler.Type.OTHER)); }