### Question:
ServiceEnvironmentImpl implements ServiceEnvironment { @Override public Configuration getConfiguration() { return conf; } ServiceEnvironmentImpl(ServerContext ctx); @Override Configuration getConfiguration(); @Override Configuration getConfiguration(TableId tableId); @Override String getTableName(TableId tableId); @Override T instantiate(String className, Class<T> base); @Override T instantiate(TableId tableId, String className, Class<T> base);  }### Answer:
@Test public void getWithRecognizedPrefixTest() { String prefix = Property.RPC_PREFIX.getKey(); Map<String,String> expectedPropertyMap = Map.of("rpc.javax.net.ssl.keyStoreType", "jks"); expect(acfg.getAllPropertiesWithPrefix(Property.RPC_PREFIX)).andReturn(expectedPropertyMap); replay(acfg); Map<String,String> returnedProperties = serviceEnvironment.getConfiguration().getWithPrefix(prefix); assertEquals(expectedPropertyMap, returnedProperties); }
@Test public void getWithUnrecognizedPrefixTest() { String prefix = "a.b"; Map<String,String> expectedPropertyMap = Map.of("a.b.favorite.license", "apache"); expect(acfg.spliterator()).andReturn(expectedPropertyMap.entrySet().spliterator()); replay(acfg); Map<String,String> returnedProperties = serviceEnvironment.getConfiguration().getWithPrefix(prefix); assertEquals(expectedPropertyMap, returnedProperties); }