### Question:
AmbariTProxyConfigurationProvider extends AmbariServerConfigurationProvider<AmbariTProxyConfiguration> { @Override protected AmbariTProxyConfiguration loadInstance(Collection<AmbariConfigurationEntity> configurationEntities) { return new AmbariTProxyConfiguration(toProperties(configurationEntities)); } @Inject  AmbariTProxyConfigurationProvider(AmbariEventPublisher ambariEventPublisher, GuiceJpaInitializer guiceJpaInitializer);   }### Answer:
@Test public void testLoadInstance() { AmbariTProxyConfigurationProvider provider = new AmbariTProxyConfigurationProvider(null, null); Map<String, String> expectedProperties = new HashMap<>(); expectedProperties.put(TPROXY_AUTHENTICATION_ENABLED.key(), "true"); expectedProperties.put("ambari.tproxy.proxyuser.knox.hosts", "c7401.ambari.apache.org"); expectedProperties.put("ambari.tproxy.proxyuser.knox.users", "*"); expectedProperties.put("ambari.tproxy.proxyuser.knox.groups", "users"); AmbariTProxyConfiguration instance = provider.loadInstance(createAmbariConfigurationEntities(expectedProperties)); Assert.assertNotNull(instance); Assert.assertNotSame(expectedProperties, instance.toMap()); Assert.assertEquals(expectedProperties, instance.toMap()); Assert.assertTrue(instance.isEnabled()); Assert.assertEquals(expectedProperties.get("ambari.tproxy.proxyuser.knox.hosts"), instance.getAllowedHosts("knox")); Assert.assertEquals(expectedProperties.get("ambari.tproxy.proxyuser.knox.users"), instance.getAllowedUsers("knox")); Assert.assertEquals(expectedProperties.get("ambari.tproxy.proxyuser.knox.groups"), instance.getAllowedGroups("knox")); }