Unit tests for contains() method.