Tried to write a test for State pattern