protected void tearDown() {
        // cleanup. This shouldn't be needed, but we'll check
        if (analyzer != null) {
            try {
                analyzer.close();
            } catch (Exception ex) {
                assertFalse("Failed to close open analyzer: " + ex.getMessage(), true);
            }
        }
        
        if ((factory != null) && !factory.isClosed()) {
            try {
                factory.close();
            } catch (Exception ex) {
                assertFalse("Failed to close non-null factory: " + ex.getMessage(), true);
            }
        }
    }