@SuppressWarnings("unchecked") @Test public void quadrupleBond() throws Exception { IAtom u = mock(IAtom.class); IAtom v = mock(IAtom.class); IBond b = new Bond(u, v, IBond.Order.QUADRUPLE); Map<IAtom, Integer> mock = mock(Map.class); when(mock.get(u)).thenReturn(0); when(mock.get(v)).thenReturn(1); CDKToBeam c2g = new CDKToBeam(); assertThat(c2g.toBeamEdge(b, mock), is(uk.ac.ebi.beam.Bond.QUADRUPLE.edge(0, 1))); }
@SuppressWarnings("unchecked") @Test public void aromaticBond() throws Exception { IAtom u = mock(IAtom.class); IAtom v = mock(IAtom.class); IBond b = new Bond(u, v); b.setFlag(CDKConstants.ISAROMATIC, true); Map<IAtom, Integer> mock = mock(Map.class); when(mock.get(u)).thenReturn(0); when(mock.get(v)).thenReturn(1); CDKToBeam c2g = new CDKToBeam(); assertThat(c2g.toBeamEdge(b, mock), is(uk.ac.ebi.beam.Bond.AROMATIC.edge(0, 1))); }