@SuppressWarnings("unchecked") @Test public void testGetDefinition() { Request request = createMock(Request.class); Map<String, Definition> definitions = createMock(Map.class); Map<String, Object> scope = createMock(Map.class); Definition definition = createMock(Definition.class); expect(request.getContext("request")).andReturn(scope); expect(scope.get(DEFAULT_DEFINITIONS_ATTRIBUTE_NAME)).andReturn( definitions); expect(definitions.get("definition")).andReturn(definition); replay(wrapped, request, definitions, scope, definition); assertSame(definition, container.getDefinition("definition", request)); verify(wrapped, request, definitions, scope, definition); }
public Definition getDefinition(String definition, Request request) { Definition retValue = null; retValue = getCustomDefinition(definition, request); if (retValue == null) { retValue = super.getDefinition(definition, request); } return retValue; }
CachingTilesContainer extends TilesContainerWrapper implements MutableTilesContainer { public Definition getDefinition(String definition, Request request) { Definition retValue = null; retValue = getCustomDefinition(definition, request); if (retValue == null) { retValue = super.getDefinition(definition, request); } return retValue; } }
CachingTilesContainer extends TilesContainerWrapper implements MutableTilesContainer { public Definition getDefinition(String definition, Request request) { Definition retValue = null; retValue = getCustomDefinition(definition, request); if (retValue == null) { retValue = super.getDefinition(definition, request); } return retValue; } CachingTilesContainer(TilesContainer originalContainer);  CachingTilesContainer(TilesContainer originalContainer, String definitionsAttributeName); }
CachingTilesContainer extends TilesContainerWrapper implements MutableTilesContainer { public Definition getDefinition(String definition, Request request) { Definition retValue = null; retValue = getCustomDefinition(definition, request); if (retValue == null) { retValue = super.getDefinition(definition, request); } return retValue; } CachingTilesContainer(TilesContainer originalContainer);  CachingTilesContainer(TilesContainer originalContainer, String definitionsAttributeName); Definition getDefinition(String definition,
            Request request); @Override boolean isValidDefinition(String definition, Request request); @Override void register(Definition definition, Request request); @Override void render(String definition, Request request); }
CachingTilesContainer extends TilesContainerWrapper implements MutableTilesContainer { public Definition getDefinition(String definition, Request request) { Definition retValue = null; retValue = getCustomDefinition(definition, request); if (retValue == null) { retValue = super.getDefinition(definition, request); } return retValue; } CachingTilesContainer(TilesContainer originalContainer);  CachingTilesContainer(TilesContainer originalContainer, String definitionsAttributeName); Definition getDefinition(String definition,
            Request request); @Override boolean isValidDefinition(String definition, Request request); @Override void register(Definition definition, Request request); @Override void render(String definition, Request request);  }