Fix Test Failure and Refactoring with extracting Relation related syntax checking from StateMachineObjectBuilderImpl into Related