@Test public void testRobotsText() throws Exception {

  WebApp app =
      WebApps.$for("test", TestWebApp.class, this, "ws").start(new WebApp() {
        @Override
        public void setup() {
          bind(MyTestJAXBContextResolver.class);
          bind(MyTestWebService.class);
        }
      });
  String baseUrl = baseUrl(app);
  try {
    //using system line separator here since that is what
    // TextView (via PrintWriter) seems to use.
    String[] robotsTxtOutput = getContent(baseUrl +
        RobotsTextPage.ROBOTS_TXT).trim().split(System.getProperty("line"
        + ".separator"));
    assertEquals(2, robotsTxtOutput.length);
    assertEquals("User-agent: *", robotsTxtOutput[0]);
    assertEquals("Disallow: /", robotsTxtOutput[1]);
  } finally {
    app.stop();
  }
}