+ @Test
+ void testProcessComponentInstanceInterfaces() {
+ Service service = createServiceObject(true);
+ service.setModel("testModel");
+ Map<String, Map<String, InterfaceDefinition>> instInterfaces = new HashMap<>();
+ UploadComponentInstanceInfo uploadComponentInstanceInfo = new UploadComponentInstanceInfo();
+ uploadComponentInstanceInfo.setInterfaces(getInterfaces());
+ ComponentInstance currentCompInstance = new ComponentInstance();
+ Resource originResource = createParseResourceObject(false);
+ Assertions.assertNotNull(originResource);
+
+ InterfaceDefinition interfaceDef = new InterfaceDefinition();
+ interfaceDef.setUniqueId("tosca.interfaces.lifecycle.TestInterface");
+ Map<String, InterfaceDefinition> interfaceLifecycleTypes = new HashMap<>();
+ interfaceLifecycleTypes.put("tosca.interfaces.lifecycle.TestInterface", interfaceDef);
+ when(interfaceLifecycleTypeOperation.getAllInterfaceLifecycleTypes("testModel")).thenReturn(Either.left(interfaceLifecycleTypes));
+
+ sIBL.addInterfaceValuesToRi(uploadComponentInstanceInfo, service, originResource, currentCompInstance, instInterfaces);
+ }
+
+ @Test
+ void testProcessComponentInstanceInterfaces_null() {
+ Service service = createServiceObject(true);
+ Map<String, Map<String, InterfaceDefinition>> instInterfaces = new HashMap<>();
+ UploadComponentInstanceInfo uploadComponentInstanceInfo = new UploadComponentInstanceInfo();
+ ComponentInstance currentCompInstance = new ComponentInstance();
+ Resource originResource = createParseResourceObject(false);
+ Assertions.assertNotNull(originResource);
+ sIBL.addInterfaceValuesToRi(uploadComponentInstanceInfo, service, originResource, currentCompInstance, instInterfaces);
+ }
+