'Test the Set() and Resolve() methods.'

def testSetResolve(self):

    predicate = 'task:00000001'
    value = rdf_flows.GrrMessage(session_id='session')
    data_store.DB.Set(self.test_row, predicate, value, token=self.token)
    time.sleep(1)
    data_store.DB.Set((self.test_row + 'X'), predicate, value, token=self.token)
    (stored_proto, _) = data_store.DB.Resolve(self.test_row, predicate, token=self.token)
    stored_proto = rdf_flows.GrrMessage.FromSerializedString(stored_proto)
    self.assertEqual(stored_proto.session_id, value.session_id)
