### Question:
PlayerGame implements Tickable { @Override public void tick() { joystick.tick(); } PlayerGame(Player player, Game game, String roomName); static PlayerGame by(Game game); @Override boolean equals(Object o); @Override int hashCode(); void remove(Consumer<PlayerGame> onRemove); GameField getField(); @Override String toString(); @Override void tick(); GameType getGameType(); void setRoomName(String roomName); Player getPlayer(); String popLastCommand(); void clearScore();  }### Answer:
@Test public void testWorkWithJoystick() { Joystick joystick = playerGame.getJoystick(); Joystick real = mock(Joystick.class); when(game.getJoystick()).thenReturn(real); joystick.act(1, 2, 3); joystick.down(); playerGame.tick(); InOrder inOrder = inOrder(real); inOrder.verify(real).act(1, 2, 3); inOrder.verify(real).down(); }