in core/src/main/java/org/apache/sling/testing/mock/osgi/MockOsgi.java [439:451]
private static void setConfigForPid(@NotNull BundleContext bundleContext, @NotNull String pid, @Nullable Dictionary<String, Object> properties) {
ConfigurationAdmin configAdmin = getConfigAdmin(bundleContext);
if (configAdmin == null) {
throw new RuntimeException("ConfigurationAdmin service is not registered in bundle context.");
}
try {
Configuration config = configAdmin.getConfiguration(pid);
config.update(properties);
}
catch (IOException ex) {
throw new RuntimeException("Unable to update configuration for pid '" + pid + "'.", ex);
}
}