public <T> void resolve(T resolvable) {
        ParamResolver resolver = this;
        if (ParamScope.class.isAssignableFrom(resolvable.getClass())) {
            ParamScope newScope = (ParamScope) resolvable;
            resolver = newScope.applyOver(resolver);
        }
        resolveStringLeaves(resolvable, resolver);
        resolveNonStringLeaves(resolvable, resolver);
        resolveNodes(resolvable, resolver);
    }
@Test
    public void shouldErrorOutIfCannotResolveParamForP4View() {
        P4MaterialConfig p4MaterialConfig = p4("server:port", "#");
        new ParamResolver(new ParamSubstitutionHandlerFactory(params(param("foo", "pavan"), param("bar", "jj"))), fieldCache).resolve(p4MaterialConfig);
        assertThat(p4MaterialConfig.getP4MaterialView().errors().on(P4MaterialConfig.VIEW), is("Error when processing params for '#' used in field 'view', # must be followed by a parameter pattern or escaped by another #"));
    }