Implement validation and hierarchical get
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / authorative / provider / AuthorativeToscaProviderPolicyTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019-2020 Nordix Foundation.
4  *  Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.models.tosca.authorative.provider;
23
24 import static org.assertj.core.api.Assertions.assertThatThrownBy;
25 import static org.junit.Assert.assertEquals;
26 import static org.junit.Assert.assertNotNull;
27 import static org.junit.Assert.assertTrue;
28
29 import java.util.ArrayList;
30 import java.util.List;
31 import java.util.Map;
32 import java.util.Properties;
33
34 import org.eclipse.persistence.config.PersistenceUnitProperties;
35 import org.junit.After;
36 import org.junit.Before;
37 import org.junit.Test;
38 import org.onap.policy.common.utils.coder.CoderException;
39 import org.onap.policy.common.utils.coder.StandardCoder;
40 import org.onap.policy.common.utils.resources.ResourceUtils;
41 import org.onap.policy.models.base.PfConceptKey;
42 import org.onap.policy.models.base.PfModelException;
43 import org.onap.policy.models.dao.DaoParameters;
44 import org.onap.policy.models.dao.PfDao;
45 import org.onap.policy.models.dao.PfDaoFactory;
46 import org.onap.policy.models.dao.impl.DefaultPfDao;
47 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
48 import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyFilter;
49 import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
50 import org.onap.policy.models.tosca.authorative.concepts.ToscaTopologyTemplate;
51 import org.yaml.snakeyaml.Yaml;
52
53 /**
54  * Test of the {@link AuthorativeToscaProvider} class.
55  *
56  * @author Liam Fallon (liam.fallon@est.tech)
57  */
58 public class AuthorativeToscaProviderPolicyTest {
59     private static final String VERSION = "version";
60     private static final String VCPE_JSON = "policies/vCPE.policy.monitoring.input.tosca.json";
61     private static final String POLICY_AND_VERSION = "onap.restart.tca:1.0.0";
62     private static final String POLICY1 = "onap.restart.tca";
63     private static final String DAO_IS_NULL = "^dao is marked .*on.*ull but is null$";
64     private static final String VERSION_100 = "1.0.0";
65     private PfDao pfDao;
66     private StandardCoder standardCoder;
67
68     /**
69      * Set up the DAO towards the database.
70      *
71      * @throws Exception on database errors
72      */
73     @Before
74     public void setupDao() throws Exception {
75         final DaoParameters daoParameters = new DaoParameters();
76         daoParameters.setPluginClass(DefaultPfDao.class.getName());
77
78         daoParameters.setPersistenceUnit("ToscaConceptTest");
79
80         Properties jdbcProperties = new Properties();
81         jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_USER, "policy");
82         jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_PASSWORD, "P01icY");
83
84         // H2, use "org.mariadb.jdbc.Driver" and "jdbc:mariadb://localhost:3306/policy" for locally installed MariaDB
85         jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.h2.Driver");
86         jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:h2:mem:testdb");
87
88         daoParameters.setJdbcProperties(jdbcProperties);
89
90         pfDao = new PfDaoFactory().createPfDao(daoParameters);
91         pfDao.init(daoParameters);
92     }
93
94     /**
95      * Set up GSON.
96      */
97     @Before
98     public void setupGson() {
99         standardCoder = new StandardCoder();
100     }
101
102     @After
103     public void teardown() {
104         pfDao.close();
105     }
106
107     @Test
108     public void testPoliciesGet() throws Exception {
109         assertThatThrownBy(() -> {
110             new AuthorativeToscaProvider().getPolicies(null, null, null);
111         }).hasMessageMatching(DAO_IS_NULL);
112
113         assertThatThrownBy(() -> {
114             new AuthorativeToscaProvider().getPolicyList(null, null, null);
115         }).hasMessageMatching(DAO_IS_NULL);
116
117         createPolicyTypes();
118
119         ToscaServiceTemplate toscaServiceTemplate =
120                 standardCoder.decode(ResourceUtils.getResourceAsString(VCPE_JSON), ToscaServiceTemplate.class);
121
122         assertNotNull(toscaServiceTemplate);
123         ToscaServiceTemplate createdServiceTemplate =
124                 new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
125
126         PfConceptKey policyKey = new PfConceptKey(POLICY_AND_VERSION);
127
128         ToscaPolicy beforePolicy =
129                 toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
130         ToscaPolicy createdPolicy =
131                 createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
132         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
133         assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
134
135         ToscaServiceTemplate gotServiceTemplate =
136                 new AuthorativeToscaProvider().getPolicies(pfDao, policyKey.getName(), policyKey.getVersion());
137
138         ToscaPolicy gotPolicy =
139                 gotServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
140         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicy));
141         assertTrue(beforePolicy.getType().equals(gotPolicy.getType()));
142
143         List<ToscaPolicy> gotPolicyList = new AuthorativeToscaProvider().getPolicyList(pfDao, POLICY1, VERSION_100);
144         assertEquals(1, gotPolicyList.size());
145         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
146
147         gotPolicyList = new AuthorativeToscaProvider().getPolicyList(pfDao, POLICY1, null);
148         assertEquals(1, gotPolicyList.size());
149         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
150
151         gotPolicyList = new AuthorativeToscaProvider().getPolicyList(pfDao, null, null);
152         assertEquals(1, gotPolicyList.size());
153         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
154
155         gotPolicyList = new AuthorativeToscaProvider().getPolicyList(pfDao, null, VERSION_100);
156         assertEquals(1, gotPolicyList.size());
157         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
158
159         assertTrue(new AuthorativeToscaProvider().getPolicyList(pfDao, "Nonexistant", VERSION_100).isEmpty());
160     }
161
162     @Test
163     public void testPoliciesGetFiltered() throws Exception {
164         assertThatThrownBy(() -> {
165             new AuthorativeToscaProvider().getFilteredPolicies(null, null);
166         }).hasMessageMatching(DAO_IS_NULL);
167
168         assertThatThrownBy(() -> {
169             new AuthorativeToscaProvider().getFilteredPolicies(null, ToscaPolicyFilter.builder().build());
170         }).hasMessageMatching(DAO_IS_NULL);
171
172         assertThatThrownBy(() -> {
173             new AuthorativeToscaProvider().getFilteredPolicies(pfDao, null);
174         }).hasMessageMatching("^filter is marked .*on.*ull but is null$");
175
176         assertThatThrownBy(() -> {
177             new AuthorativeToscaProvider().getFilteredPolicyList(null, null);
178         }).hasMessageMatching(DAO_IS_NULL);
179
180         assertThatThrownBy(() -> {
181             new AuthorativeToscaProvider().getFilteredPolicyList(null, ToscaPolicyFilter.builder().build());
182         }).hasMessageMatching(DAO_IS_NULL);
183
184         assertThatThrownBy(() -> {
185             new AuthorativeToscaProvider().getFilteredPolicyList(pfDao, null);
186         }).hasMessageMatching("^filter is marked .*on.*ull but is null$");
187
188         createPolicyTypes();
189
190         ToscaServiceTemplate toscaServiceTemplate =
191                 standardCoder.decode(ResourceUtils.getResourceAsString(VCPE_JSON), ToscaServiceTemplate.class);
192
193         assertNotNull(toscaServiceTemplate);
194         ToscaServiceTemplate createdServiceTemplate =
195                 new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
196
197         PfConceptKey policyKey = new PfConceptKey(POLICY_AND_VERSION);
198
199         ToscaPolicy beforePolicy =
200                 toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
201         ToscaPolicy createdPolicy =
202                 createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
203         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
204         assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
205
206         ToscaServiceTemplate gotServiceTemplate =
207                 new AuthorativeToscaProvider().getFilteredPolicies(pfDao, ToscaPolicyFilter.builder().build());
208
209         ToscaPolicy gotPolicy =
210                 gotServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
211         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicy));
212         assertTrue(beforePolicy.getType().equals(gotPolicy.getType()));
213
214         gotServiceTemplate = new AuthorativeToscaProvider().getFilteredPolicies(pfDao,
215                 ToscaPolicyFilter.builder().name(policyKey.getName()).build());
216
217         gotPolicy = gotServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
218         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicy));
219         assertTrue(beforePolicy.getType().equals(gotPolicy.getType()));
220
221         gotServiceTemplate = new AuthorativeToscaProvider().getFilteredPolicies(pfDao,
222                 ToscaPolicyFilter.builder().name(policyKey.getName()).version(VERSION_100).build());
223
224         gotPolicy = gotServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
225         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicy));
226         assertTrue(beforePolicy.getType().equals(gotPolicy.getType()));
227
228         List<ToscaPolicy> gotPolicyList = new AuthorativeToscaProvider().getPolicyList(pfDao, POLICY1, VERSION_100);
229         assertEquals(1, gotPolicyList.size());
230         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
231
232         gotPolicyList =
233                 new AuthorativeToscaProvider().getFilteredPolicyList(pfDao, ToscaPolicyFilter.builder().build());
234         assertEquals(1, gotPolicyList.size());
235         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
236
237         gotPolicyList = new AuthorativeToscaProvider().getFilteredPolicyList(pfDao,
238                 ToscaPolicyFilter.builder().name(policyKey.getName()).build());
239         assertEquals(1, gotPolicyList.size());
240         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
241
242         gotPolicyList = new AuthorativeToscaProvider().getFilteredPolicyList(pfDao,
243                 ToscaPolicyFilter.builder().name(policyKey.getName()).version(VERSION_100).build());
244         assertEquals(1, gotPolicyList.size());
245         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, gotPolicyList.get(0)));
246     }
247
248     @Test
249     public void testPolicyCreate() throws Exception {
250         assertThatThrownBy(() -> {
251             new AuthorativeToscaProvider().createPolicies(null, null);
252         }).hasMessageMatching(DAO_IS_NULL);
253
254         assertThatThrownBy(() -> {
255             new AuthorativeToscaProvider().createPolicies(null, new ToscaServiceTemplate());
256         }).hasMessageMatching(DAO_IS_NULL);
257
258         assertThatThrownBy(() -> {
259             new AuthorativeToscaProvider().createPolicies(pfDao, null);
260         }).hasMessageMatching("^serviceTemplate is marked .*on.*ull but is null$");
261
262         createPolicyTypes();
263
264         ToscaServiceTemplate toscaServiceTemplate =
265                 standardCoder.decode(ResourceUtils.getResourceAsString(VCPE_JSON), ToscaServiceTemplate.class);
266
267         assertNotNull(toscaServiceTemplate);
268         ToscaServiceTemplate createdServiceTemplate =
269                 new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
270
271         PfConceptKey policyKey = new PfConceptKey(POLICY_AND_VERSION);
272
273         ToscaPolicy beforePolicy =
274                 toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
275         ToscaPolicy createdPolicy =
276                 createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
277         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
278         assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
279     }
280
281     @Test
282     public void testPolicyUpdate() throws Exception {
283         assertThatThrownBy(() -> {
284             new AuthorativeToscaProvider().createPolicies(null, null);
285         }).hasMessageMatching(DAO_IS_NULL);
286
287         assertThatThrownBy(() -> {
288             new AuthorativeToscaProvider().updatePolicies(null, null);
289         }).hasMessageMatching(DAO_IS_NULL);
290
291         assertThatThrownBy(() -> {
292             new AuthorativeToscaProvider().updatePolicies(null, new ToscaServiceTemplate());
293         }).hasMessageMatching(DAO_IS_NULL);
294
295         assertThatThrownBy(() -> {
296             new AuthorativeToscaProvider().updatePolicies(pfDao, null);
297         }).hasMessageMatching("^serviceTemplate is marked .*on.*ull but is null$");
298
299         createPolicyTypes();
300
301         ToscaServiceTemplate toscaServiceTemplate =
302                 standardCoder.decode(ResourceUtils.getResourceAsString(VCPE_JSON), ToscaServiceTemplate.class);
303
304         assertNotNull(toscaServiceTemplate);
305         ToscaServiceTemplate createdServiceTemplate =
306                 new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
307
308         PfConceptKey policyKey = new PfConceptKey(POLICY_AND_VERSION);
309
310         ToscaPolicy beforePolicy =
311                 toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
312         ToscaPolicy createdPolicy =
313                 createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
314         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
315         assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
316
317         ToscaServiceTemplate updatedServiceTemplate =
318                 new AuthorativeToscaProvider().updatePolicies(pfDao, toscaServiceTemplate);
319
320         ToscaPolicy updatedPolicy =
321                 updatedServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
322         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, updatedPolicy));
323         assertTrue(beforePolicy.getType().equals(updatedPolicy.getType()));
324     }
325
326     @Test
327     public void testPoliciesDelete() throws Exception {
328         assertThatThrownBy(() -> {
329             new AuthorativeToscaProvider().deletePolicy(null, null, null);
330         }).hasMessageMatching(DAO_IS_NULL);
331
332         assertThatThrownBy(() -> {
333             new AuthorativeToscaProvider().deletePolicy(null, null, VERSION);
334         }).hasMessageMatching(DAO_IS_NULL);
335
336         assertThatThrownBy(() -> {
337             new AuthorativeToscaProvider().deletePolicy(null, "name", null);
338         }).hasMessageMatching(DAO_IS_NULL);
339
340         assertThatThrownBy(() -> {
341             new AuthorativeToscaProvider().deletePolicy(null, "name", VERSION);
342         }).hasMessageMatching(DAO_IS_NULL);
343
344         assertThatThrownBy(() -> {
345             new AuthorativeToscaProvider().deletePolicy(pfDao, null, null);
346         }).hasMessageMatching("^name is marked .*on.*ull but is null$");
347
348         assertThatThrownBy(() -> {
349             new AuthorativeToscaProvider().deletePolicy(pfDao, null, VERSION);
350         }).hasMessageMatching("^name is marked .*on.*ull but is null$");
351
352         assertThatThrownBy(() -> {
353             new AuthorativeToscaProvider().deletePolicy(pfDao, "name", null);
354         }).hasMessageMatching("^version is marked .*on.*ull but is null$");
355
356         createPolicyTypes();
357
358         ToscaServiceTemplate toscaServiceTemplate =
359                 standardCoder.decode(ResourceUtils.getResourceAsString(VCPE_JSON), ToscaServiceTemplate.class);
360
361         assertNotNull(toscaServiceTemplate);
362         ToscaServiceTemplate createdServiceTemplate =
363                 new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
364
365         PfConceptKey policyKey = new PfConceptKey(POLICY_AND_VERSION);
366
367         ToscaPolicy beforePolicy =
368                 toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
369         ToscaPolicy createdPolicy =
370                 createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
371         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
372         assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
373
374         ToscaServiceTemplate deletedServiceTemplate =
375                 new AuthorativeToscaProvider().deletePolicy(pfDao, policyKey.getName(), policyKey.getVersion());
376
377         ToscaPolicy deletedPolicy =
378                 deletedServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
379         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
380         assertTrue(beforePolicy.getType().equals(deletedPolicy.getType()));
381
382         // @formatter:off
383         assertThatThrownBy(
384             () -> new AuthorativeToscaProvider().getPolicies(pfDao, policyKey.getName(), policyKey.getVersion()))
385                     .hasMessageMatching("policies for onap.restart.tca:1.0.0 do not exist");
386         // @formatter:on
387     }
388
389     @Test
390     public void testAssertPoliciesExist() {
391         ToscaServiceTemplate testServiceTemplate = new ToscaServiceTemplate();
392
393         assertThatThrownBy(() -> {
394             new AuthorativeToscaProvider().deletePolicy(pfDao, "name", null);
395         }).hasMessageMatching("^version is marked .*on.*ull but is null$");
396
397         assertThatThrownBy(() -> {
398             new AuthorativeToscaProvider().createPolicies(pfDao, testServiceTemplate);
399         }).hasMessage("topology template not specified on service template");
400
401         testServiceTemplate.setToscaTopologyTemplate(new ToscaTopologyTemplate());
402         assertThatThrownBy(() -> {
403             new AuthorativeToscaProvider().createPolicies(pfDao, testServiceTemplate);
404         }).hasMessage("no policies specified on topology template of service template");
405
406         testServiceTemplate.getToscaTopologyTemplate().setPolicies(new ArrayList<>());
407         assertThatThrownBy(() -> {
408             new AuthorativeToscaProvider().createPolicies(pfDao, testServiceTemplate);
409         }).hasMessage("An incoming list of concepts must have at least one entry");
410     }
411
412     @Test
413     public void testEntityMaps() throws CoderException, PfModelException {
414         Object yamlObject = new Yaml().load(
415                 ResourceUtils.getResourceAsString("policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml"));
416         String yamlAsJsonString = new StandardCoder().encode(yamlObject);
417
418         ToscaServiceTemplate toscaServiceTemplatePolicyType =
419                 standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class);
420
421         assertNotNull(toscaServiceTemplatePolicyType);
422         new AuthorativeToscaProvider().createPolicyTypes(pfDao, toscaServiceTemplatePolicyType);
423
424         assertEquals(3, toscaServiceTemplatePolicyType.getDataTypesAsMap().size());
425         assertEquals(2, toscaServiceTemplatePolicyType.getPolicyTypesAsMap().size());
426
427         ToscaServiceTemplate toscaServiceTemplate = standardCoder.decode(
428                 ResourceUtils.getResourceAsString("policies/vCPE.policy.monitoring.input.tosca.json"),
429                 ToscaServiceTemplate.class);
430
431         assertNotNull(toscaServiceTemplate);
432         ToscaServiceTemplate createdServiceTemplate =
433                 new AuthorativeToscaProvider().createPolicies(pfDao, toscaServiceTemplate);
434
435         PfConceptKey policyKey = new PfConceptKey("onap.restart.tca:1.0.0");
436
437         ToscaPolicy beforePolicy =
438                 toscaServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
439         ToscaPolicy createdPolicy =
440                 createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0).get(policyKey.getName());
441         assertEquals(0, beforePolicy.compareNameVersion(beforePolicy, createdPolicy));
442         assertTrue(beforePolicy.getType().equals(createdPolicy.getType()));
443
444         assertEquals(1, toscaServiceTemplate.getToscaTopologyTemplate().getPoliciesAsMap().size());
445         assertEquals(1, createdServiceTemplate.getToscaTopologyTemplate().getPoliciesAsMap().size());
446
447         Map<String, ToscaPolicy> policyMapItem = createdServiceTemplate.getToscaTopologyTemplate().getPolicies().get(0);
448         createdServiceTemplate.getToscaTopologyTemplate().getPolicies().add(policyMapItem);
449
450         assertThatThrownBy(() -> {
451             createdServiceTemplate.getToscaTopologyTemplate().getPoliciesAsMap();
452         }).hasMessageContaining("list of map of entities contains more than one entity with key");
453     }
454
455     private void createPolicyTypes() throws CoderException, PfModelException {
456         Object yamlObject = new Yaml().load(
457                 ResourceUtils.getResourceAsString("policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app.yaml"));
458         String yamlAsJsonString = new StandardCoder().encode(yamlObject);
459
460         ToscaServiceTemplate toscaServiceTemplatePolicyType =
461                 standardCoder.decode(yamlAsJsonString, ToscaServiceTemplate.class);
462
463         assertNotNull(toscaServiceTemplatePolicyType);
464         new AuthorativeToscaProvider().createPolicyTypes(pfDao, toscaServiceTemplatePolicyType);
465     }
466 }