@Test
 public void sendsOutputFromGalleryView() throws Exception {
   GalleryView view = new GalleryView("a title", new Picture[] {new Picture("foo.jpg")});
   controller.handle("/", response);
   assertEquals(view.toHtml(), response.htmlWrittenByController);
 }
 @Test
 public void setsContentTypeHtml() throws Exception {
   controller.handle("/", response);
   assertEquals("text/html", response.contentTypeSetByController);
 }
 @Test
 public void handlesOnlyRootUrl() throws Exception {
   assertTrue("handles /", controller.wantsToHandle("/"));
   assertFalse("does not handle anything else", controller.wantsToHandle("/anything"));
 }
 @Test
 public void returnsSuccessCode() throws Exception {
   controller.handle("/", response);
   assertEquals(200, response.statusSetByController);
 }