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