diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandler.java
old mode 100644
new mode 100755
index 334d6a8..bd5f142
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandler.java
@@ -83,7 +83,7 @@
             return;
         }
 
-        if ((element.getRestarting() != null)
+        if ((element.getRestarting() == null)
                 && ((deployState != null && lockState != null) || (deployState == null && lockState == null))) {
             LOGGER.error("state error {} and {} cannot be handled", deployState, lockState);
             return;
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandlerTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandlerTest.java
old mode 100644
new mode 100755
index d7bc2e6..36c0c4b
--- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandlerTest.java
+++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionOutHandlerTest.java
@@ -20,6 +20,7 @@
 
 package org.onap.policy.clamp.acm.participant.intermediary.handler;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
@@ -49,8 +50,10 @@
 
         assertDoesNotThrow(
                 () -> acOutHandler.updateAutomationCompositionElementState(null, null, null, null, null, null));
+
         assertDoesNotThrow(() -> acOutHandler.updateAutomationCompositionElementState(UUID.randomUUID(),
                 UUID.randomUUID(), null, null, null, null));
+
         assertDoesNotThrow(() -> acOutHandler.updateAutomationCompositionElementState(UUID.randomUUID(),
                 UUID.randomUUID(), DeployState.DEPLOYED, null, null, null));
 
@@ -59,6 +62,10 @@
                 .thenReturn(automationComposition);
         assertDoesNotThrow(() -> acOutHandler.updateAutomationCompositionElementState(
                 automationComposition.getInstanceId(), UUID.randomUUID(), DeployState.DEPLOYED, null, null, null));
+
+        var elementId = automationComposition.getElements().values().iterator().next().getId();
+        assertDoesNotThrow(() -> acOutHandler.updateAutomationCompositionElementState(
+                automationComposition.getInstanceId(), elementId, null, null, null, null));
     }
 
     @Test
@@ -92,6 +99,23 @@
     }
 
     @Test
+    void updateAutomationCompositionElementStateRestartedTest() {
+        var publisher = mock(ParticipantMessagePublisher.class);
+        var cacheProvider = mock(CacheProvider.class);
+        var acOutHandler = new AutomationCompositionOutHandler(publisher, cacheProvider);
+
+        var automationComposition = CommonTestData.getTestAutomationCompositionMap().values().iterator().next();
+        when(cacheProvider.getAutomationComposition(automationComposition.getInstanceId()))
+                .thenReturn(automationComposition);
+        var element = automationComposition.getElements().values().iterator().next();
+        element.setRestarting(true);
+        acOutHandler.updateAutomationCompositionElementState(automationComposition.getInstanceId(), element.getId(),
+                DeployState.DEPLOYED, LockState.LOCKED, StateChangeResult.NO_ERROR, "Restarted");
+        verify(publisher).sendAutomationCompositionAck(any(AutomationCompositionDeployAck.class));
+        assertThat(element.getRestarting()).isNull();
+    }
+
+    @Test
     void updateAutomationCompositionElementStateDeleteTest() {
         var publisher = mock(ParticipantMessagePublisher.class);
         var cacheProvider = mock(CacheProvider.class);
