JUnit 4.4 includes several major new features designed to even better capture developer intent:
assertThat(string, containsString("abc"));
assumeThat(File.separatorChar, is('/'));
Theories (globally true statements):
@Theory public void filenameIncludesUsername(String username) {
assumeThat(username, not(containsString("/")));
assertThat(new User(username).configFileName(), containsString(username));
}
There are several minor new features, and important bug fixes over 4.3.1. For more information, please see the release notes at
http://junit.sourceforge.net/doc/ReleaseNotes4.4.html