Просмотр исходного кода

Bind default interface to Statechart.

markus.muehlbrandt@itemis.de 14 лет назад
Родитель
Сommit
31d7c2e341
27 измененных файлов с 1008 добавлено и 468 удалено
  1. 14 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/extensions/JavaExtensions.java
  2. 97 30
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomCycleBasedStatemachine.xpt
  3. 0 1
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomInterfaceImpl.xpt
  4. 8 1
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/ExecutionModelExtensions.ext
  5. 6 0
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/Naming.ext
  6. 55 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestCycleBasedStatemachine.java
  7. 54 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryCycleBasedStatemachine.java
  8. 73 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionCycleBasedStatemachine.java
  9. 99 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyCycleBasedStatemachine.java
  10. 58 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsCycleBasedStatemachine.java
  11. 92 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsCycleBasedStatemachine.java
  12. 50 0
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryCycleBasedStatemachine.java
  13. 52 1
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionCycleBasedStatemachine.java
  14. 6 9
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryCycleBasedStatemachine.java
  15. 7 10
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryEventBasedStatemachine.java
  16. 44 44
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestExpressionCycleBasedStatemachine.java
  17. 37 37
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestExpressionEventBasedStatemachine.java
  18. 82 113
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestHierarchyCycleBasedStatemachine.java
  19. 61 89
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestHierarchyEventBasedStatemachine.java
  20. 21 26
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestCycleBasedStatemachine.java
  21. 17 17
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestEventBasedStatemachine.java
  22. 18 19
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsCycleBasedStatemachine.java
  23. 19 20
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsEventBasedStatemachine.java
  24. 10 12
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsCycleBasedStatemachine.java
  25. 10 11
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsEventBasedStatemachine.java
  26. 9 12
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestShallowHistoryCycleBasedStatemachine.java
  27. 9 12
      test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestShallowHistoryEventBasedStatemachine.java

+ 14 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/extensions/JavaExtensions.java

@@ -11,6 +11,7 @@ import org.yakindu.sct.model.sgraph.Event;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.stext.stext.Direction;
 import org.yakindu.sct.model.stext.stext.Direction;
 import org.yakindu.sct.model.stext.stext.EventDefinition;
 import org.yakindu.sct.model.stext.stext.EventDefinition;
+import org.yakindu.sct.model.stext.stext.InterfaceScope;
 
 
 public class JavaExtensions implements IJavaFeatureConstants {
 public class JavaExtensions implements IJavaFeatureConstants {
 
 
@@ -22,6 +23,10 @@ public class JavaExtensions implements IJavaFeatureConstants {
 		if (hasGenericInterfaceSupport(entry)) {
 		if (hasGenericInterfaceSupport(entry)) {
 			interfaces += "IGenericAccessStatemachine, ";
 			interfaces += "IGenericAccessStatemachine, ";
 		}
 		}
+		
+		if (hasDefaultInterface(flow)) {
+			interfaces += "DefaultInterface,";
+		}
 
 
 		if (isTimedStatemachine(flow)) {
 		if (isTimedStatemachine(flow)) {
 			interfaces += "ITimedStatemachine";
 			interfaces += "ITimedStatemachine";
@@ -115,4 +120,13 @@ public class JavaExtensions implements IJavaFeatureConstants {
 		}
 		}
 		return false;
 		return false;
 	}
 	}
+	
+	private static final boolean hasDefaultInterface(ExecutionFlow flow) {
+		for (Scope scope: flow.getScopes()) {
+			if (scope instanceof InterfaceScope && ((InterfaceScope) scope).getName() == null) {
+				return true;
+			}
+		}
+		return false;
+	}
 }
 }

+ 97 - 30
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomCycleBasedStatemachine.xpt

@@ -217,6 +217,95 @@ else {
 	«ENDIF-»
 	«ENDIF-»
 «ENDDEFINE»
 «ENDDEFINE»
 
 
+«DEFINE InternalScopeMethods FOR ExecutionFlow »
+	«FOREACH getInternalScopeEvents() AS event-»
+	
+		«IF !event.type.isVoid()-»
+			private void raise«event.name.toFirstUpper()»(«event.type.getJavaType()» value) {
+				«event.getName()».setValue(value);
+				getOccuredEvents().add(«event.getName()»);
+			}
+		«ELSE-»
+			private void raise«event.name.toFirstUpper()»() {
+				getOccuredEvents().add(«event.getName()»);
+			}
+		«ENDIF-»
+		private «event.getEventType()» get«event.getName()»() {
+			return «event.getName()»;
+		}
+	
+	«ENDFOREACH-»
+	«REM»Create getters and setters for variables«ENDREM»
+	«FOREACH getInternalScopeVariables() AS variable-»
+	private «variable.type.getJavaType()» get«variable.getValueName().toFirstUpper()»() {
+		return «variable.getValueName()»;
+	}
+	
+	private void set«variable.getValueName().toFirstUpper()»(«variable.type.getJavaType()» value) {
+		«variable.getValueName()» = value;
+	}	
+	
+	«ENDFOREACH-»
+«ENDDEFINE»
+
+«DEFINE DefaultInterfaceMethods(sgen::GeneratorEntry entry) FOR InterfaceScope »
+	«FOREACH declarations.typeSelect(EventDefinition) AS event-»
+	
+	«IF event.direction == Direction::IN-»
+		«IF !event.type.isVoid()-»
+		public void raise«event.name.toFirstUpper()»(«event.type.getJavaType()» value) {
+			getDefaultInterface().raise«event.name.toFirstUpper()»(value);
+		}
+		«ELSE»
+		public void raise«event.name.toFirstUpper()»() {
+			getDefaultInterface().raise«event.name.toFirstUpper()»();
+		}
+		«ENDIF-»
+	«ENDIF-»
+	
+	«IF event.direction ==  Direction::OUT-»
+	public boolean isRaised«event.name.toFirstUpper()»() {
+		return getOutEvents().contains(«event.getter()»);
+	}
+	
+	public «event.getEventType()» «event.getter()» {
+		return getDefaultInterface().«event.getter()»;
+	}
+	«ENDIF-»
+	«ENDFOREACH-»
+	
+	«FOREACH declarations.typeSelect(VariableDefinition) AS variable-»
+	public «variable.type.getJavaType()» «variable.getter()» {
+		return getDefaultInterface().«variable.getter()»;
+	}
+	
+	public void set«variable.getValueName().toFirstUpper()»(«variable.type.getJavaType()» value) {
+		getDefaultInterface().set«variable.getValueName().toFirstUpper()»(value);
+	}	
+	«ENDFOREACH-»
+	
+	«IF (hasVariables() || hasIncomingEvents()) && entry.createGenericInterfaceSupport()-»
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+	
+	«IF hasIncomingEvents()-»
+	@SuppressWarnings("unchecked")
+	«ENDIF-»
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+	
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+	«ENDIF-»
+«ENDDEFINE»
+
 «DEFINE file(sgen::GeneratorEntry entry) FOR ExecutionFlow-»
 «DEFINE file(sgen::GeneratorEntry entry) FOR ExecutionFlow-»
 «FILE getImplementationPackagePath(entry)+"/"+getCycleBasedStatemachineName()+'.java'-»
 «FILE getImplementationPackagePath(entry)+"/"+getCycleBasedStatemachineName()+'.java'-»
 «getLicenseHeader(entry)»
 «getLicenseHeader(entry)»
@@ -239,11 +328,14 @@ import 
 «ELSE-»
 «ELSE-»
 	import «entry.getBasePackageName()».IStatemachine;
 	import «entry.getBasePackageName()».IStatemachine;
 «ENDIF-»
 «ENDIF-»
-«IF getInternalScopeValuedEvents().size > 0 
+«IF !getInternalScopeValuedEvents().isEmpty || !getDefaultInterfaceValuedEvents().isEmpty
 	import «entry.getBasePackageName()».ValuedEvent;
 	import «entry.getBasePackageName()».ValuedEvent;
 «ENDIF-»
 «ENDIF-»
+«IF getStatemachineExtension(entry) != null-»
+	import «entry.getBasePackageName()».NotificationSender;
+«ENDIF-»
 
 
-public class «getCycleBasedStatemachineName()» implements «getStatemachineInterfaceTypes(entry)» {
+public class «getCycleBasedStatemachineName()» «getStatemachineExtension(entry)» implements «getStatemachineInterfaceTypes(entry)» {
 	
 	
 	«IF getInternalScopeEvents().size > 0-»
 	«IF getInternalScopeEvents().size > 0-»
 	private enum Events {
 	private enum Events {
@@ -407,35 +499,9 @@ public class 
 		«ENDIF-»
 		«ENDIF-»
 	}
 	}
 	«ENDFOREACH-»
 	«ENDFOREACH-»
-	«REM»create getters and setters for events«ENDREM»
-	«FOREACH getInternalScopeEvents() AS event-»
-	
-		«IF !event.type.isVoid()-»
-			private void raise«event.name.toFirstUpper()»(«event.type.getJavaType()» value) {
-				«event.getName()».setValue(value);
-				getOccuredEvents().add(«event.getName()»);
-			}
-		«ELSE-»
-			private void raise«event.name.toFirstUpper()»() {
-				getOccuredEvents().add(«event.getName()»);
-			}
-		«ENDIF-»
-		private «event.getEventType()» get«event.getName()»() {
-			return «event.getName()»;
-		}
-	
-	«ENDFOREACH-»
-	«REM»Create getters and setters for variables«ENDREM»
-	«FOREACH getInternalScopeVariables() AS variable-»
-	private «variable.type.getJavaType()» get«variable.getValueName().toFirstUpper()»() {
-		return «variable.getValueName()»;
-	}
 	
 	
-	private void set«variable.getValueName().toFirstUpper()»(«variable.type.getJavaType()» value) {
-		«variable.getValueName()» = value;
-	}	
-	
-	«ENDFOREACH-»
+	«EXPAND InternalScopeMethods FOR this»
+	«EXPAND DefaultInterfaceMethods(entry) FOREACH getDefaultInterface()»
 	«REM»Create enterSequences for statemachine«ENDREM»
 	«REM»Create enterSequences for statemachine«ENDREM»
 	«IF enterSequence.steps.size > 0 -»
 	«IF enterSequence.steps.size > 0 -»
 		public void «enterSequenceName()»() {
 		public void «enterSequenceName()»() {
@@ -452,6 +518,7 @@ public class 
 		}
 		}
 	«ENDIF»
 	«ENDIF»
 	
 	
+
 «EXPAND ConditionMethodsImplement FOREACH this.states-»
 «EXPAND ConditionMethodsImplement FOREACH this.states-»
 «EXPAND ConditionMethodsImplement FOREACH this.nodes-»
 «EXPAND ConditionMethodsImplement FOREACH this.nodes-»
 «EXPAND StatementMethodsImplement FOREACH this.states-»
 «EXPAND StatementMethodsImplement FOREACH this.states-»

+ 0 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/CustomInterfaceImpl.xpt

@@ -92,7 +92,6 @@ public class 
 			«ENDFOREACH-»	
 			«ENDFOREACH-»	
 		«ENDIF-»
 		«ENDIF-»
 	}
 	}
-	
 		
 		
 	«FOREACH declarations.typeSelect(EventDefinition) AS event-»
 	«FOREACH declarations.typeSelect(EventDefinition) AS event-»
 	
 	

+ 8 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/ExecutionModelExtensions.ext

@@ -28,7 +28,14 @@ getInternalScopeVariables(ExecutionFlow this) :	getInternalScopeDeclarations().t
 getInternalScopeEvents(ExecutionFlow this) : getInternalScopeDeclarations().typeSelect(EventDefinition);
 getInternalScopeEvents(ExecutionFlow this) : getInternalScopeDeclarations().typeSelect(EventDefinition);
 getInternalScopeVoidEvents(ExecutionFlow this) :getInternalScopeEvents().select(e|e.type.isVoid());
 getInternalScopeVoidEvents(ExecutionFlow this) :getInternalScopeEvents().select(e|e.type.isVoid());
 getInternalScopeValuedEvents(ExecutionFlow this) : getInternalScopeEvents().select(e|!e.type.isVoid());
 getInternalScopeValuedEvents(ExecutionFlow this) : getInternalScopeEvents().select(e|!e.type.isVoid());
-	
+
+getDefaultInterface(ExecutionFlow this) :
+	getInterfaceScope().select(interface|interface.name == null);
+
+List getDefaultInterfaceValuedEvents(ExecutionFlow this):
+	if (!getDefaultInterface().isEmpty) then
+		getDefaultInterface().get(0).declarations.typeSelect(EventDefinition).select(e|!e.type.isVoid());
+
 getTimeEvents(ExecutionFlow this) : scopes.typeSelect(Scope).declarations.typeSelect(TimeEvent);
 getTimeEvents(ExecutionFlow this) : scopes.typeSelect(Scope).declarations.typeSelect(TimeEvent);
 
 
 boolean isTimedStatemachine(ExecutionFlow this) :
 boolean isTimedStatemachine(ExecutionFlow this) :

+ 6 - 0
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/templates/Naming.ext

@@ -181,6 +181,12 @@ String getInterfaceImplExtension(Scope this, GeneratorEntry entry):
 		" extends NotificationSender"
 		" extends NotificationSender"
 	else
 	else
 		null;
 		null;
+		
+String getStatemachineExtension(ExecutionFlow this, GeneratorEntry entry):
+	if (!getDefaultInterface().isEmpty) then
+		getInterfaceImplExtension(getDefaultInterface().get(0),entry)
+	else
+		null;
 	
 	
 String getComment(Step this) :
 String getComment(Step this) :
 	if comment!=null then
 	if comment!=null then

+ 55 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/interfacetest/InterfaceTestCycleBasedStatemachine.java

@@ -19,10 +19,13 @@ import java.util.Map;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 import org.yakindu.sct.runtime.java.IStatemachine;
+import org.yakindu.sct.runtime.java.ValuedEvent;
+import org.yakindu.sct.runtime.java.NotificationSender;
 
 
-public class InterfaceTestCycleBasedStatemachine
+public class InterfaceTestCycleBasedStatemachine extends NotificationSender
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			IStatemachine {
 			IStatemachine {
 
 
 	public enum State {
 	public enum State {
@@ -108,6 +111,57 @@ public class InterfaceTestCycleBasedStatemachine
 		return (IInterfaceThirdImpl) getInterface("InterfaceThird");
 		return (IInterfaceThirdImpl) getInterface("InterfaceThird");
 	}
 	}
 
 
+	public void raiseEvent1() {
+		getDefaultInterface().raiseEvent1();
+	}
+
+	public boolean isRaisedEvent2() {
+		return getOutEvents().contains(getEventEvent2());
+	}
+
+	public ValuedEvent<Events, Integer> getEventEvent2() {
+		return getDefaultInterface().getEventEvent2();
+	}
+
+	public boolean getVarVar1() {
+		return getDefaultInterface().getVarVar1();
+	}
+
+	public void setVarVar1(boolean value) {
+		getDefaultInterface().setVarVar1(value);
+	}
+	public double getVarVar2() {
+		return getDefaultInterface().getVarVar2();
+	}
+
+	public void setVarVar2(double value) {
+		getDefaultInterface().setVarVar2(value);
+	}
+	public int getVarVar3() {
+		return getDefaultInterface().getVarVar3();
+	}
+
+	public void setVarVar3(int value) {
+		getDefaultInterface().setVarVar3(value);
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		getDefaultInterfaceImpl().setVarVar2(2.3);
 		getDefaultInterfaceImpl().setVarVar2(2.3);
 		getDefaultInterfaceImpl().setVarVar3(1);
 		getDefaultInterfaceImpl().setVarVar3(1);

+ 54 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_deephistory/Test_DeepHistoryCycleBasedStatemachine.java

@@ -23,6 +23,7 @@ import org.yakindu.sct.runtime.java.IStatemachine;
 public class Test_DeepHistoryCycleBasedStatemachine
 public class Test_DeepHistoryCycleBasedStatemachine
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			IStatemachine {
 			IStatemachine {
 
 
 	public enum State {
 	public enum State {
@@ -98,6 +99,59 @@ public class Test_DeepHistoryCycleBasedStatemachine
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	}
 
 
+	public void raiseEvent1() {
+		getDefaultInterface().raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		getDefaultInterface().raiseEvent2();
+	}
+
+	public void raiseEvent3() {
+		getDefaultInterface().raiseEvent3();
+	}
+
+	public void raiseEvent4() {
+		getDefaultInterface().raiseEvent4();
+	}
+
+	public void raiseEvent5() {
+		getDefaultInterface().raiseEvent5();
+	}
+
+	public void raiseEvent6() {
+		getDefaultInterface().raiseEvent6();
+	}
+
+	public void raiseEvent7() {
+		getDefaultInterface().raiseEvent7();
+	}
+
+	public void raiseEvent8() {
+		getDefaultInterface().raiseEvent8();
+	}
+
+	public void raiseEvent9() {
+		getDefaultInterface().raiseEvent9();
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		nextStateIndex = 0;
 		nextStateIndex = 0;
 		stateVector[0] = State.State1;
 		stateVector[0] = State.State1;

+ 73 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_expression/Test_ExpressionCycleBasedStatemachine.java

@@ -19,10 +19,13 @@ import java.util.Map;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 import org.yakindu.sct.runtime.java.IStatemachine;
+import org.yakindu.sct.runtime.java.ValuedEvent;
+import org.yakindu.sct.runtime.java.NotificationSender;
 
 
-public class Test_ExpressionCycleBasedStatemachine
+public class Test_ExpressionCycleBasedStatemachine extends NotificationSender
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			IStatemachine {
 			IStatemachine {
 
 
 	public enum State {
 	public enum State {
@@ -100,6 +103,75 @@ public class Test_ExpressionCycleBasedStatemachine
 		return (IInterfaceOtherImpl) getInterface("InterfaceOther");
 		return (IInterfaceOtherImpl) getInterface("InterfaceOther");
 	}
 	}
 
 
+	public void raiseEvent1(int value) {
+		getDefaultInterface().raiseEvent1(value);
+	}
+
+	public boolean isRaisedEvent2() {
+		return getOutEvents().contains(getEventEvent2());
+	}
+
+	public ValuedEvent<Events, Double> getEventEvent2() {
+		return getDefaultInterface().getEventEvent2();
+	}
+
+	public void raiseEvent3() {
+		getDefaultInterface().raiseEvent3();
+	}
+
+	public int getVarVar1() {
+		return getDefaultInterface().getVarVar1();
+	}
+
+	public void setVarVar1(int value) {
+		getDefaultInterface().setVarVar1(value);
+	}
+	public int getVarVar2() {
+		return getDefaultInterface().getVarVar2();
+	}
+
+	public void setVarVar2(int value) {
+		getDefaultInterface().setVarVar2(value);
+	}
+	public double getVarVar3() {
+		return getDefaultInterface().getVarVar3();
+	}
+
+	public void setVarVar3(double value) {
+		getDefaultInterface().setVarVar3(value);
+	}
+	public double getVarVar4() {
+		return getDefaultInterface().getVarVar4();
+	}
+
+	public void setVarVar4(double value) {
+		getDefaultInterface().setVarVar4(value);
+	}
+	public boolean getVarVar5() {
+		return getDefaultInterface().getVarVar5();
+	}
+
+	public void setVarVar5(boolean value) {
+		getDefaultInterface().setVarVar5(value);
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		getDefaultInterfaceImpl().setVarVar1(6);
 		getDefaultInterfaceImpl().setVarVar1(6);
 		getDefaultInterfaceImpl().setVarVar2(123);
 		getDefaultInterfaceImpl().setVarVar2(123);

+ 99 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_hierarchy/Test_HierarchyCycleBasedStatemachine.java

@@ -19,10 +19,12 @@ import java.util.Map;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 import org.yakindu.sct.runtime.java.IStatemachine;
+import org.yakindu.sct.runtime.java.NotificationSender;
 
 
-public class Test_HierarchyCycleBasedStatemachine
+public class Test_HierarchyCycleBasedStatemachine extends NotificationSender
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			IStatemachine {
 			IStatemachine {
 
 
 	public enum State {
 	public enum State {
@@ -92,6 +94,102 @@ public class Test_HierarchyCycleBasedStatemachine
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	}
 
 
+	public void raiseEvent1() {
+		getDefaultInterface().raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		getDefaultInterface().raiseEvent2();
+	}
+
+	public void raiseEvent3() {
+		getDefaultInterface().raiseEvent3();
+	}
+
+	public void raiseEvent4() {
+		getDefaultInterface().raiseEvent4();
+	}
+
+	public void raiseEvent5() {
+		getDefaultInterface().raiseEvent5();
+	}
+
+	public void raiseEvent6() {
+		getDefaultInterface().raiseEvent6();
+	}
+
+	public void raiseEvent7() {
+		getDefaultInterface().raiseEvent7();
+	}
+
+	public void raiseEvent8() {
+		getDefaultInterface().raiseEvent8();
+	}
+
+	public void raiseEvent9() {
+		getDefaultInterface().raiseEvent9();
+	}
+
+	public void raiseEvent10() {
+		getDefaultInterface().raiseEvent10();
+	}
+
+	public void raiseEvent11() {
+		getDefaultInterface().raiseEvent11();
+	}
+
+	public void raiseEvent12() {
+		getDefaultInterface().raiseEvent12();
+	}
+
+	public void raiseEvent13() {
+		getDefaultInterface().raiseEvent13();
+	}
+
+	public void raiseEvent14() {
+		getDefaultInterface().raiseEvent14();
+	}
+
+	public void raiseEvent15() {
+		getDefaultInterface().raiseEvent15();
+	}
+
+	public void raiseEvent16() {
+		getDefaultInterface().raiseEvent16();
+	}
+
+	public int getVarS1() {
+		return getDefaultInterface().getVarS1();
+	}
+
+	public void setVarS1(int value) {
+		getDefaultInterface().setVarS1(value);
+	}
+	public int getVarS2() {
+		return getDefaultInterface().getVarS2();
+	}
+
+	public void setVarS2(int value) {
+		getDefaultInterface().setVarS2(value);
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		getDefaultInterfaceImpl().setVarS1(0);
 		getDefaultInterfaceImpl().setVarS1(0);
 		getDefaultInterfaceImpl().setVarS1(1);
 		getDefaultInterfaceImpl().setVarS1(1);

+ 58 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_localactions/Test_LocalActionsCycleBasedStatemachine.java

@@ -21,10 +21,12 @@ import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
 import org.yakindu.sct.runtime.java.ITimerService;
 import org.yakindu.sct.runtime.java.ITimerService;
+import org.yakindu.sct.runtime.java.NotificationSender;
 
 
-public class Test_LocalActionsCycleBasedStatemachine
+public class Test_LocalActionsCycleBasedStatemachine extends NotificationSender
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			ITimedStatemachine {
 			ITimedStatemachine {
 
 
 	private enum TimeEvents {
 	private enum TimeEvents {
@@ -123,6 +125,61 @@ public class Test_LocalActionsCycleBasedStatemachine
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	}
 
 
+	public void raiseEvent1() {
+		getDefaultInterface().raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		getDefaultInterface().raiseEvent2();
+	}
+
+	public void raiseEvent3() {
+		getDefaultInterface().raiseEvent3();
+	}
+
+	public void raiseEvent4() {
+		getDefaultInterface().raiseEvent4();
+	}
+
+	public int getVarI() {
+		return getDefaultInterface().getVarI();
+	}
+
+	public void setVarI(int value) {
+		getDefaultInterface().setVarI(value);
+	}
+	public int getVarJ() {
+		return getDefaultInterface().getVarJ();
+	}
+
+	public void setVarJ(int value) {
+		getDefaultInterface().setVarJ(value);
+	}
+	public int getVarC() {
+		return getDefaultInterface().getVarC();
+	}
+
+	public void setVarC(int value) {
+		getDefaultInterface().setVarC(value);
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		cycleStartTime = System.currentTimeMillis();
 		cycleStartTime = System.currentTimeMillis();
 		getTimerService().setTimer(State1_time_event_0, 100, cycleStartTime);
 		getTimerService().setTimer(State1_time_event_0, 100, cycleStartTime);

+ 92 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_parallelregions/Test_ParallelRegionsCycleBasedStatemachine.java

@@ -19,10 +19,14 @@ import java.util.Map;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessStatemachine;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.IStatemachine;
 import org.yakindu.sct.runtime.java.IStatemachine;
+import org.yakindu.sct.runtime.java.NotificationSender;
 
 
 public class Test_ParallelRegionsCycleBasedStatemachine
 public class Test_ParallelRegionsCycleBasedStatemachine
+		extends
+			NotificationSender
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			IStatemachine {
 			IStatemachine {
 
 
 	public enum State {
 	public enum State {
@@ -92,6 +96,94 @@ public class Test_ParallelRegionsCycleBasedStatemachine
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	}
 
 
+	public void raiseEvent1() {
+		getDefaultInterface().raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		getDefaultInterface().raiseEvent2();
+	}
+
+	public void raiseEvent3() {
+		getDefaultInterface().raiseEvent3();
+	}
+
+	public void raiseEvent4() {
+		getDefaultInterface().raiseEvent4();
+	}
+
+	public void raiseEvent5() {
+		getDefaultInterface().raiseEvent5();
+	}
+
+	public void raiseEvent6() {
+		getDefaultInterface().raiseEvent6();
+	}
+
+	public void raiseEvent7() {
+		getDefaultInterface().raiseEvent7();
+	}
+
+	public void raiseEvent8() {
+		getDefaultInterface().raiseEvent8();
+	}
+
+	public void raiseEvent9() {
+		getDefaultInterface().raiseEvent9();
+	}
+
+	public void raiseEvent10() {
+		getDefaultInterface().raiseEvent10();
+	}
+
+	public void raiseEvent11() {
+		getDefaultInterface().raiseEvent11();
+	}
+
+	public void raiseEvent12() {
+		getDefaultInterface().raiseEvent12();
+	}
+
+	public void raiseEvent13() {
+		getDefaultInterface().raiseEvent13();
+	}
+
+	public void raiseEvent14() {
+		getDefaultInterface().raiseEvent14();
+	}
+
+	public int getVarReg3() {
+		return getDefaultInterface().getVarReg3();
+	}
+
+	public void setVarReg3(int value) {
+		getDefaultInterface().setVarReg3(value);
+	}
+	public int getVarHierarchy() {
+		return getDefaultInterface().getVarHierarchy();
+	}
+
+	public void setVarHierarchy(int value) {
+		getDefaultInterface().setVarHierarchy(value);
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		getDefaultInterfaceImpl().setVarReg3(-(1));
 		getDefaultInterfaceImpl().setVarReg3(-(1));
 		nextStateIndex = 0;
 		nextStateIndex = 0;

+ 50 - 0
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_shallowhistory/Test_ShallowHistoryCycleBasedStatemachine.java

@@ -23,6 +23,7 @@ import org.yakindu.sct.runtime.java.IStatemachine;
 public class Test_ShallowHistoryCycleBasedStatemachine
 public class Test_ShallowHistoryCycleBasedStatemachine
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			IStatemachine {
 			IStatemachine {
 
 
 	public enum State {
 	public enum State {
@@ -98,6 +99,55 @@ public class Test_ShallowHistoryCycleBasedStatemachine
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	}
 
 
+	public void raiseEvent1() {
+		getDefaultInterface().raiseEvent1();
+	}
+
+	public void raiseEvent2() {
+		getDefaultInterface().raiseEvent2();
+	}
+
+	public void raiseEvent3() {
+		getDefaultInterface().raiseEvent3();
+	}
+
+	public void raiseEvent4() {
+		getDefaultInterface().raiseEvent4();
+	}
+
+	public void raiseEvent5() {
+		getDefaultInterface().raiseEvent5();
+	}
+
+	public void raiseEvent6() {
+		getDefaultInterface().raiseEvent6();
+	}
+
+	public void raiseEvent7() {
+		getDefaultInterface().raiseEvent7();
+	}
+
+	public void raiseEvent8() {
+		getDefaultInterface().raiseEvent8();
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		nextStateIndex = 0;
 		nextStateIndex = 0;
 		stateVector[0] = State.State1;
 		stateVector[0] = State.State1;

+ 52 - 1
test-plugins/org.yakindu.sct.generator.java.runtime.test/src-gen/org/yakindu/sct/runtime/java/test_transition/Test_TransitionCycleBasedStatemachine.java

@@ -21,10 +21,13 @@ import org.yakindu.sct.runtime.java.IGenericAccessInterface;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.TimeEvent;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
 import org.yakindu.sct.runtime.java.ITimedStatemachine;
 import org.yakindu.sct.runtime.java.ITimerService;
 import org.yakindu.sct.runtime.java.ITimerService;
+import org.yakindu.sct.runtime.java.ValuedEvent;
+import org.yakindu.sct.runtime.java.NotificationSender;
 
 
-public class Test_TransitionCycleBasedStatemachine
+public class Test_TransitionCycleBasedStatemachine extends NotificationSender
 		implements
 		implements
 			IGenericAccessStatemachine,
 			IGenericAccessStatemachine,
+			DefaultInterface,
 			ITimedStatemachine {
 			ITimedStatemachine {
 
 
 	private enum TimeEvents {
 	private enum TimeEvents {
@@ -131,6 +134,54 @@ public class Test_TransitionCycleBasedStatemachine
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 		return (IDefaultInterfaceImpl) getInterface("DefaultInterface");
 	}
 	}
 
 
+	public void raiseEvent5(boolean value) {
+		getDefaultInterface().raiseEvent5(value);
+	}
+
+	public void raiseEvent6() {
+		getDefaultInterface().raiseEvent6();
+	}
+
+	public boolean isRaisedEvent7() {
+		return getOutEvents().contains(getEventEvent7());
+	}
+
+	public Event<Events> getEventEvent7() {
+		return getDefaultInterface().getEventEvent7();
+	}
+
+	public int getVarI() {
+		return getDefaultInterface().getVarI();
+	}
+
+	public void setVarI(int value) {
+		getDefaultInterface().setVarI(value);
+	}
+	public double getVarJ() {
+		return getDefaultInterface().getVarJ();
+	}
+
+	public void setVarJ(double value) {
+		getDefaultInterface().setVarJ(value);
+	}
+
+	public boolean raiseEvent(String name) {
+		return getDefaultInterface().raiseEvent(name);
+	}
+
+	@SuppressWarnings("unchecked")
+	public boolean raiseEvent(String name, Object value) {
+		return getDefaultInterface().raiseEvent(name, value);
+	}
+
+	public boolean setVariable(String name, Object value) {
+		return getDefaultInterface().setVariable(name, value);
+	}
+
+	public Object getVariable(String name) {
+		return getDefaultInterface().getVariable(name);
+	}
+
 	public void enter() {
 	public void enter() {
 		cycleStartTime = System.currentTimeMillis();
 		cycleStartTime = System.currentTimeMillis();
 		getTimerService().setTimer(State1_time_event_0, (10 * 1000),
 		getTimerService().setTimer(State1_time_event_0, (10 * 1000),

+ 6 - 9
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryCycleBasedStatemachine.java

@@ -14,14 +14,11 @@ public class TestDeepHistoryCycleBasedStatemachine {
 
 
 	private Test_DeepHistoryCycleBasedStatemachine statemachine;
 	private Test_DeepHistoryCycleBasedStatemachine statemachine;
 
 
-	private DefaultInterface dInterface;
-
 	@Before
 	@Before
 	public void setUp() {
 	public void setUp() {
 		statemachine = new Test_DeepHistoryCycleBasedStatemachine();
 		statemachine = new Test_DeepHistoryCycleBasedStatemachine();
 		statemachine.init();
 		statemachine.init();
 		statemachine.enter();
 		statemachine.enter();
-		dInterface = statemachine.getDefaultInterface();
 	}
 	}
 
 
 	@After
 	@After
@@ -32,25 +29,25 @@ public class TestDeepHistoryCycleBasedStatemachine {
 	@Test
 	@Test
 	public void testDeepHistory() {
 	public void testDeepHistory() {
 		// Change active states to State9;
 		// Change active states to State9;
-		dInterface.raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
-		dInterface.raiseEvent3();
+		statemachine.raiseEvent3();
 		statemachine.runCycle();
 		statemachine.runCycle();
-		dInterface.raiseEvent5();
+		statemachine.raiseEvent5();
 		statemachine.runCycle();
 		statemachine.runCycle();
-		dInterface.raiseEvent7();
+		statemachine.raiseEvent7();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 
 		// Leave State2. State4 and State9 should be saved as history.
 		// Leave State2. State4 and State9 should be saved as history.
-		dInterface.raiseEvent2();
+		statemachine.raiseEvent2();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertFalse(statemachine.isStateActive(State.State9));
 
 
 		// Reenter State2. State9 should be activated (History of State2).
 		// Reenter State2. State9 should be activated (History of State2).
-		dInterface.raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));

+ 7 - 10
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestDeepHistoryEventBasedStatemachine.java

@@ -14,15 +14,12 @@ public class TestDeepHistoryEventBasedStatemachine {
 
 
 	private Test_DeepHistoryEventBasedStatemachine statemachine;
 	private Test_DeepHistoryEventBasedStatemachine statemachine;
 
 
-	private DefaultInterface dInterface;
-
 	@Before
 	@Before
 	public void setUp() {
 	public void setUp() {
 		statemachine = new Test_DeepHistoryEventBasedStatemachine();
 		statemachine = new Test_DeepHistoryEventBasedStatemachine();
 		statemachine.init();
 		statemachine.init();
 		statemachine.enter();
 		statemachine.enter();
-		dInterface = statemachine.getDefaultInterface();
-		dInterface = statemachine.getDefaultInterface();
+
 	}
 	}
 
 
 	@After
 	@After
@@ -33,20 +30,20 @@ public class TestDeepHistoryEventBasedStatemachine {
 	@Test
 	@Test
 	public void testDeepHistory() {
 	public void testDeepHistory() {
 		// Change active states to State9;
 		// Change active states to State9;
-		dInterface.raiseEvent1();
-		dInterface.raiseEvent3();
-		dInterface.raiseEvent5();
-		dInterface.raiseEvent7();
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent3();
+		statemachine.raiseEvent5();
+		statemachine.raiseEvent7();
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 
 		// Leave State2. State4 and State9 should be saved as history.
 		// Leave State2. State4 and State9 should be saved as history.
-		dInterface.raiseEvent2();
+		statemachine.raiseEvent2();
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertFalse(statemachine.isStateActive(State.State9));
 
 
 		// Reenter State2. State9 should be activated (History of State2).
 		// Reenter State2. State9 should be activated (History of State2).
-		dInterface.raiseEvent1();
+		statemachine.raiseEvent1();
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 	}
 	}

+ 44 - 44
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestExpressionCycleBasedStatemachine.java

@@ -8,9 +8,9 @@ import org.junit.Test;
 import org.yakindu.sct.runtime.java.test_expression.Test_ExpressionCycleBasedStatemachine;
 import org.yakindu.sct.runtime.java.test_expression.Test_ExpressionCycleBasedStatemachine;
 
 
 public class TestExpressionCycleBasedStatemachine {
 public class TestExpressionCycleBasedStatemachine {
-	
+
 	private Test_ExpressionCycleBasedStatemachine statemachine;
 	private Test_ExpressionCycleBasedStatemachine statemachine;
-	
+
 	@Before
 	@Before
 	public void setUp() {
 	public void setUp() {
 		statemachine = new Test_ExpressionCycleBasedStatemachine();
 		statemachine = new Test_ExpressionCycleBasedStatemachine();
@@ -22,60 +22,60 @@ public class TestExpressionCycleBasedStatemachine {
 	public void tearDown() {
 	public void tearDown() {
 		statemachine = null;
 		statemachine = null;
 	}
 	}
-	
+
 	@Test
 	@Test
 	public void testCycles() {
 	public void testCycles() {
-		assertEquals("Var3 value not set correct: ", 2405.6, statemachine
-				.getDefaultInterface().getVarVar3(),Math.pow(10, -8));
-		
-		statemachine.getDefaultInterface().raiseEvent1(0);
+		assertEquals("Var3 value not set correct: ", 2405.6,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+
+		statemachine.raiseEvent1(0);
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 				.getInterfaceOther().getVarVar1());
-		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
-				.getDefaultInterface().getVarVar2());
-		assertEquals("Default.Var4 value not set correct: ", 22.3, statemachine
-				.getDefaultInterface().getVarVar4(),Math.pow(10, -8));
-		assertEquals("Other.Var3 value not set correct: ", 481.12, statemachine
-				.getDefaultInterface().getVarVar3(),Math.pow(10, -8));
-		assertEquals("Default.Var1 value not set correct: ", 7, statemachine
-				.getDefaultInterface().getVarVar1());
-		
+		assertEquals("Default.Var2 value not set correct: ", 1,
+				statemachine.getVarVar2());
+		assertEquals("Default.Var4 value not set correct: ", 22.3,
+				statemachine.getVarVar4(), Math.pow(10, -8));
+		assertEquals("Other.Var3 value not set correct: ", 481.12,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+		assertEquals("Default.Var1 value not set correct: ", 7,
+				statemachine.getVarVar1());
+
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 				.getInterfaceOther().getVarVar1());
-		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
-				.getDefaultInterface().getVarVar2());
-		assertEquals("Default.Var4 value not set correct: ", 22.3, statemachine
-				.getDefaultInterface().getVarVar4(),Math.pow(10, -8));
-		assertEquals("Other.Var3 value not set correct: ", 481.12, statemachine
-				.getDefaultInterface().getVarVar3(),Math.pow(10, -8));
-		assertEquals("Default.Var1 value not set correct: ", 8, statemachine
-				.getDefaultInterface().getVarVar1());
-		
+		assertEquals("Default.Var2 value not set correct: ", 1,
+				statemachine.getVarVar2());
+		assertEquals("Default.Var4 value not set correct: ", 22.3,
+				statemachine.getVarVar4(), Math.pow(10, -8));
+		assertEquals("Other.Var3 value not set correct: ", 481.12,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+		assertEquals("Default.Var1 value not set correct: ", 8,
+				statemachine.getVarVar1());
+
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 				.getInterfaceOther().getVarVar1());
-		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
-				.getDefaultInterface().getVarVar2());
-		assertEquals("Default.Var4 value not set correct: ", 22.3, statemachine
-				.getDefaultInterface().getVarVar4(),Math.pow(10, -8));
-		assertEquals("Other.Var3 value not set correct: ", 481.12, statemachine
-				.getDefaultInterface().getVarVar3(),Math.pow(10, -8));
-		assertEquals("Default.Var1 value not set correct: ", 9, statemachine
-				.getDefaultInterface().getVarVar1());
-		
-		statemachine.getDefaultInterface().raiseEvent1(0);
+		assertEquals("Default.Var2 value not set correct: ", 1,
+				statemachine.getVarVar2());
+		assertEquals("Default.Var4 value not set correct: ", 22.3,
+				statemachine.getVarVar4(), Math.pow(10, -8));
+		assertEquals("Other.Var3 value not set correct: ", 481.12,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+		assertEquals("Default.Var1 value not set correct: ", 9,
+				statemachine.getVarVar1());
+
+		statemachine.raiseEvent1(0);
 		statemachine.runCycle();
 		statemachine.runCycle();
-		assertEquals("Default.Var5 value not set correct: ", true, statemachine
-				.getDefaultInterface().getVarVar5());
-		assertEquals("Other.Var3 value not set correct: ", 962.24, statemachine
-				.getDefaultInterface().getVarVar3(),Math.pow(10, -8));
-		
-		statemachine.getDefaultInterface().raiseEvent1(0);
+		assertEquals("Default.Var5 value not set correct: ", true,
+				statemachine.getVarVar5());
+		assertEquals("Other.Var3 value not set correct: ", 962.24,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+
+		statemachine.raiseEvent1(0);
 		statemachine.runCycle();
 		statemachine.runCycle();
-		assertEquals("Other.Var3 value not set correct: ", 962.24, statemachine
-				.getDefaultInterface().getVarVar3(),Math.pow(10, -8));
-		
+		assertEquals("Other.Var3 value not set correct: ", 962.24,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+
 	}
 	}
 }
 }

+ 37 - 37
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestExpressionEventBasedStatemachine.java

@@ -25,56 +25,56 @@ public class TestExpressionEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testCycles() {
 	public void testCycles() {
-		assertEquals("Var3 value not set correct: ", 2405.6, statemachine
-				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
+		assertEquals("Var3 value not set correct: ", 2405.6,
+				statemachine.getVarVar3(), Math.pow(10, -8));
 
 
-		statemachine.getDefaultInterface().raiseEvent1(0);
+		statemachine.raiseEvent1(0);
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 				.getInterfaceOther().getVarVar1());
-		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
-				.getDefaultInterface().getVarVar2());
-		assertEquals("Default.Var4 value not set correct: ", 22.3, statemachine
-				.getDefaultInterface().getVarVar4(), Math.pow(10, -8));
-		assertEquals("Other.Var3 value not set correct: ", 481.12, statemachine
-				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
-		assertEquals("Default.Var1 value not set correct: ", 7, statemachine
-				.getDefaultInterface().getVarVar1());
+		assertEquals("Default.Var2 value not set correct: ", 1,
+				statemachine.getVarVar2());
+		assertEquals("Default.Var4 value not set correct: ", 22.3,
+				statemachine.getVarVar4(), Math.pow(10, -8));
+		assertEquals("Other.Var3 value not set correct: ", 481.12,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+		assertEquals("Default.Var1 value not set correct: ", 7,
+				statemachine.getVarVar1());
 
 
 		// Trigger oncycle expression with event
 		// Trigger oncycle expression with event
-		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.raiseEvent3();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 				.getInterfaceOther().getVarVar1());
-		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
-				.getDefaultInterface().getVarVar2());
-		assertEquals("Default.Var4 value not set correct: ", 22.3, statemachine
-				.getDefaultInterface().getVarVar4(), Math.pow(10, -8));
-		assertEquals("Other.Var3 value not set correct: ", 481.12, statemachine
-				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
-		assertEquals("Default.Var1 value not set correct: ", 8, statemachine
-				.getDefaultInterface().getVarVar1());
+		assertEquals("Default.Var2 value not set correct: ", 1,
+				statemachine.getVarVar2());
+		assertEquals("Default.Var4 value not set correct: ", 22.3,
+				statemachine.getVarVar4(), Math.pow(10, -8));
+		assertEquals("Other.Var3 value not set correct: ", 481.12,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+		assertEquals("Default.Var1 value not set correct: ", 8,
+				statemachine.getVarVar1());
 
 
 		// Trigger oncycle expression with event
 		// Trigger oncycle expression with event
-		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.raiseEvent3();
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 		assertEquals("Other.Var1 value not set correct: ", false, statemachine
 				.getInterfaceOther().getVarVar1());
 				.getInterfaceOther().getVarVar1());
-		assertEquals("Default.Var2 value not set correct: ", 1, statemachine
-				.getDefaultInterface().getVarVar2());
-		assertEquals("Default.Var4 value not set correct: ", 22.3, statemachine
-				.getDefaultInterface().getVarVar4(), Math.pow(10, -8));
-		assertEquals("Other.Var3 value not set correct: ", 481.12, statemachine
-				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
-		assertEquals("Default.Var1 value not set correct: ", 9, statemachine
-				.getDefaultInterface().getVarVar1());
+		assertEquals("Default.Var2 value not set correct: ", 1,
+				statemachine.getVarVar2());
+		assertEquals("Default.Var4 value not set correct: ", 22.3,
+				statemachine.getVarVar4(), Math.pow(10, -8));
+		assertEquals("Other.Var3 value not set correct: ", 481.12,
+				statemachine.getVarVar3(), Math.pow(10, -8));
+		assertEquals("Default.Var1 value not set correct: ", 9,
+				statemachine.getVarVar1());
 
 
-		statemachine.getDefaultInterface().raiseEvent1(0);
-		assertEquals("Default.Var5 value not set correct: ", true, statemachine
-				.getDefaultInterface().getVarVar5());
-		assertEquals("Other.Var3 value not set correct: ", 962.24, statemachine
-				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
+		statemachine.raiseEvent1(0);
+		assertEquals("Default.Var5 value not set correct: ", true,
+				statemachine.getVarVar5());
+		assertEquals("Other.Var3 value not set correct: ", 962.24,
+				statemachine.getVarVar3(), Math.pow(10, -8));
 
 
-		statemachine.getDefaultInterface().raiseEvent1(0);
-		assertEquals("Other.Var3 value not set correct: ", 962.24, statemachine
-				.getDefaultInterface().getVarVar3(), Math.pow(10, -8));
+		statemachine.raiseEvent1(0);
+		assertEquals("Other.Var3 value not set correct: ", 962.24,
+				statemachine.getVarVar3(), Math.pow(10, -8));
 
 
 	}
 	}
 }
 }

+ 82 - 113
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestHierarchyCycleBasedStatemachine.java

@@ -38,121 +38,90 @@ public class TestHierarchyCycleBasedStatemachine {
 	public void tearDown() {
 	public void tearDown() {
 		statemachine = null;
 		statemachine = null;
 	}
 	}
-	
+
 	@Test
 	@Test
 	public void testState1() {
 	public void testState1() {
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent9();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent10();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS2());
-		
-
-		statemachine.getDefaultInterface().raiseEvent14();
-		statemachine.runCycle();	
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent2();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 3, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent15();
-		statemachine.runCycle();	
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent2();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent3();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 4, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent4();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 4, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent16();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent2();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent3();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent4();
-		statemachine.runCycle();
-		statemachine.getDefaultInterface().raiseEvent5();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 4, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent8();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 3, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent7();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS2());
-		
-		statemachine.getDefaultInterface().raiseEvent6();
-		statemachine.runCycle();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent9();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent10();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 2, statemachine.getVarS2());
+
+		statemachine.raiseEvent14();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 3, statemachine.getVarS2());
+
+		statemachine.raiseEvent15();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		statemachine.raiseEvent3();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 4, statemachine.getVarS2());
+
+		statemachine.raiseEvent4();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 4, statemachine.getVarS2());
+
+		statemachine.raiseEvent16();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.runCycle();
+		statemachine.raiseEvent2();
+		statemachine.runCycle();
+		statemachine.raiseEvent3();
+		statemachine.runCycle();
+		statemachine.raiseEvent4();
+		statemachine.runCycle();
+		statemachine.raiseEvent5();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 4, statemachine.getVarS2());
+
+		statemachine.raiseEvent8();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 3, statemachine.getVarS2());
+
+		statemachine.raiseEvent7();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 2, statemachine.getVarS2());
+
+		statemachine.raiseEvent6();
+		statemachine.runCycle();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
 	}
 	}
-	
-	
 
 
 }
 }

+ 61 - 89
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestHierarchyEventBasedStatemachine.java

@@ -41,94 +41,66 @@ public class TestHierarchyEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testState1() {
 	public void testState1() {
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent9();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent10();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent1();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent14();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.getDefaultInterface().raiseEvent2();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 3, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent15();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.getDefaultInterface().raiseEvent2();
-		statemachine.getDefaultInterface().raiseEvent3();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 4, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent4();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 4, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent16();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.getDefaultInterface().raiseEvent2();
-		statemachine.getDefaultInterface().raiseEvent3();
-		statemachine.getDefaultInterface().raiseEvent4();
-		statemachine.getDefaultInterface().raiseEvent5();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 4, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent8();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 3, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent7();
-		assertEquals("s1 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS2());
-
-		statemachine.getDefaultInterface().raiseEvent6();
-		assertEquals("s1 value not set correct: ", 2, statemachine
-				.getDefaultInterface().getVarS1());
-		assertEquals("s2 value not set correct: ", 0, statemachine
-				.getDefaultInterface().getVarS2());
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent9();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent10();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 2, statemachine.getVarS2());
+
+		statemachine.raiseEvent14();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent2();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 3, statemachine.getVarS2());
+
+		statemachine.raiseEvent15();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent2();
+		statemachine.raiseEvent3();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 4, statemachine.getVarS2());
+
+		statemachine.raiseEvent4();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 4, statemachine.getVarS2());
+
+		statemachine.raiseEvent16();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
+
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent2();
+		statemachine.raiseEvent3();
+		statemachine.raiseEvent4();
+		statemachine.raiseEvent5();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 4, statemachine.getVarS2());
+
+		statemachine.raiseEvent8();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 3, statemachine.getVarS2());
+
+		statemachine.raiseEvent7();
+		assertEquals("s1 value not set correct: ", 0, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 2, statemachine.getVarS2());
+
+		statemachine.raiseEvent6();
+		assertEquals("s1 value not set correct: ", 2, statemachine.getVarS1());
+		assertEquals("s2 value not set correct: ", 0, statemachine.getVarS2());
 	}
 	}
 }
 }

+ 21 - 26
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestCycleBasedStatemachine.java

@@ -42,75 +42,70 @@ public class TestInterfaceTestCycleBasedStatemachine {
 		statemachine = null;
 		statemachine = null;
 	}
 	}
 
 
-	@Test (expected = IllegalArgumentException.class)
+	@Test(expected = IllegalArgumentException.class)
 	public void testExceptionHandling() {
 	public void testExceptionHandling() {
 		// Value of Event 2 should not be set to null
 		// Value of Event 2 should not be set to null
-		statemachine.getDefaultInterface().getEventEvent2().setValue(null);
+		statemachine.getEventEvent2().setValue(null);
 		statemachine.getInterfaceThird().getEventEvent6().setValue(null);
 		statemachine.getInterfaceThird().getEventEvent6().setValue(null);
 	}
 	}
 
 
 	@Test
 	@Test
 	public void testStatemachineEntry() {
 	public void testStatemachineEntry() {
 		assertEquals("InterfaceDefault.Var2 is not correct initialized:", 2.3,
 		assertEquals("InterfaceDefault.Var2 is not correct initialized:", 2.3,
-				statemachine.getDefaultInterface().getVarVar2(),
-				Math.pow(10, -8));
+				statemachine.getVarVar2(), Math.pow(10, -8));
 		assertEquals("InterfaceDefault.Var3 is not correct initialized:", 1,
 		assertEquals("InterfaceDefault.Var3 is not correct initialized:", 1,
-				statemachine.getDefaultInterface().getVarVar3());
+				statemachine.getVarVar3());
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
 	}
 	}
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_1() {
 	public void testStatemachineRunCycle_1() {
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if state is changed to State2
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 				statemachine.isStateActive(State.State2));
 				statemachine.isStateActive(State.State2));
 		// Test if event2 is raised (happens in entry of State2
 		// Test if event2 is raised (happens in entry of State2
-		assertTrue("Event not raised: ", statemachine.getDefaultInterface()
-				.isRaisedEvent2());
+		assertTrue("Event not raised: ", statemachine.isRaisedEvent2());
 		// Test if event2 value is set to 22 (happens in entry of State2
 		// Test if event2 value is set to 22 (happens in entry of State2
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
-				.getDefaultInterface().getEventEvent2().getValue().intValue());
+				.getEventEvent2().getValue().intValue());
 
 
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if statemachine is back in State 1
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised anymore
 		// Event 2 shouldn't be raised anymore
-		assertFalse("Event is still raised: ", statemachine
-				.getDefaultInterface().isRaisedEvent2());
+		assertFalse("Event is still raised: ", statemachine.isRaisedEvent2());
 	}
 	}
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_2() {
 	public void testStatemachineRunCycle_2() {
-		statemachine.getDefaultInterface().setVarVar2(-12.6);
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.setVarVar2(-12.6);
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if statemachine is still in State 1
 		// Test if statemachine is still in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised
 		// Event 2 shouldn't be raised
-		assertFalse("Event is still raised: ", statemachine
-				.getDefaultInterface().isRaisedEvent2());
+		assertFalse("Event is still raised: ", statemachine.isRaisedEvent2());
 		// Event 2 value should not be set to 22
 		// Event 2 value should not be set to 22
-		assertTrue("Event value is set to 22: ", statemachine
-				.getDefaultInterface().getEventEvent2().getValue() != 22);
+		assertTrue("Event value is set to 22: ", statemachine.getEventEvent2()
+				.getValue() != 22);
 
 
-		statemachine.getDefaultInterface().raiseEvent1();
-		statemachine.getDefaultInterface().setVarVar2(213.55);
+		statemachine.raiseEvent1();
+		statemachine.setVarVar2(213.55);
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if state is changed to State2
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 				statemachine.isStateActive(State.State2));
 				statemachine.isStateActive(State.State2));
 		// Test if event2 is raised (happens in entry of State2
 		// Test if event2 is raised (happens in entry of State2
-		assertTrue("Event not raised: ", statemachine.getDefaultInterface()
-				.isRaisedEvent2());
+		assertTrue("Event not raised: ", statemachine.isRaisedEvent2());
 		// Test if event2 value is set to 22 (happens in entry of State2
 		// Test if event2 value is set to 22 (happens in entry of State2
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
-				.getDefaultInterface().getEventEvent2().getValue().intValue());
+				.getEventEvent2().getValue().intValue());
 	}
 	}
 
 
 	@Test
 	@Test
@@ -136,7 +131,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_4() {
 	public void testStatemachineRunCycle_4() {
-		statemachine.getDefaultInterface().setVarVar3(2);
+		statemachine.setVarVar3(2);
 		statemachine.getInterfaceOther().raiseEvent3();
 		statemachine.getInterfaceOther().raiseEvent3();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if state is changed to State1
 		// Test if state is changed to State1
@@ -147,7 +142,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 				.isRaisedEvent4());
 				.isRaisedEvent4());
 
 
 		statemachine.getInterfaceOther().raiseEvent3();
 		statemachine.getInterfaceOther().raiseEvent3();
-		statemachine.getDefaultInterface().setVarVar3(1);
+		statemachine.setVarVar3(1);
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if state is changed to State3
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
@@ -159,7 +154,7 @@ public class TestInterfaceTestCycleBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_5() {
 	public void testStatemachineRunCycle_5() {
-		statemachine.getDefaultInterface().setVarVar1(true);
+		statemachine.setVarVar1(true);
 		statemachine.getInterfaceThird().raiseEvent5();
 		statemachine.getInterfaceThird().raiseEvent5();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		// Test if state is changed to State4
 		// Test if state is changed to State4

+ 17 - 17
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestInterfaceTestEventBasedStatemachine.java

@@ -96,17 +96,17 @@ public class TestInterfaceTestEventBasedStatemachine {
 	@Test (expected = IllegalArgumentException.class)
 	@Test (expected = IllegalArgumentException.class)
 	public void testExceptionHandling() {
 	public void testExceptionHandling() {
 		// Value of Event 2 should not be set to null
 		// Value of Event 2 should not be set to null
-		statemachine.getDefaultInterface().getEventEvent2().setValue(null);
+		statemachine.getEventEvent2().setValue(null);
 		statemachine.getInterfaceThird().getEventEvent6().setValue(null);
 		statemachine.getInterfaceThird().getEventEvent6().setValue(null);
 	}
 	}
 
 
 	@Test
 	@Test
 	public void testStatemachineEntry() {
 	public void testStatemachineEntry() {
 		assertEquals("InterfaceDefault.Var2 is not correct initialized:", 2.3,
 		assertEquals("InterfaceDefault.Var2 is not correct initialized:", 2.3,
-				statemachine.getDefaultInterface().getVarVar2(),
+				statemachine.getVarVar2(),
 				Math.pow(10, -8));
 				Math.pow(10, -8));
 		assertEquals("InterfaceDefault.Var3 is not correct initialized:", 1,
 		assertEquals("InterfaceDefault.Var3 is not correct initialized:", 1,
-				statemachine.getDefaultInterface().getVarVar3());
+				statemachine.getVarVar3());
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
 	}
 	}
@@ -114,7 +114,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 	@Test
 	@Test
 	public void testStatemachineRunCycle_1() {
 	public void testStatemachineRunCycle_1() {
 
 
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.raiseEvent1();
 		// Test if state is changed to State2
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 				statemachine.isStateActive(State.State2));
 				statemachine.isStateActive(State.State2));
@@ -122,33 +122,33 @@ public class TestInterfaceTestEventBasedStatemachine {
 		assertTrue("Event 2 not raised: ", events[0]);
 		assertTrue("Event 2 not raised: ", events[0]);
 		// Test if event2 value is set to 22 (happens in entry of State2
 		// Test if event2 value is set to 22 (happens in entry of State2
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
-				.getDefaultInterface().getEventEvent2().getValue().intValue());
+				.getEventEvent2().getValue().intValue());
 
 
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.raiseEvent1();
 		// Test if statemachine is back in State 1
 		// Test if statemachine is back in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised anymore
 		// Event 2 shouldn't be raised anymore
 		assertFalse("Event is still raised: ", statemachine
 		assertFalse("Event is still raised: ", statemachine
-				.getDefaultInterface().isRaisedEvent2());
+				.isRaisedEvent2());
 	}
 	}
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_2() {
 	public void testStatemachineRunCycle_2() {
-		statemachine.getDefaultInterface().setVarVar2(-12.6);
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.setVarVar2(-12.6);
+		statemachine.raiseEvent1();
 		// Test if statemachine is still in State 1
 		// Test if statemachine is still in State 1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
 		// Event 2 shouldn't be raised
 		// Event 2 shouldn't be raised
 		assertFalse("Event is still raised: ", statemachine
 		assertFalse("Event is still raised: ", statemachine
-				.getDefaultInterface().isRaisedEvent2());
+				.isRaisedEvent2());
 		// Event 2 value should not be set to 22
 		// Event 2 value should not be set to 22
 		assertTrue("Event value is set to 22: ", statemachine
 		assertTrue("Event value is set to 22: ", statemachine
-				.getDefaultInterface().getEventEvent2().getValue() != 22);
+				.getEventEvent2().getValue() != 22);
 
 
-		statemachine.getDefaultInterface().setVarVar2(213.55);
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.setVarVar2(213.55);
+		statemachine.raiseEvent1();
 		// Test if state is changed to State2
 		// Test if state is changed to State2
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State2.name() + ".",
 				statemachine.isStateActive(State.State2));
 				statemachine.isStateActive(State.State2));
@@ -156,7 +156,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		assertTrue("Event 2 not raised: ", events[0]);
 		assertTrue("Event 2 not raised: ", events[0]);
 		// Test if event2 value is set to 22 (happens in entry of State2
 		// Test if event2 value is set to 22 (happens in entry of State2
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
 		assertEquals("Event 2 value not set correct: ", 22, statemachine
-				.getDefaultInterface().getEventEvent2().getValue().intValue());
+				.getEventEvent2().getValue().intValue());
 	}
 	}
 
 
 	@Test
 	@Test
@@ -179,7 +179,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_4() {
 	public void testStatemachineRunCycle_4() {
-		statemachine.getDefaultInterface().setVarVar3(2);
+		statemachine.setVarVar3(2);
 		statemachine.getInterfaceOther().raiseEvent3();
 		statemachine.getInterfaceOther().raiseEvent3();
 		// Test if state is changed to State1
 		// Test if state is changed to State1
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
@@ -187,7 +187,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 		// Test if event4 is not raised
 		// Test if event4 is not raised
 		assertFalse("Event not raised: ", events[1]);
 		assertFalse("Event not raised: ", events[1]);
 
 
-		statemachine.getDefaultInterface().setVarVar3(1);
+		statemachine.setVarVar3(1);
 		statemachine.getInterfaceOther().raiseEvent3();
 		statemachine.getInterfaceOther().raiseEvent3();
 		// Test if state is changed to State3
 		// Test if state is changed to State3
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State3.name() + ".",
@@ -198,7 +198,7 @@ public class TestInterfaceTestEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineRunCycle_5() {
 	public void testStatemachineRunCycle_5() {
-		statemachine.getDefaultInterface().setVarVar1(true);
+		statemachine.setVarVar1(true);
 		statemachine.getInterfaceThird().raiseEvent5();
 		statemachine.getInterfaceThird().raiseEvent5();
 		// Test if state is changed to State4
 		// Test if state is changed to State4
 		assertTrue("Statemachine isn't in State: " + State.State4.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State4.name() + ".",

+ 18 - 19
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsCycleBasedStatemachine.java

@@ -53,7 +53,7 @@ public class TestLocalActionsCycleBasedStatemachine {
 		statemachine = null;
 		statemachine = null;
 	}
 	}
 
 
-	@Test (expected = NullPointerException.class)
+	@Test(expected = NullPointerException.class)
 	public void testExceptionHandling() {
 	public void testExceptionHandling() {
 		Test_LocalActionsCycleBasedStatemachine statemachine = new Test_LocalActionsCycleBasedStatemachine();
 		Test_LocalActionsCycleBasedStatemachine statemachine = new Test_LocalActionsCycleBasedStatemachine();
 		statemachine.enter();
 		statemachine.enter();
@@ -63,8 +63,7 @@ public class TestLocalActionsCycleBasedStatemachine {
 	public void testStatemachineEntry() {
 	public void testStatemachineEntry() {
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
-		assertEquals("Variable i not set to 1", 1, statemachine
-				.getDefaultInterface().getVarI());
+		assertEquals("Variable i not set to 1", 1, statemachine.getVarI());
 	}
 	}
 
 
 	@Test
 	@Test
@@ -72,24 +71,24 @@ public class TestLocalActionsCycleBasedStatemachine {
 		final long time = System.currentTimeMillis();
 		final long time = System.currentTimeMillis();
 
 
 		assertEquals("Error in local reaction \"Entry / i=1;\" of State1", 1,
 		assertEquals("Error in local reaction \"Entry / i=1;\" of State1", 1,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals("Error in local reaction \"onCycle / i=2;\" of State1", 2,
 		assertEquals("Error in local reaction \"onCycle / i=2;\" of State1", 2,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
-		statemachine.getDefaultInterface().raiseEvent2();
+		statemachine.raiseEvent2();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals("Error in local reaction \"Event2 / i=3;\" of State1", 3,
 		assertEquals("Error in local reaction \"Event2 / i=3;\" of State1", 3,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
 		// Check timer behavior
 		// Check timer behavior
-		while (statemachine.getDefaultInterface().getVarC() < 10) {
+		while (statemachine.getVarC() < 10) {
 			statemachine.runCycle();
 			statemachine.runCycle();
 			Thread.sleep(junitSleepTime);
 			Thread.sleep(junitSleepTime);
 		}
 		}
 		final long time2 = System.currentTimeMillis() - time;
 		final long time2 = System.currentTimeMillis() - time;
-		final long expectedTime = statemachine.getDefaultInterface().getVarC() * 100;
+		final long expectedTime = statemachine.getVarC() * 100;
 		final long delta = time2 - expectedTime;
 		final long delta = time2 - expectedTime;
 		assertTrue("Timer threshold overflow in State 1. Delta is " + delta
 		assertTrue("Timer threshold overflow in State 1. Delta is " + delta
 				+ " ms. Threshold is: " + timerThreshold + " ms.",
 				+ " ms. Threshold is: " + timerThreshold + " ms.",
@@ -99,25 +98,25 @@ public class TestLocalActionsCycleBasedStatemachine {
 	@Test
 	@Test
 	public void testState2LocalReaction() throws InterruptedException {
 	public void testState2LocalReaction() throws InterruptedException {
 		// Switch to State2;
 		// Switch to State2;
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		final long time = System.currentTimeMillis();
 		final long time = System.currentTimeMillis();
 
 
 		assertEquals("Error in local reaction \"exit / i=0;\" of State1", 0,
 		assertEquals("Error in local reaction \"exit / i=0;\" of State1", 0,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
 		assertEquals("Error in local reaction \"entry / j=0;\" of State2", 1,
 		assertEquals("Error in local reaction \"entry / j=0;\" of State2", 1,
-				statemachine.getDefaultInterface().getVarJ());
+				statemachine.getVarJ());
 
 
 		// Check local reaction for Event2
 		// Check local reaction for Event2
-		statemachine.getDefaultInterface().raiseEvent2();
+		statemachine.raiseEvent2();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals(
 		assertEquals(
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
-				2, statemachine.getDefaultInterface().getVarJ());
+				2, statemachine.getVarJ());
 
 
 		// Check timer behavior
 		// Check timer behavior
-		while (statemachine.getDefaultInterface().getVarJ() != 3) {
+		while (statemachine.getVarJ() != 3) {
 			statemachine.runCycle();
 			statemachine.runCycle();
 			Thread.sleep(junitSleepTime);
 			Thread.sleep(junitSleepTime);
 		}
 		}
@@ -130,16 +129,16 @@ public class TestLocalActionsCycleBasedStatemachine {
 				time2 <= expectedTime + timerThreshold);
 				time2 <= expectedTime + timerThreshold);
 
 
 		// Check local reaction for Event4
 		// Check local reaction for Event4
-		statemachine.getDefaultInterface().raiseEvent4();
+		statemachine.raiseEvent4();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals(
 		assertEquals(
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
-				2, statemachine.getDefaultInterface().getVarJ());
+				2, statemachine.getVarJ());
 
 
 		// Check local reaction for exit
 		// Check local reaction for exit
-		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.raiseEvent3();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertEquals("Error in local reaction \"exit / j=0;\" of State2", 0,
 		assertEquals("Error in local reaction \"exit / j=0;\" of State2", 0,
-				statemachine.getDefaultInterface().getVarJ());
+				statemachine.getVarJ());
 	}
 	}
 }
 }

+ 19 - 20
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestLocalActionsEventBasedStatemachine.java

@@ -54,7 +54,7 @@ public class TestLocalActionsEventBasedStatemachine {
 		statemachine = null;
 		statemachine = null;
 	}
 	}
 
 
-	@Test (expected = NullPointerException.class)
+	@Test(expected = NullPointerException.class)
 	public void testExceptionHandling() {
 	public void testExceptionHandling() {
 		Test_LocalActionsCycleBasedStatemachine statemachine = new Test_LocalActionsCycleBasedStatemachine();
 		Test_LocalActionsCycleBasedStatemachine statemachine = new Test_LocalActionsCycleBasedStatemachine();
 		statemachine.enter();
 		statemachine.enter();
@@ -64,8 +64,7 @@ public class TestLocalActionsEventBasedStatemachine {
 	public void testStatemachineEntry() {
 	public void testStatemachineEntry() {
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 		assertTrue("Statemachine isn't in State: " + State.State1.name() + ".",
 				statemachine.isStateActive(State.State1));
 				statemachine.isStateActive(State.State1));
-		assertEquals("Variable i not set to 1", 1, statemachine
-				.getDefaultInterface().getVarI());
+		assertEquals("Variable i not set to 1", 1, statemachine.getVarI());
 	}
 	}
 
 
 	@Test
 	@Test
@@ -73,22 +72,22 @@ public class TestLocalActionsEventBasedStatemachine {
 		final long time = System.currentTimeMillis();
 		final long time = System.currentTimeMillis();
 
 
 		assertEquals("Error in local reaction \"Entry / i=1;\" of State1", 1,
 		assertEquals("Error in local reaction \"Entry / i=1;\" of State1", 1,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
-		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.raiseEvent3();
 		assertEquals("Error in local reaction \"onCycle / i=2;\" of State1", 2,
 		assertEquals("Error in local reaction \"onCycle / i=2;\" of State1", 2,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
-		statemachine.getDefaultInterface().raiseEvent2();
+		statemachine.raiseEvent2();
 		assertEquals("Error in local reaction \"Event2 / i=3;\" of State1", 3,
 		assertEquals("Error in local reaction \"Event2 / i=3;\" of State1", 3,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
 		// Check timer behavior
 		// Check timer behavior
-		while (statemachine.getDefaultInterface().getVarC() < 10) {
+		while (statemachine.getVarC() < 10) {
 			Thread.sleep(junitSleepTime);
 			Thread.sleep(junitSleepTime);
 		}
 		}
 		final long time2 = System.currentTimeMillis() - time;
 		final long time2 = System.currentTimeMillis() - time;
-		final long expectedTime = statemachine.getDefaultInterface().getVarC() * 100;
+		final long expectedTime = statemachine.getVarC() * 100;
 		final long delta = time2 - expectedTime;
 		final long delta = time2 - expectedTime;
 		assertTrue("Timer threshold overflow in State 1. Delta is " + delta
 		assertTrue("Timer threshold overflow in State 1. Delta is " + delta
 				+ " ms. Threshold is: " + timerThreshold + " ms.",
 				+ " ms. Threshold is: " + timerThreshold + " ms.",
@@ -98,23 +97,23 @@ public class TestLocalActionsEventBasedStatemachine {
 	@Test
 	@Test
 	public void testState2LocalReaction() throws InterruptedException {
 	public void testState2LocalReaction() throws InterruptedException {
 		// Switch to State2;
 		// Switch to State2;
-		statemachine.getDefaultInterface().raiseEvent1();
+		statemachine.raiseEvent1();
 		final long time = System.currentTimeMillis();
 		final long time = System.currentTimeMillis();
 
 
 		assertEquals("Error in local reaction \"exit / i=0;\" of State1", 0,
 		assertEquals("Error in local reaction \"exit / i=0;\" of State1", 0,
-				statemachine.getDefaultInterface().getVarI());
+				statemachine.getVarI());
 
 
 		assertEquals("Error in local reaction \"entry / j=0;\" of State2", 1,
 		assertEquals("Error in local reaction \"entry / j=0;\" of State2", 1,
-				statemachine.getDefaultInterface().getVarJ());
+				statemachine.getVarJ());
 
 
 		// Check local reaction for Event2
 		// Check local reaction for Event2
-		statemachine.getDefaultInterface().raiseEvent2();
+		statemachine.raiseEvent2();
 		assertEquals(
 		assertEquals(
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
-				2, statemachine.getDefaultInterface().getVarJ());
+				2, statemachine.getVarJ());
 
 
 		// Check timer behavior
 		// Check timer behavior
-		while (statemachine.getDefaultInterface().getVarJ() != 3) {
+		while (statemachine.getVarJ() != 3) {
 			Thread.sleep(junitSleepTime);
 			Thread.sleep(junitSleepTime);
 		}
 		}
 		final long time2 = System.currentTimeMillis() - time;
 		final long time2 = System.currentTimeMillis() - time;
@@ -126,14 +125,14 @@ public class TestLocalActionsEventBasedStatemachine {
 				time2 <= expectedTime + timerThreshold);
 				time2 <= expectedTime + timerThreshold);
 
 
 		// Check local reaction for Event4
 		// Check local reaction for Event4
-		statemachine.getDefaultInterface().raiseEvent4();
+		statemachine.raiseEvent4();
 		assertEquals(
 		assertEquals(
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
 				"Error in local reaction \"Event2, Event4 / j=2;\" of State2",
-				2, statemachine.getDefaultInterface().getVarJ());
+				2, statemachine.getVarJ());
 
 
 		// Check local reaction for exit
 		// Check local reaction for exit
-		statemachine.getDefaultInterface().raiseEvent3();
+		statemachine.raiseEvent3();
 		assertEquals("Error in local reaction \"exit / j=0;\" of State2", 0,
 		assertEquals("Error in local reaction \"exit / j=0;\" of State2", 0,
-				statemachine.getDefaultInterface().getVarJ());
+				statemachine.getVarJ());
 	}
 	}
 }
 }

+ 10 - 12
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsCycleBasedStatemachine.java

@@ -51,27 +51,27 @@ public class TestParallelRegionsCycleBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineHierarchyLevelOne() {
 	public void testStatemachineHierarchyLevelOne() {
-		sm.getDefaultInterface().raiseEvent1();
+		sm.raiseEvent1();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State3 && State7
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent5();
+		sm.raiseEvent5();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State3 && State8
 		// Test if state is changed to State3 && State8
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State8));
 		assertTrue(sm.isStateActive(State.State8));
 		assertFalse(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent6();
+		sm.raiseEvent6();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State3 && State7
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State8));
 		assertFalse(sm.isStateActive(State.State8));
 
 
-		sm.getDefaultInterface().raiseEvent3();
+		sm.raiseEvent3();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is back to State1
 		// Test if state is back to State1
 		assertTrue(sm.isStateActive(State.State1));
 		assertTrue(sm.isStateActive(State.State1));
@@ -82,20 +82,20 @@ public class TestParallelRegionsCycleBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineHierarchyLevelTwo() {
 	public void testStatemachineHierarchyLevelTwo() {
-		sm.getDefaultInterface().raiseEvent1();
+		sm.raiseEvent1();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State3 && State7
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent2();
+		sm.raiseEvent2();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State9, State5 and State7
 		// Test if state is changed to State9, State5 and State7
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State5));
 		assertTrue(sm.isStateActive(State.State5));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent3();
+		sm.raiseEvent3();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State9, State6 and State8
 		// Test if state is changed to State9, State6 and State8
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State9));
@@ -103,7 +103,7 @@ public class TestParallelRegionsCycleBasedStatemachine {
 		assertFalse(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State8));
 		assertTrue(sm.isStateActive(State.State8));
 
 
-		sm.getDefaultInterface().raiseEvent6();
+		sm.raiseEvent6();
 		sm.runCycle();
 		sm.runCycle();
 		// Test if state is changed to State9, State6 and State8
 		// Test if state is changed to State9, State6 and State8
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State9));
@@ -112,11 +112,9 @@ public class TestParallelRegionsCycleBasedStatemachine {
 		assertFalse(sm.isStateActive(State.State8));
 		assertFalse(sm.isStateActive(State.State8));
 	}
 	}
 
 
-	
-	
 	@Test
 	@Test
 	public void testEntryAndExitExecution() {
 	public void testEntryAndExitExecution() {
-		DefaultInterface di = sm.getDefaultInterface();
+		DefaultInterface di = sm;
 
 
 		di.raiseEvent1();
 		di.raiseEvent1();
 		sm.runCycle();
 		sm.runCycle();
@@ -167,7 +165,7 @@ public class TestParallelRegionsCycleBasedStatemachine {
 		hierarchy -= 3;
 		hierarchy -= 3;
 		assertEquals(hierarchy, di.getVarHierarchy());
 		assertEquals(hierarchy, di.getVarHierarchy());
 
 
-		//Jump to State6 && State9
+		// Jump to State6 && State9
 		di.raiseEvent11();
 		di.raiseEvent11();
 		sm.runCycle();
 		sm.runCycle();
 		// Exit State1
 		// Exit State1

+ 10 - 11
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestParallelRegionsEventBasedStatemachine.java

@@ -51,24 +51,24 @@ public class TestParallelRegionsEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineHierarchyLevelOne() throws InterruptedException {
 	public void testStatemachineHierarchyLevelOne() throws InterruptedException {
-		sm.getDefaultInterface().raiseEvent1();
+		sm.raiseEvent1();
 		// Test if state is changed to State3 && State7
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent5();
+		sm.raiseEvent5();
 		// Test if state is changed to State3 && State8
 		// Test if state is changed to State3 && State8
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State8));
 		assertTrue(sm.isStateActive(State.State8));
 		assertFalse(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent6();
+		sm.raiseEvent6();
 		// Test if state is changed to State3 && State7
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State8));
 		assertFalse(sm.isStateActive(State.State8));
 
 
-		sm.getDefaultInterface().raiseEvent3();
+		sm.raiseEvent3();
 		// Test if state is back to State1
 		// Test if state is back to State1
 		assertTrue(sm.isStateActive(State.State1));
 		assertTrue(sm.isStateActive(State.State1));
 		assertFalse(sm.isStateActive(State.State3));
 		assertFalse(sm.isStateActive(State.State3));
@@ -78,25 +78,25 @@ public class TestParallelRegionsEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testStatemachineHierarchyLevelTwo() throws InterruptedException {
 	public void testStatemachineHierarchyLevelTwo() throws InterruptedException {
-		sm.getDefaultInterface().raiseEvent1();
+		sm.raiseEvent1();
 		// Test if state is changed to State3 && State7
 		// Test if state is changed to State3 && State7
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State3));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent2();
+		sm.raiseEvent2();
 		// Test if state is changed to State9, State5 and State7
 		// Test if state is changed to State9, State5 and State7
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State5));
 		assertTrue(sm.isStateActive(State.State5));
 		assertTrue(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State7));
 
 
-		sm.getDefaultInterface().raiseEvent3();
+		sm.raiseEvent3();
 		// Test if state is changed to State9, State6 and State8
 		// Test if state is changed to State9, State6 and State8
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State6));
 		assertTrue(sm.isStateActive(State.State6));
 		assertFalse(sm.isStateActive(State.State7));
 		assertFalse(sm.isStateActive(State.State7));
 		assertTrue(sm.isStateActive(State.State8));
 		assertTrue(sm.isStateActive(State.State8));
 
 
-		sm.getDefaultInterface().raiseEvent6();
+		sm.raiseEvent6();
 		// Test if state is changed to State9, State6 and State8
 		// Test if state is changed to State9, State6 and State8
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State9));
 		assertTrue(sm.isStateActive(State.State6));
 		assertTrue(sm.isStateActive(State.State6));
@@ -106,7 +106,7 @@ public class TestParallelRegionsEventBasedStatemachine {
 
 
 	@Test
 	@Test
 	public void testEntryAndExitExecution() throws InterruptedException {
 	public void testEntryAndExitExecution() throws InterruptedException {
-		DefaultInterface di = sm.getDefaultInterface();
+		DefaultInterface di = sm;
 
 
 		di.raiseEvent1();
 		di.raiseEvent1();
 		// Exit State1
 		// Exit State1
@@ -150,7 +150,7 @@ public class TestParallelRegionsEventBasedStatemachine {
 		hierarchy -= 3;
 		hierarchy -= 3;
 		assertEquals(hierarchy, di.getVarHierarchy());
 		assertEquals(hierarchy, di.getVarHierarchy());
 
 
-		//Jump to State6 && State9
+		// Jump to State6 && State9
 		di.raiseEvent11();
 		di.raiseEvent11();
 		// Exit State1
 		// Exit State1
 		hierarchy = 2;
 		hierarchy = 2;
@@ -165,5 +165,4 @@ public class TestParallelRegionsEventBasedStatemachine {
 		assertEquals(hierarchy, di.getVarHierarchy());
 		assertEquals(hierarchy, di.getVarHierarchy());
 	}
 	}
 
 
-
 }
 }

+ 9 - 12
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestShallowHistoryCycleBasedStatemachine.java

@@ -14,14 +14,11 @@ public class TestShallowHistoryCycleBasedStatemachine {
 
 
 	private Test_ShallowHistoryCycleBasedStatemachine statemachine;
 	private Test_ShallowHistoryCycleBasedStatemachine statemachine;
 
 
-	private DefaultInterface dInterface;
-
 	@Before
 	@Before
 	public void setUp() {
 	public void setUp() {
 		statemachine = new Test_ShallowHistoryCycleBasedStatemachine();
 		statemachine = new Test_ShallowHistoryCycleBasedStatemachine();
 		statemachine.init();
 		statemachine.init();
 		statemachine.enter();
 		statemachine.enter();
-		dInterface = statemachine.getDefaultInterface();
 	}
 	}
 
 
 	@After
 	@After
@@ -32,43 +29,43 @@ public class TestShallowHistoryCycleBasedStatemachine {
 	@Test
 	@Test
 	public void testShallowHistory() {
 	public void testShallowHistory() {
 		// Change active states to State9;
 		// Change active states to State9;
-		dInterface.raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
-		dInterface.raiseEvent3();
+		statemachine.raiseEvent3();
 		statemachine.runCycle();
 		statemachine.runCycle();
-		dInterface.raiseEvent5();
+		statemachine.raiseEvent5();
 		statemachine.runCycle();
 		statemachine.runCycle();
-		dInterface.raiseEvent7();
+		statemachine.raiseEvent7();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 
 		// Leave State7. State9 should be saved as history.
 		// Leave State7. State9 should be saved as history.
-		dInterface.raiseEvent6();
+		statemachine.raiseEvent6();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State6));
 
 
 		// Reenter State7. State9 should be activated because of saved history.
 		// Reenter State7. State9 should be activated because of saved history.
-		dInterface.raiseEvent5();
+		statemachine.raiseEvent5();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 
 		// Leave State2. State4 and State9 should be saved as history.
 		// Leave State2. State4 and State9 should be saved as history.
-		dInterface.raiseEvent2();
+		statemachine.raiseEvent2();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State1));
 
 
 		// Reenter State2. State6 should be activated (History of State2).
 		// Reenter State2. State6 should be activated (History of State2).
-		dInterface.raiseEvent1();
+		statemachine.raiseEvent1();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 
 
 		// Reenter State7. State9 should be activated (History of State7).
 		// Reenter State7. State9 should be activated (History of State7).
-		dInterface.raiseEvent5();
+		statemachine.raiseEvent5();
 		statemachine.runCycle();
 		statemachine.runCycle();
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));

+ 9 - 12
test-plugins/org.yakindu.sct.generator.java.runtime.test/src/org/yakindu/sct/generator/java/runtime/test/TestShallowHistoryEventBasedStatemachine.java

@@ -14,14 +14,11 @@ public class TestShallowHistoryEventBasedStatemachine {
 
 
 	private Test_ShallowHistoryEventBasedStatemachine statemachine;
 	private Test_ShallowHistoryEventBasedStatemachine statemachine;
 
 
-	private DefaultInterface dInterface;
-
 	@Before
 	@Before
 	public void setUp() {
 	public void setUp() {
 		statemachine = new Test_ShallowHistoryEventBasedStatemachine();
 		statemachine = new Test_ShallowHistoryEventBasedStatemachine();
 		statemachine.init();
 		statemachine.init();
 		statemachine.enter();
 		statemachine.enter();
-		dInterface = statemachine.getDefaultInterface();
 	}
 	}
 
 
 	@After
 	@After
@@ -32,35 +29,35 @@ public class TestShallowHistoryEventBasedStatemachine {
 	@Test
 	@Test
 	public void testShallowHistory() {
 	public void testShallowHistory() {
 		// Change active states to State9;
 		// Change active states to State9;
-		dInterface.raiseEvent1();
-		dInterface.raiseEvent3();
-		dInterface.raiseEvent5();
-		dInterface.raiseEvent7();
+		statemachine.raiseEvent1();
+		statemachine.raiseEvent3();
+		statemachine.raiseEvent5();
+		statemachine.raiseEvent7();
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 
 		// Leave State7. State9 should be saved as history.
 		// Leave State7. State9 should be saved as history.
-		dInterface.raiseEvent6();
+		statemachine.raiseEvent6();
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State6));
 
 
 		// Reenter State7. State9 should be activated because of saved history.
 		// Reenter State7. State9 should be activated because of saved history.
-		dInterface.raiseEvent5();
+		statemachine.raiseEvent5();
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 
 
 		// Leave State2. State4 and State9 should be saved as history.
 		// Leave State2. State4 and State9 should be saved as history.
-		dInterface.raiseEvent2();
+		statemachine.raiseEvent2();
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertFalse(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State1));
 		assertTrue(statemachine.isStateActive(State.State1));
 
 
 		// Reenter State2. State6 should be activated (History of State2).
 		// Reenter State2. State6 should be activated (History of State2).
-		dInterface.raiseEvent1();
+		statemachine.raiseEvent1();
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State1));
 		assertFalse(statemachine.isStateActive(State.State1));
 
 
 		// Reenter State7. State9 should be activated (History of State7).
 		// Reenter State7. State9 should be activated (History of State7).
-		dInterface.raiseEvent5();
+		statemachine.raiseEvent5();
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertFalse(statemachine.isStateActive(State.State6));
 		assertTrue(statemachine.isStateActive(State.State9));
 		assertTrue(statemachine.isStateActive(State.State9));
 	}
 	}