It sounds like you're talking about a web page which executes a search, likely going all the way back to a database. It's likely your implementation is mostly executing in the db
SHOULD_RETURN_EXACT_TITLE_MATCHES()
SHOULD_RETURN_EXACT_UID_MATCHES()
SHOULD_MATCH_MIDDLE_OF_STRING
SHOULD_SEARCH_FIRST_AND_LAST_NAME
A unit is a small independent section of your code that you can test independently.
jUnit is a test framework with which you can write and execute unit tests.
If your feature is implemented by a single or limited number of classes and you can isolate it from other dependencies (e.g. by injecting mocks, see https://code.google.com/p/mockito/) you can and should write unit tests for it.