PipelineFunctionParameterResolverFactory { static SingleParameterResolver forStringParameter() { return STRING_PARAMETER_RESOLVER; } private  PipelineFunctionParameterResolverFactory();   }
@Test public void singleStringResolverThrowsExceptionIfNotResolvable() { final PipelineFunctionParameterResolverFactory.SingleParameterResolver stringResolver = PipelineFunctionParameterResolverFactory.forStringParameter(); final String stringPlaceholder = "( " + KNOWN_PLACEHOLDER + " )"; assertThatExceptionOfType(PlaceholderFunctionSignatureInvalidException.class) .isThrownBy(() -> stringResolver.apply(stringPlaceholder, expressionResolver, DUMMY)); verifyNoInteractions(expressionResolver); }
@Test public void singleStringResolverDoesNotResolvePlaceholders() { final PipelineFunctionParameterResolverFactory.SingleParameterResolver stringResolver = PipelineFunctionParameterResolverFactory.forStringParameter(); final String stringSingle = "(\'" + KNOWN_VALUE + "\')"; final String stringDouble = "(\"" + KNOWN_VALUE + "\")"; final String stringPlaceholder = "(" + KNOWN_PLACEHOLDER + ")"; assertThat(stringResolver.apply(stringSingle, expressionResolver, DUMMY)).contains(KNOWN_VALUE); assertThat(stringResolver.apply(stringDouble, expressionResolver, DUMMY)).contains(KNOWN_VALUE); assertThatExceptionOfType(PlaceholderFunctionSignatureInvalidException.class) .isThrownBy(() -> stringResolver.apply(stringPlaceholder, expressionResolver, DUMMY)); verifyNoInteractions(expressionResolver); }