### Question:
FF4jConfiguration extends AbstractConfiguration { @Override public Iterator<String> getKeys(String prefix) { Set< String > setOfNames = ff4jStore().listPropertyNames(); Set< String > results = new HashSet<String>(); if (setOfNames != null && setOfNames.size() > 0) { for (String name : setOfNames) { if (name.startsWith(prefix)) { results.add(name); } } } return results.iterator(); } FF4jConfiguration();  FF4jConfiguration(PropertyStore ff4jPropertyStore); @Override Configuration subset(String prefix); @Override Properties getProperties(String key); @Override boolean isEmpty(); @Override boolean containsKey(String key); @Override void addProperty(String key, Object value); @SuppressWarnings("unchecked") @Override void setProperty(String key, Object value); @Override void clearProperty(String key); @Override void clear(); @Override Object getProperty(String key); @Override Iterator<String> getKeys(String prefix); @Override Iterator<String> getKeys(); @Override boolean getBoolean(String key); @Override Boolean getBoolean(String key, Boolean defaultValue); @Override boolean getBoolean(String key, boolean defaultValue); @Override byte getByte(String key); @Override byte getByte(String key, byte defaultValue); @Override Byte getByte(String key, Byte defaultValue); @Override double getDouble(String key); @Override double getDouble(String key, double defaultValue); @Override Double getDouble(String key, Double defaultValue); @Override float getFloat(String key); @Override float getFloat(String key, float defaultValue); @Override Float getFloat(String key, Float defaultValue); @Override int getInt(String key); @Override int getInt(String key, int defaultValue); @Override Integer getInteger(String key, Integer defaultValue); @Override long getLong(String key); @Override Long getLong(String key, Long defaultValue); @Override long getLong(String key, long defaultValue); @Override short getShort(String key); @Override short getShort(String key, short defaultValue); @Override Short getShort(String key, Short defaultValue); @Override BigDecimal getBigDecimal(String key); @Override BigDecimal getBigDecimal(String key, BigDecimal defaultValue); @Override BigInteger getBigInteger(String key); @Override BigInteger getBigInteger(String key, BigInteger defaultValue); @Override String getString(String key); @Override String getString(String key, String defaultValue); @Override List<Object> getList(String key); @Override List<Object> getList(String key, List<?> defaultValue); @Override String[] getStringArray(String key); PropertyStore ff4jStore(); PropertyStore getFf4jStore(); void setFf4jStore(PropertyStore ff4jStore);  }### Answer:
@Test public void testgetKeysNull() { InMemoryPropertyStore tmpStore = new InMemoryPropertyStore(); Configuration tmpConf = new FF4jConfiguration(tmpStore); Iterator<String> propsKeys = tmpConf.getKeys("z"); Assert.assertFalse(propsKeys.hasNext()); tmpStore.setProperties(null); Assert.assertFalse(tmpConf.getKeys().hasNext()); Assert.assertFalse(tmpConf.getKeys("z").hasNext()); }
@Test public void testgetKeys() { Assert.assertTrue(ff4jConf.containsKey("propInt")); Assert.assertTrue(ff4jConf.containsKey("propString")); Assert.assertTrue(ff4jConf.getKeys().hasNext()); Iterator<String> propsKeys = ff4jConf.getKeys("prop"); Assert.assertTrue(propsKeys.hasNext()); }