unit tests for search inv