+
+ }
+
+ @Test
+ public void testRefuseToUpdatePolicy() throws Exception {
+ // Test that only the json can be changed for a already created policy
+ // In this case service is attempted to be changed
+ reset();
+ this.addRic("ric1").setState(Ric.RicState.IDLE);
+ this.addRic("ricXXX").setState(Ric.RicState.IDLE);
+
+ this.addPolicy("instance1", "type1", "service1", "ric1");
+ String urlWrongRic = baseUrl() + "/policy?type=type1&instance=instance1&ric=ricXXX&service=service1";
+ this.restTemplate.put(urlWrongRic, createJsonHttpEntity(jsonString()));
+ Policy policy = policies.getPolicy("instance1");
+ assertThat(policy.ric().name()).isEqualTo("ric1"); // Not changed