@Test @SuppressWarnings("unchecked") public void resolve_complex_with_list() throws Exception { Object complex = resolver.resolve("complex_with_list", Object.class); assertThat(complex).isInstanceOf(Map.class); assertThat(((Map<String, Object>) complex)).containsExactly( entry("subfield1", "text"), entry("subfield2", ImmutableMap.of("sublist", Arrays.asList("item 1", "item 2", "item 3.14")))); }
public <T> T resolve(String variableName, Class<T> clazz) { if (!resolver.containsProperty(variableName)) { throw new UnknownVariableException(variableName); } return resolver.getProperty(variableName, clazz); }
VariableResolver { public <T> T resolve(String variableName, Class<T> clazz) { if (!resolver.containsProperty(variableName)) { throw new UnknownVariableException(variableName); } return resolver.getProperty(variableName, clazz); } }
VariableResolver { public <T> T resolve(String variableName, Class<T> clazz) { if (!resolver.containsProperty(variableName)) { throw new UnknownVariableException(variableName); } return resolver.getProperty(variableName, clazz); } VariableResolver(PropertySource appVariables, PropertySource envTypeVariables, PropertySource envVariables, AlienContextVariables alienContextVariables);  VariableResolver(Properties appVariables, Properties envTypeVariables, Properties envVariables, AlienContextVariables alienContextVariables); }
VariableResolver { public <T> T resolve(String variableName, Class<T> clazz) { if (!resolver.containsProperty(variableName)) { throw new UnknownVariableException(variableName); } return resolver.getProperty(variableName, clazz); } VariableResolver(PropertySource appVariables, PropertySource envTypeVariables, PropertySource envVariables, AlienContextVariables alienContextVariables);  VariableResolver(Properties appVariables, Properties envTypeVariables, Properties envVariables, AlienContextVariables alienContextVariables); T resolve(String variableName, Class<T> clazz); String resolve(String variableName); }
VariableResolver { public <T> T resolve(String variableName, Class<T> clazz) { if (!resolver.containsProperty(variableName)) { throw new UnknownVariableException(variableName); } return resolver.getProperty(variableName, clazz); } VariableResolver(PropertySource appVariables, PropertySource envTypeVariables, PropertySource envVariables, AlienContextVariables alienContextVariables);  VariableResolver(Properties appVariables, Properties envTypeVariables, Properties envVariables, AlienContextVariables alienContextVariables); T resolve(String variableName, Class<T> clazz); String resolve(String variableName);  }