### Question:
LightbendConfiguration implements Configuration { @Override public boolean exists(Property<?> property) { return api.hasPath(property.getKey()); } LightbendConfiguration(Config api); @Override @SuppressWarnings("unchecked") T get(Property<T> property, T defaultValue); @Override boolean exists(Property<?> property);  }### Answer:
@Test public void propertyExists() throws Exception { when(api.hasPath("test")).thenReturn(true); assertThat(config.exists(new StringProperty("test", ""))).isTrue(); }
@Test public void propertyNotExists() throws Exception { when(api.getString(anyString())).thenThrow(new ConfigException.BadPath("", "")); assertThat(config.exists(new StringProperty("test", ""))).isFalse(); }