PlatformDependent0 { static int majorVersionFromJavaSpecificationVersion() { return majorVersion(SystemPropertyUtil.get("java.specification.version", "1.6")); } private  PlatformDependent0();   }
@Test public void testMajorVersionFromJavaSpecificationVersion() { final SecurityManager current = System.getSecurityManager(); try { System.setSecurityManager(new SecurityManager() { @Override public void checkPropertyAccess(String key) { if (key.equals("java.specification.version")) { throw new SecurityException(key); } } @Override public void checkPermission(Permission perm) { } }); assertEquals(6, PlatformDependent0.majorVersionFromJavaSpecificationVersion()); } finally { System.setSecurityManager(current); } }