added unit test for hasValue