public class FrontPanelBehaviour extends UsingMiniMock {
public void shouldContainTheButtonToStartTheGame() throws Exception {
WindowWrapper wrapper = new DefaultWindowWrapper("TestFrame");
Mock gameStarter = mock(GameRequestListener.class);
gameStarter.expects("requestStartGame");
FrontPanel panel = new FrontPanel((GameRequestListener)gameStarter);
JFrame frame = new JFrame();
frame.setName("TestFrame");
frame.getContentPane().add(panel);
frame.setVisible(true);
wrapper.clickButton("startGame.button");
verifyMocks();
JButton button = (JButton)wrapper.findComponent("startGame.button");
Ensure.that("Start Game", eq(button.getText()));
frame.dispose();
}