diff options
author | emartin <ephraim.martin@est.tech> | 2019-03-27 15:07:27 +0000 |
---|---|---|
committer | emartin <ephraim.martin@est.tech> | 2019-03-27 15:07:27 +0000 |
commit | 36605ed860a6eb7fca09156c6e8ae6ebf5259ea3 (patch) | |
tree | 1307af1e1536777a05055161ac79ff19510779f2 /src/test/java/org/onap | |
parent | a7da4421da0595dfadf6853f96b2d5f04ff35ec2 (diff) |
Enable MapperConfig to be reconfigurable
Change-Id: Ifa4a186e85cb85758d70a9eb5437d9893f236427
Issue-ID: DCAEGEN2-1357
Signed-off-by: emartin <ephraim.martin@est.tech>
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r-- | src/test/java/org/onap/dcaegen2/services/pmmapper/config/DynamicConfigurationTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/org/onap/dcaegen2/services/pmmapper/config/DynamicConfigurationTest.java b/src/test/java/org/onap/dcaegen2/services/pmmapper/config/DynamicConfigurationTest.java index 67510da..8840825 100644 --- a/src/test/java/org/onap/dcaegen2/services/pmmapper/config/DynamicConfigurationTest.java +++ b/src/test/java/org/onap/dcaegen2/services/pmmapper/config/DynamicConfigurationTest.java @@ -150,4 +150,20 @@ public class DynamicConfigurationTest { verify(configurable, times(1)).reconfigure(modifiedMapperConfig); } + + @Test + public void testMapperConfigReconfiguration() throws Exception { + ConfigHandler configHandler = new ConfigHandler(sender); + JsonObject modifiedConfigJson = new JsonParser().parse(config).getAsJsonObject(); + modifiedConfigJson.addProperty("dmaap_dr_delete_endpoint","http://modified-delete-endpoint/1"); + String newConfig = modifiedConfigJson.toString(); + + when(sender.send(any())).thenReturn(config,newConfig); + + MapperConfig originalConfig = configHandler.getMapperConfig(); + MapperConfig modifiedConfig = configHandler.getMapperConfig(); + + originalConfig.reconfigure(modifiedConfig); + assertEquals(originalConfig, modifiedConfig); + } } |