move username and password to constructor and add test for every method in client and event