### Question:
Workflow implements Serializable { public final synchronized void waitstate() { if ( m_state != RUNNING ) { throw new IllegalStateException( "Workflow is not running; cannot pause." ); } m_state = WAITING; WikiEventEmitter.fireWorkflowEvent( this, WorkflowEvent.WAITING ); } Workflow( final String messageKey, final Principal owner ); final synchronized void abort( final Context context ); final void addMessageArgument( final Serializable obj ); final synchronized Principal getCurrentActor(); final int getCurrentState(); final Step getCurrentStep(); final Object getAttribute( final String attr ); final Map< String, Serializable > getAttributes(); final Date getEndTime(); final synchronized int getId(); final Serializable[] getMessageArguments(); final String getMessageKey(); final Principal getOwner(); final Date getStartTime(); final List< Step > getHistory(); final boolean isAborted(); final synchronized boolean isCompleted(); final boolean isStarted(); final Step getPreviousStep(); final synchronized void restart( final Context context ); final void setAttribute( final String attr, final Serializable obj ); final synchronized void setFirstStep( final Step step ); final synchronized void setId( final int id ); final synchronized void start( final Context context ); final synchronized void waitstate(); static final int ID_NOT_SET; static final int COMPLETED; static final int ABORTED; static final int WAITING; static final int RUNNING; static final int CREATED; }### Answer:
@Test public void testWaitstate() throws WikiException { w.start( null ); Assertions.assertEquals( Workflow.WAITING, w.getCurrentState() ); }