content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 20:43:32 GMT 2024
   */
  
  package uk.me.jockmacmad.jstate.state;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import java.util.Vector;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import uk.me.jockmacmad.jstate.state.EndState;
  import uk.me.jockmacmad.jstate.state.Event;
  import uk.me.jockmacmad.jstate.state.IGuardCondition;
  import uk.me.jockmacmad.jstate.state.IState;
  import uk.me.jockmacmad.jstate.state.StartState;
  import uk.me.jockmacmad.jstate.state.Transition;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class Transition_ESTest extends Transition_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetTriggerEventReturningNonNull() throws Throwable  {
        // Given: A transition with a trigger event named ">" and end states
        Vector<Object> arg2 = new Vector<Object>();
        Event arg1 = new Event(">", arg2, arg2);
        EndState arg3 = new EndState();
        Transition transition = new Transition(">", arg1, arg3, arg3);
        
        // When: We get the trigger event of the transition
        Event triggerEvent = transition.getTriggerEvent();
        
        // Then: The trigger event should have a name ">"
        assertEquals(">", triggerEvent.getName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningTrue() throws Throwable  {
        // Create two instances of the Transition class with the same arguments
        Vector<Object> arg2 = new Vector<Object>();
        Event arg1 = new Event(">", arg2, arg2);
        EndState arg3 = new EndState();
        Transition transition1 = new Transition(">", arg1, arg3, arg3);
        Transition transition2 = new Transition(">", arg1, arg3, arg3);
        
        // Check if the two instances are equal
        assertTrue(transition1.equals(transition2));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHashCode() throws Throwable  {
        // rollbacked to evosuite
        Vector<Object> arg2 = new Vector<Object>();
        Event arg1 = new Event(">", arg2, arg2);
        EndState arg3 = new EndState();
        Transition transition = new Transition(">", arg1, arg3, arg3);
        transition.hashCode();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testWillTrigger() throws Throwable  {
        // This test ensures that the Transition will not trigger if the current state and event arguments match but the next state is different.
        
        Vector<Object> arg2 = new Vector<Object>();
        Event arg1 = new Event(">", arg2, arg2);
        EndState arg0 = new EndState();
        Transition transition = new Transition(">", arg1, arg0, arg0);
        
        boolean willTrigger = transition.willTrigger(arg0, arg1);
        assertFalse(willTrigger);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTrigger() throws Throwable  {
        // rollbacked to evosuite
        Vector<Object> arg2 = new Vector<Object>();
        Event arg1 = new Event(">", arg2, arg2);
        EndState arg0 = new EndState();
        Transition transition = new Transition(">", arg1, arg0, arg0);
        IState trigger = transition.trigger(arg0, arg1);
        assertEquals("com.objectmentors.state.EndState", trigger.getName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningFalse() throws Throwable  {
        // Given a Transition object with the same event and start state as this one,
        StartState arg0 = StartState.getSingleton();
        Transition transition = new Transition("com.objectmentors.state.StartState", (Event) null, arg0, arg0);
        
        // When we compare it to this object with the same event and start state as this one,
        boolean equals = transition.equals(arg0);
        
        // Then they should not be equal.
        assertFalse(equals);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetTriggerEventReturningNull() throws Throwable  {
        // Given: The Transition object is created with empty arguments for the source and target states
        EndState arg1 = new EndState();
        Transition transition = new Transition("", (Event) null, arg1, arg1);
        
        // When: The trigger event of the transition is retrieved
        Event triggerEvent = transition.getTriggerEvent();
        
        // Then: The trigger event should be null
        assertNull(triggerEvent);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddGuardCondition() throws Throwable  {
        // rollbacked to evosuite
        StartState arg3 = StartState.getSingleton();
        Transition transition = new Transition("com.objectmentors.state.StartState", (Event) null, arg3, arg3);
        transition.addGuardCondition((IGuardCondition) null);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToString() throws Throwable  {
        // rollbacked to evosuite
        StartState arg3 = StartState.getSingleton();
        Transition transition = new Transition("com.objectmentors.state.StartState", (Event) null, arg3, arg3);
        String string = transition.toString();
        assertNotNull(string);
    }
  }
  