@Test public void HelloInfo_test() { String result = HelloAppEngine.getInfo(); assertThat(result) .named("HelloAppEngine.getInfo") .containsMatch("^Version:\\s+.+OS:\\s+.+User:\\s"); }
public static String getInfo() { return "Version: " + System.getProperty("java.version") + " OS: " + System.getProperty("os.name") + " User: " + System.getProperty("user.name"); }
HelloAppEngine extends HttpServlet { public static String getInfo() { return "Version: " + System.getProperty("java.version") + " OS: " + System.getProperty("os.name") + " User: " + System.getProperty("user.name"); } }
HelloAppEngine extends HttpServlet { public static String getInfo() { return "Version: " + System.getProperty("java.version") + " OS: " + System.getProperty("os.name") + " User: " + System.getProperty("user.name"); }  }
HelloAppEngine extends HttpServlet { public static String getInfo() { return "Version: " + System.getProperty("java.version") + " OS: " + System.getProperty("os.name") + " User: " + System.getProperty("user.name"); }  @Override void doGet(HttpServletRequest request, HttpServletResponse response); static String getInfo(); }
HelloAppEngine extends HttpServlet { public static String getInfo() { return "Version: " + System.getProperty("java.version") + " OS: " + System.getProperty("os.name") + " User: " + System.getProperty("user.name"); }  @Override void doGet(HttpServletRequest request, HttpServletResponse response); static String getInfo();  }