@Test
public void testDictionaryInClassPath() throws Exception {

    URLClassLoader customClassLoader = new URLClassLoader(new URL[] { new URL("file:etc") },
            getClass().getClassLoader());
    Thread currentThread = Thread.currentThread();
    ClassLoader previousContextClassLoader = currentThread.getContextClassLoader();
    currentThread.setContextClassLoader(customClassLoader);
    try {
        DataDictionary dd = new DataDictionary("FIX40.xml");
        assertEquals("wrong field name", "Currency", dd.getFieldName(15));
        // It worked!
    } finally {
        currentThread.setContextClassLoader(previousContextClassLoader);
    }
}