int expected = 5; int actual = 5; assertThat(actual, equalTo(expected));
Object obj = null; assertThat(obj, nullValue());
String actual = "hello world"; assertThat(actual, containsString("world"));This matcher checks whether the actual string contains the expected substring. Java org.hamcrest Matchers is part of the Hamcrest library, which is a framework for writing matcher objects. It can be used as a standalone library or with testing frameworks like JUnit or TestNG.