@Test
public void testRegistryThrowsExceptionIfPathIsNatADirectory() throws IOException {

    m_tempFile = File.createTempFile("tempfile", ".txt");
    String deviceFileBaseDir = m_tempFile.getAbsolutePath();
    try {
        new PmaServerSessionFactory(deviceFileBaseDir, m_dm, m_netconfServer, m_das, m_entityRegistry, m_schemaRegistry,
                m_modelNodeDsmRegistry, m_adapterManager).init();
        fail("Expected an exception to be thrown here");
    } catch (Exception e) {
        assertTrue(e instanceof RuntimeException);
        assertEquals(m_tempFile.getAbsolutePath() + " is not a directory", e.getMessage());
    }
}