try { this.state1 = this.process.addState( "state.1", "state one" );  this.transition_1_finish = this.state1.addTransition( null, new BooleanGuard( false ), "1 to finish" ); this.process.setStartState( this.state1 ); } catch (DuplicateStateException e) { fail( e.getLocalizedMessage() ); }
this.state1 = this.process.addState( "state.1", "state one" );  this.state2 = this.process.addState( "state.2", "state two" );  this.state3 = this.process.addState( "state.3", "state three" );  this.state4 = this.process.addState( "state.4", "state four" );  this.transition1_2 = new Transition( this.state1, this.state2, new BooleanGuard( false ), "transition.1.2" );  this.state1.addTransition( this.transition1_2 );  this.transition2_3 = new Transition( this.state2, this.state3, new BooleanGuard( false ), "transition.2.3" );  this.state2.addTransition( this.transition2_3 );  this.transition3_4 = new Transition( this.state3, this.state4, new BooleanGuard( true ), "transition.3.4" );  this.state3.addTransition( this.transition3_4 );  this.transition1_end = new Transition( this.state1, null, new BooleanGuard( false ), "transition.1.end" );  this.state1.addTransition( this.transition1_end );  this.process.setStartState( this.state1 );
    public void setUp()    {        this.process = new Process( "test.process",                                    "test process" );        try        {            this.state1 = this.process.addState( "state.1",                                                 "state one" );                        this.transition_1_finish = this.state1.addTransition( null,                                                                  new BooleanGuard( false ),                                                                  "1 to finish" );            this.process.setStartState( this.state1 );        }        catch (DuplicateStateException e)        {            fail( e.getLocalizedMessage() );        }    }