public void testBogusFormats() throws Exception {
  IllegalArgumentException expected=expectThrows(IllegalArgumentException.class,null);
  String msg=expected.getMessage();
  assertTrue(msg,msg.contains("Unknown"));
  assertTrue(msg,msg.contains("format"));
  assertTrue(msg,msg.contains("bogus"));
  expected=expectThrows(IllegalArgumentException.class,null);
  msg=expected.getMessage();
  assertTrue(msg,msg.contains("can not be specified"));
  assertTrue(msg,msg.contains("format"));
  assertTrue(msg,msg.contains("bogus"));
}

public void testBogusFormats ( ) throws Exception { IllegalArgumentException expected = expectThrows ( IllegalArgumentException . class , null ) ; String msg = expected . getMessage ( ) ; assertTrue ( msg , msg . contains ( "Unknown" ) ) ; assertTrue ( msg , msg . contains ( "format" ) ) ; assertTrue ( msg , msg . contains ( "bogus" ) ) ; expected = expectThrows ( IllegalArgumentException . class , null ) ; msg = expected . getMessage ( ) ; assertTrue ( msg , msg . contains ( "can not be specified" ) ) ; assertTrue ( msg , msg . contains ( "format" ) ) ; assertTrue ( msg , msg . contains ( "bogus" ) ) ; }
test that bogus arguments result in exception
