added unit test to with where clause