assertEquals(StoreException.Type.INVALID_VAR_ID, exc.getType());
}
}
+
+ @Test
+ public void testGetVarId_notFoundIsStored() throws SQLException, TypeMismatchException {
+ LocalVariable var = new LocalVariable(2345678901L, "VariableNameDoesNotYetExist", "VARIABLE_READ");
+
+ Long varId = m_store.getVarId(var);
+ assertNotNull(varId);
+ assertTrue(varId.longValue() > 0);
+
+ Long secondVarId = m_store.getVarId(var);
+ assertEquals(varId, secondVarId);
+ }
}