@Test
public void matches() throws Exception {

    ExplicitConnectionAtom matcher = new ExplicitConnectionAtom(2, mock(IChemObjectBuilder.class));
    IAtom atom = mock(IAtom.class);
    when(atom.getProperty(SMARTSAtomInvariants.KEY)).thenReturn(
            new SMARTSAtomInvariants(mock(IAtomContainer.class), 0, 0, Collections.<Integer> emptySet(), 0, 0, // <- degree not used due to old CDK bug
                    2, 0));
    assertTrue(matcher.matches(atom));
}