AbstractBinaryMatcher implements Matcher { @Override public boolean isApplicableTo(Class<?> parameterType, Class<?>... propertiesTypes) { return propertiesTypes.length == 2 && parameterType.isAssignableFrom(propertiesTypes[0]) && parameterType.isAssignableFrom(propertiesTypes[1]); }  @Override final boolean matches(Parameter parameter, Object value, Object... properties); @Override boolean isApplicableTo(Class<?> parameterType, Class<?>... propertiesTypes);  }
@Test public void testIsApplicableTo() { final NotMatchingBinaryMatcher matcher = new NotMatchingBinaryMatcher(); assertTrue(matcher.isApplicableTo(String.class, String.class, String.class)); }
@Test public void shouldNotBeApplicableToOnlyOneArgument() { final NotMatchingBinaryMatcher matcher = new NotMatchingBinaryMatcher(); assertFalse(matcher.isApplicableTo(String.class, String.class)); }
@Test public void shouldNotBeApplicableToIncompatibleFirstArgument() { final NotMatchingBinaryMatcher matcher = new NotMatchingBinaryMatcher(); assertFalse(matcher.isApplicableTo(String.class, Integer.class, String.class)); }
@Test public void shouldNotBeApplicableToIncompatibleSecondArgument() { final NotMatchingBinaryMatcher matcher = new NotMatchingBinaryMatcher(); assertFalse(matcher.isApplicableTo(String.class, String.class, Integer.class)); }