### Question:
TemplateVariables { Map<String, String> getFigureVariables() { final Set<String> propertyNames = properties.stringPropertyNames(); final HashMap<String, String> resultMap = new HashMap<>(); for (final String propertyName : propertyNames) { if (isFigureProperty(propertyName)) { extractProperty(resultMap, propertyName); } } return resultMap; } TemplateVariables();   }### Answer:
@Test public void testGetFigureVariables() throws IOException { final String properties = "figure.one=a_valid_figure\n" + "strange.key=somethingElse\n" + "figure.second=another_figure"; final ByteArrayInputStream inputStream = new ByteArrayInputStream(properties.getBytes()); variables.load(inputStream); final Map<String, String> figureVariables = variables.getFigureVariables(); assertEquals(2, figureVariables.size()); assertEquals("a_valid_figure", figureVariables.get("figure.one")); assertEquals("another_figure", figureVariables.get("figure.second")); }