TwitterPublisher implements Publisher { public void setPassword(String s) { password = s; } TwitterPublisher();   TwitterPublisher(TwitterProxy proxy); void publish(Element cruisecontrolLog); void validate(); void setPassword(String s); void setUsername(String s);  }
@Test public void validateExceptionShouldIndicateMissingUsername() { TwitterPublisher twitter = new TwitterPublisher(); twitter.setPassword("arbitrary"); String expected = "'username' is required for TwitterPublisher"; assertValidateFails(twitter, expected); }