@Test
public void radicals() {

    CxSmilesState state = new CxSmilesState();
    state.atomRads = new HashMap<>();
    state.atomRads.put(2, CxSmilesState.Radical.Monovalent);
    state.atomRads.put(6, CxSmilesState.Radical.Monovalent);
    state.atomRads.put(4, CxSmilesState.Radical.Divalent);
    assertThat(CxSmilesGenerator.generate(state, SmiFlavor.CxSmiles, new int[0], new int[]{7, 6, 5, 4, 3, 2, 1, 0}),
               is(" |^1:1,5,^2:3|"));
}