PropertySource { @Nullable public String getJVMVersion() { return getSystemProperty("java.vm.version"); }  @Nullable String getHttpAgent(); @Nullable String getJVMVersion(); @Nullable String getSystemProperty(String key);  }
@Test public void testGetJVMVersion() { PropertySource propertySource = spy(new PropertySource()); propertySource.getJVMVersion(); verify(propertySource).getSystemProperty("java.vm.version"); assertEquals(propertySource.getJVMVersion(), propertySource.getSystemProperty("java.vm.version")); }