added tests for define functionality