### Question:
HelloWorld { public void setPhrase( String phrase ) throws IllegalArgumentException { if( phrase == null ) { throw new IllegalArgumentException( "Phrase may not be null " ); } this.phrase = phrase; }  String getPhrase(); void setPhrase( String phrase ); String getName(); void setName( String name ); String say();  }### Answer:
@Test public void givenHelloWorldWhenSetInvalidPhraseThenThrowException() { try { helloWorld.setPhrase( null ); fail( "Should not be allowed to set phrase to null" ); } catch( IllegalArgumentException e ) { } }