Using the Hamcrest CoreMatcher (included in JUnit 4.4 and later) and assertThat():
assertThat(myString, anyOf(is("value1"), is("value2")));
Using the Hamcrest CoreMatcher (included in JUnit 4.4 and later) and assertThat():
assertThat(myString, anyOf(is("value1"), is("value2")));