@Test
public void testMakeAtomContainer() {

    IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
    IAtom atom = builder.newInstance(IAtom.class, "C");
    IAtom exclude = builder.newInstance(IAtom.class, "C");
    IAtom a1 = builder.newInstance(IAtom.class, "C");
    IAtom a2 = builder.newInstance(IAtom.class, "C");
    IBond[] bonds = new IBond[]{builder.newInstance(IBond.class, atom, exclude),
            builder.newInstance(IBond.class, a1, a2), builder.newInstance(IBond.class, a1, atom),
            builder.newInstance(IBond.class, a2, exclude)};
    IAtomContainer part = FragmentUtils.makeAtomContainer(atom, Arrays.asList(bonds), exclude);
    assertThat(part.getAtomCount(), is(3));
    assertThat(part.getBondCount(), is(2));
    Assert.assertTrue(part.contains(atom));
    Assert.assertTrue(part.contains(a1));
    Assert.assertTrue(part.contains(a2));
    Assert.assertFalse(part.contains(exclude));
    Assert.assertTrue(part.contains(bonds[1]));
    Assert.assertTrue(part.contains(bonds[2]));
}