### Question:
Workflow implements Serializable { public final void addMessageArgument( final Serializable obj ) { if( obj instanceof String || obj instanceof Date || obj instanceof Number ) { m_messageArgs.add( obj ); return; } throw new IllegalArgumentException( "Message arguments must be of type String, Date or Number." ); } 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 testGetMessageArgObjects() { w.addMessageArgument( new Date() ); w.addMessageArgument( 1 ); w.addMessageArgument( 2d ); w.addMessageArgument( new BigDecimal( "3.14" ) ); try { w.addMessageArgument( w ); } catch( final IllegalArgumentException e ) { return; } Assertions.fail( "Illegal argument passed..." ); }