@Test
public void testBadSource() {

    try {
        // Read definitions.
        reader.read(new String("Bad Input"));
        fail("Should've thrown an exception.");
    } catch (DefinitionsFactoryException e) {
        // correct.
        if (log.isDebugEnabled()) {
            log.debug("Exception caught, it is OK", e);
        }
    } catch (Exception e) {
        fail("Exception reading configuration." + e);
    }
}