StartingWithMatcher extends AbstractSimpleStringMatcher { @Override protected boolean matches(String actual, String argument) { return actual != null && argument != null && actual.toLowerCase().startsWith(argument.toLowerCase()); }    }
@Test public void testWhenActualIsNull() { assertThat(new StartingWithMatcher().matches(null, ""), is(false)); }
@Test public void testWhenParameterIsNull() { assertThat(new StartingWithMatcher().matches("", null), is(false)); }
@Test public void testWhenBothAreNull() { assertThat(new StartingWithMatcher().matches(null, null), is(false)); }
@Test public void testWhenActualDoesNotStartWithParameter() { assertThat(new StartingWithMatcher().matches("xyz", "abc"), is(false)); }
@Test public void testWhenActualStartsWithParameter() { assertThat(new StartingWithMatcher().matches("HelloWorld", "HELLO"), is(true)); }