### Question:
LogicalForm implements Comparable<LogicalForm> { public List<String> fields(){ return fields; } LogicalForm(Derivation derivation, Map<String, Object> map); int fieldCount(); Map<String, Object> getMap(); Derivation getDerivation(); boolean match(Map<String, Object> map); List<String> fields(); void updateScore(Map<String, Float> weights); @Override String toString(); @Override int compareTo(LogicalForm o);  }### Answer:
@Test void fields() { Map<String, Object> map = new HashMap<String, Object>(){{ put("a", 1); put("b", 2); put("c", new HashMap<String, Object>(){{ put("d", 4); put("e", new HashMap<String, Object>(){{ put("f", 5); }}); }}); }}; List<String> expected = Arrays.asList( "a", "b", "c", "c:d", "c:e", "c:e:f" ); assertEquals(expected, LogicalForm.fields(map)); }