Adding tests for detection functions.