public void testFolderJava7() throws IOException, CommandLineException {

    if (Os.isFamily(Os.FAMILY_WINDOWS) || Os.isFamily(Os.FAMILY_WIN9X)) {
      return; // Nothing to do here.
    }

    URL resource =
        Thread.currentThread()
            .getContextClassLoader()
            .getResource(getClass().getName().replace('.', '/') + ".class");

    if (resource == null) {
      throw new IllegalStateException(
          "SOMETHING IS VERY WRONG. CANNOT FIND THIS TEST CLASS IN THE CLASSLOADER.");
    }

    File f = new File(resource.getPath().replaceAll("%20", " "));
    final File aDir = f.getParentFile().getParentFile().getParentFile();

    Commandline commandLine = new Commandline("chmod");
    commandLine.addArguments(new String[] {"763", f.getAbsolutePath()});

    CommandLineUtils.executeCommandLine(commandLine, null, null);
    Map attrs =
        PlexusIoResourceAttributeUtils.getFileAttributesByPath(
            aDir, new ConsoleLogger(Logger.LEVEL_INFO, "test"), Logger.LEVEL_DEBUG);

    PlexusIoResourceAttributes fileAttrs =
        (PlexusIoResourceAttributes) attrs.get(f.getAbsolutePath());

    assertTrue(fileAttrs.isGroupReadable());
    assertTrue(fileAttrs.isGroupWritable());
    assertFalse(fileAttrs.isGroupExecutable());

    assertTrue(fileAttrs.isOwnerExecutable());
    assertTrue(fileAttrs.isOwnerReadable());
    assertTrue(fileAttrs.isOwnerWritable());

    assertTrue(fileAttrs.isWorldExecutable());
    assertFalse(fileAttrs.isWorldReadable());
    assertTrue(fileAttrs.isWorldWritable());

    assertNotNull(fileAttrs);
  }