### Question:
PropertiesImpl implements Properties { @Override public Optional<Property> getPropertyWithKey(String key) { return findFirstResult(properties, p -> p.getPropertyWithKey(key)); }  static Properties flat(List<Properties> properties); @Override Properties resolveBy(Resolver resolver); @Override Properties withoutVars(); @Override Properties without(Predicate<Property> excluded); @Override Properties withPrefix(String prefix); @Override Map<String, Property> getPropertiesAsMap(); @Override Map<String, String> getPropertiesAsKeyValue(); @Override Collection<Property> getProperties(); @Override Optional<Property> getPropertyWithKey(String key); @Override List<T> save(PropertySerializer<T> serializer); @Override List<TypedProperties> asTypedProperties(); @Override TypedProperties first(); @Override Properties forEachComponent(UnaryOperator<TypedProperties> callback);  }### Answer:
@Test void getPropertyWithKey() { Property p1 = getProperty(1); when(tp2.getPropertyWithKey("key1")).thenReturn(Optional.of(p1)); assertEquals(Optional.of(p1), subj.getPropertyWithKey("key1")); assertEquals(Optional.empty(), subj.getPropertyWithKey("key4")); }