Match Any Provided Value
Use anyOf matcher to match an expected value against any of the provided values. matchers/universal-compare Universal Compare rule is applicable. Groovy def dateAsText = "2018-06-10" dateAsText.should == anyOf("2018-06-11", LocalDate.of(2018, 6, 10)) Check matchers/import-and-dependencies Import And Dependencies for prerequisites. Java String dateAsText = "2018-06-10"; actual(dateAsText).shouldBe(anyOf("2018-06-11", LocalDate.of(2018, 6, 10))); Check matchers/import-and-dependencies Import And Dependencies for prerequisites.