### Question:
UuidMatcher extends BaseMatcher<String> { @Override public boolean matches(Object item) { try { UUID.fromString(String.valueOf(item)); } catch (IllegalArgumentException exception) { return false; } return true; }  @Override boolean matches(Object item); @Override void describeTo(Description description); static Matcher<String> isUuid();  }### Answer:
@Test public void isUuidShouldMatch() { assertThat(matcher.matches("892d2942-4253-43dd-8c82-81fe6b2b9db5")).isTrue(); assertThat(matcher.matches(UUID.randomUUID().toString())).isTrue(); }
@Test public void isUuidShouldNotMatch() { assertThat(matcher.matches("892d2942-4253")).isFalse(); assertThat(matcher.matches("not a uuid")).isFalse(); assertThat(matcher.matches(null)).isFalse(); }