add "GetEventsByEnv" method for env key/value pair search

add tests for "GetEventsByEnv" method