@Test
public void testResolveCircular() {

    String key = "foo";
    Set<String> keySet = new HashSet<String>();
    keySet.add(key);
    JAXBConfigImpl config = new JAXBConfigImpl();
    try {
        config.resolve(key, keySet);
        Assert.fail("This should have failed due to a circular reference");
    } catch (ConfigurationException e) {
        ; // ignore
    }
}