AbstractSimpleMatcher implements Matcher { @Override public boolean isApplicableTo(Class<?> parameterType, Class<?>... propertiesTypes) { return propertiesTypes.length == 1 && parameterType.isAssignableFrom(propertiesTypes[0]); }  @Override final boolean matches(Parameter parameter, Object value, Object... properties); @Override boolean isApplicableTo(Class<?> parameterType, Class<?>... propertiesTypes);  }
@Test public void testApplicableToSameType() { final NotMatchingSimpleMatcher matcher = new NotMatchingSimpleMatcher(); assertTrue(matcher.isApplicableTo(String.class, String.class)); }
@Test public void testApplicableToSubType() { final NotMatchingSimpleMatcher matcher = new NotMatchingSimpleMatcher(); assertTrue(matcher.isApplicableTo(Number.class, Integer.class)); }
@Test public void testNonApplicableToDifferentType() { final NotMatchingSimpleMatcher matcher = new NotMatchingSimpleMatcher(); assertFalse(matcher.isApplicableTo(String.class, Integer.class)); }
@Test public void shouldNotBeApplicableToDifferentNumberOfArguments() { final NotMatchingSimpleMatcher matcher = new NotMatchingSimpleMatcher(); assertFalse(matcher.isApplicableTo(String.class, String.class, String.class)); }