TrialAppProperties implements AppProperties { @Override public List<String> getKnownProperties() { List<String> knownKeys = new ArrayList<>(); knownKeys.addAll(originalMap.keySet()); knownKeys.addAll(missingKeys); return knownKeys; } TrialAppProperties(Map<String, Object> values);  TrialAppProperties(Map<String, Object> values, List<String> missingKeys);  TrialAppProperties(); @Override List<String> getMissingProperties(); @Override List<String> getKnownProperties(); @Override boolean isValid(); @Override void clear(); @Override Object get(String key); @Override String toString();  }
@Test public void knownKeysIncludesAll() { TrialAppProperties props = new TrialAppProperties(Collections.singletonMap("key1", 12), Arrays.asList("missingKey")); assertThat(props.getKnownProperties(), hasItem("key1")); assertThat(props.getKnownProperties(), hasItem("missingKey")); }