@Test
public void canonAtomMaps() throws CDKException {

    SmilesParser   smipar = new SmilesParser(SilentChemObjectBuilder.getInstance());
    IAtomContainer mol    = smipar.parseSmiles("[*:2]C(CC[*:3])[*:1]");
    assertThat(new SmilesGenerator(SmiFlavor.Canonical|SmiFlavor.AtomAtomMap).create(mol),
               is("[*:1]C([*:2])CC[*:3]"));
    IAtomContainer mol2    = smipar.parseSmiles("[*:2]C(CC[*:1])[*:2]");
    assertThat(new SmilesGenerator(SmiFlavor.Canonical|SmiFlavor.AtomAtomMap).create(mol2),
               is("[*:1]CCC([*:2])[*:2]"));
}