@Test public void provideDataReportsJvmIdentity() throws Exception { Map<String, Object> result = this.mocker.getComponentUnderTest().provideData(); Assert.assertNotNull(result); Assert.assertFalse(result.isEmpty()); Assert.assertEquals(System.getProperty("java.vendor"), result.get("javaVendor")); Assert.assertEquals(System.getProperty("java.version"), result.get("javaVersion")); Assert.assertEquals(System.getProperty("java.specification.version"), result.get("javaSpecificationVersion")); }
@Override public Map<String, Object> provideData() { Map<String, Object> jsonMap = new HashMap<>(); jsonMap.put(PROPERTY_JAVA_VENDOR, System.getProperty("java.vendor")); jsonMap.put(PROPERTY_JAVA_VERSION, System.getProperty("java.version")); jsonMap.put(PROPERTY_JAVA_SPECIFICATION_VERSION, System.getProperty("java.specification.version")); return jsonMap; }
JavaPingDataProvider implements PingDataProvider { @Override public Map<String, Object> provideData() { Map<String, Object> jsonMap = new HashMap<>(); jsonMap.put(PROPERTY_JAVA_VENDOR, System.getProperty("java.vendor")); jsonMap.put(PROPERTY_JAVA_VERSION, System.getProperty("java.version")); jsonMap.put(PROPERTY_JAVA_SPECIFICATION_VERSION, System.getProperty("java.specification.version")); return jsonMap; } }
JavaPingDataProvider implements PingDataProvider { @Override public Map<String, Object> provideData() { Map<String, Object> jsonMap = new HashMap<>(); jsonMap.put(PROPERTY_JAVA_VENDOR, System.getProperty("java.vendor")); jsonMap.put(PROPERTY_JAVA_VERSION, System.getProperty("java.version")); jsonMap.put(PROPERTY_JAVA_SPECIFICATION_VERSION, System.getProperty("java.specification.version")); return jsonMap; }  }
JavaPingDataProvider implements PingDataProvider { @Override public Map<String, Object> provideData() { Map<String, Object> jsonMap = new HashMap<>(); jsonMap.put(PROPERTY_JAVA_VENDOR, System.getProperty("java.vendor")); jsonMap.put(PROPERTY_JAVA_VERSION, System.getProperty("java.version")); jsonMap.put(PROPERTY_JAVA_SPECIFICATION_VERSION, System.getProperty("java.specification.version")); return jsonMap; }  @Override Map<String, Object> provideMapping(); @Override Map<String, Object> provideData(); }
JavaPingDataProvider implements PingDataProvider { @Override public Map<String, Object> provideData() { Map<String, Object> jsonMap = new HashMap<>(); jsonMap.put(PROPERTY_JAVA_VENDOR, System.getProperty("java.vendor")); jsonMap.put(PROPERTY_JAVA_VERSION, System.getProperty("java.version")); jsonMap.put(PROPERTY_JAVA_SPECIFICATION_VERSION, System.getProperty("java.specification.version")); return jsonMap; }  @Override Map<String, Object> provideMapping(); @Override Map<String, Object> provideData();  }