@Test public void getAppInfo() { String javaVersion = System.getProperty("java.version"); Assert.assertTrue(endpoint.get("appinfo").toString().contains(javaVersion)); }
private Object getAppInfo() { Map<String, String> appinfo = new TreeMap<>(); add(appinfo, "appName", "NETFLIX_APP"); add(appinfo, "hostID", "EC2_INSTANCE_ID"); add(appinfo, "hostName", "EC2_PUBLIC_HOSTNAME"); add(appinfo, "ip", "EC2_PUBLIC_IP"); appinfo.put("javaVersion", System.getProperty("java.version")); Map<String, Object> wrapper = new TreeMap<>(); wrapper.put("appinfo", new TreeMap<>(appinfo)); return wrapper; }
BaseServerEndpoint implements HttpEndpoint { private Object getAppInfo() { Map<String, String> appinfo = new TreeMap<>(); add(appinfo, "appName", "NETFLIX_APP"); add(appinfo, "hostID", "EC2_INSTANCE_ID"); add(appinfo, "hostName", "EC2_PUBLIC_HOSTNAME"); add(appinfo, "ip", "EC2_PUBLIC_IP"); appinfo.put("javaVersion", System.getProperty("java.version")); Map<String, Object> wrapper = new TreeMap<>(); wrapper.put("appinfo", new TreeMap<>(appinfo)); return wrapper; } }
BaseServerEndpoint implements HttpEndpoint { private Object getAppInfo() { Map<String, String> appinfo = new TreeMap<>(); add(appinfo, "appName", "NETFLIX_APP"); add(appinfo, "hostID", "EC2_INSTANCE_ID"); add(appinfo, "hostName", "EC2_PUBLIC_HOSTNAME"); add(appinfo, "ip", "EC2_PUBLIC_IP"); appinfo.put("javaVersion", System.getProperty("java.version")); Map<String, Object> wrapper = new TreeMap<>(); wrapper.put("appinfo", new TreeMap<>(appinfo)); return wrapper; } @Inject  BaseServerEndpoint(Registry registry); }
BaseServerEndpoint implements HttpEndpoint { private Object getAppInfo() { Map<String, String> appinfo = new TreeMap<>(); add(appinfo, "appName", "NETFLIX_APP"); add(appinfo, "hostID", "EC2_INSTANCE_ID"); add(appinfo, "hostName", "EC2_PUBLIC_HOSTNAME"); add(appinfo, "ip", "EC2_PUBLIC_IP"); appinfo.put("javaVersion", System.getProperty("java.version")); Map<String, Object> wrapper = new TreeMap<>(); wrapper.put("appinfo", new TreeMap<>(appinfo)); return wrapper; } @Inject  BaseServerEndpoint(Registry registry); @Override Object get(); @Override Object get(String path); }
BaseServerEndpoint implements HttpEndpoint { private Object getAppInfo() { Map<String, String> appinfo = new TreeMap<>(); add(appinfo, "appName", "NETFLIX_APP"); add(appinfo, "hostID", "EC2_INSTANCE_ID"); add(appinfo, "hostName", "EC2_PUBLIC_HOSTNAME"); add(appinfo, "ip", "EC2_PUBLIC_IP"); appinfo.put("javaVersion", System.getProperty("java.version")); Map<String, Object> wrapper = new TreeMap<>(); wrapper.put("appinfo", new TreeMap<>(appinfo)); return wrapper; } @Inject  BaseServerEndpoint(Registry registry); @Override Object get(); @Override Object get(String path);  }