@@ -0,0 +1,2991 @@
+/*%0A * Copyright (c) 2002-2016 %22Neo Technology,%22%0A * Network Engine for Objects in Lund AB %5Bhttp://neotechnology.com%5D%0A *%0A * This file is part of Neo4j.%0A *%0A * Neo4j is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage org.neo4j.server.security.ssl;%0A%0Aimport org.apache.commons.lang.SystemUtils;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.attribute.PosixFileAttributeView;%0Aimport java.nio.file.attribute.PosixFileAttributes;%0Aimport java.nio.file.attribute.PosixFilePermission;%0A%0Aimport org.neo4j.test.TargetDirectory;%0A%0Aimport static org.junit.Assert.*;%0Aimport static org.junit.Assume.assumeTrue;%0Aimport static org.neo4j.test.TargetDirectory.testDirForTest;%0A%0Apublic class CertificatesIT%0A%7B%0A    @Rule%0A    public TargetDirectory.TestDirectory testDirectory = TargetDirectory.testDirForTest( getClass() );%0A%0A    @Test%0A    public void createSelfSignedCertificate() throws Exception%0A    %7B%0A        assumeTrue( !SystemUtils.IS_OS_WINDOWS );%0A%0A        Certificates certificates = new Certificates();%0A        certificates%0A                .createSelfSignedCertificate( testDirectory.file( %22certificate%22 ), testDirectory.file( %22privateKey%22 ),%0A                        %22localhost%22 );%0A%0A        PosixFileAttributes certificateAttributes =%0A                Files.getFileAttributeView( testDirectory.file( %22certificate%22 ).toPath(), PosixFileAttributeView.class )%0A                        .readAttributes();%0A%0A        assertTrue( certificateAttributes.permissions().contains( PosixFilePermission.OWNER_READ ) );%0A        assertTrue( certificateAttributes.permissions().contains( PosixFilePermission.OWNER_WRITE ) );%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.OWNER_EXECUTE ) );%0A%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.GROUP_READ ) );%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.GROUP_WRITE ) );%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.GROUP_EXECUTE ) );%0A%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.OTHERS_READ ) );%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.OTHERS_WRITE ) );%0A        assertFalse( certificateAttributes.permissions().contains( PosixFilePermission.OTHERS_EXECUTE ) );%0A    %7D%0A%7D

Add the integration test; not Windows.