add unittests for cortex test