Migrate integration/api_test:TestGetEvents into a unit test and a CLI test

Docker-DCO-1.1-Signed-off-by: Guilherme Salgado <gsalgado@gmail.com> (github: )