Moved keep alive logic int KeepAliveMessage class and added test