### Question:
PropertyExpressionResolver { public String resolveVariables(String str, Map<String, String> vars) { StrSubstitutor ss = new StrSubstitutor(vars); return ss.replace(str); }  @Nonnull List<NifiProperty> resolvePropertyExpressions(@Nullable final FeedMetadata metadata); List<NifiProperty> resolvePropertyExpressions(@Nullable final FeedMetadata metadata, List<NifiProperty> skip); List<NifiProperty> resolvePropertyExpressions(List<NifiProperty> properties, @Nullable final FeedMetadata metadata); List<NifiProperty> resolvePropertyExpressions(List<NifiProperty> properties, @Nullable final FeedMetadata metadata, List<NifiProperty> skip); Map<String, Object> getStaticConfigProperties(); List<AnnotatedFieldProperty> getMetadataProperties(); List<NifiProperty> resolveStaticProperties(@Nullable final List<NifiProperty> allProperties); boolean containsVariablesPatterns(String str); String resolveVariables(String str, Map<String, String> vars); String replaceAll(String str, String replacement); ResolvedVariables resolveVariables(String str, List<NifiProperty> properties); boolean isConfigProperty(NifiProperty property); static final String configPropertyPrefix; }### Answer:
@Test public void testResolveValues() { List<NifiProperty> props = new ArrayList<>(); props.add(newProperty("test.property", "${a}/${b} ")); props.add(newProperty("test.property2", "${a2}/${c} ")); props.add(newProperty("d", "fred")); props.add(newProperty("a", "${b} ")); props.add(newProperty("b", "${c}")); props.add(newProperty("c", "${d}")); PropertyExpressionResolver.ResolvedVariables variables = resolver.resolveVariables("${a} - ${b} - ${test.property2}", props); Assert.assertEquals("fred - fred - ${a2}/fred", variables.getResolvedString()); Map<String, String> resolvedVariables = variables.getResolvedVariables(); Assert.assertEquals("fred", resolvedVariables.get("a")); Assert.assertEquals("fred", resolvedVariables.get("b")); Assert.assertEquals("fred", resolvedVariables.get("c")); Assert.assertEquals("fred", resolvedVariables.get("d")); Assert.assertEquals("${a2}/fred", resolvedVariables.get("test.property2")); Assert.assertEquals(5, resolvedVariables.size()); System.out.println(resolvedVariables); }