### Question:
FileUtils { public static int permissionsToUmask(int permissions) { return permissions ^ 0777; } private  FileUtils(); static int permissionsToUmask(int permissions); static String permissionsToUmask(String permissions); static int parsePermissions(String permissions); static final FileAttribute<Set<PosixFilePermission>> OWNER_ONLY_RW; }### Answer:
@Test public void testPermissionsToUmask() { Assert.assertEquals(0000, FileUtils.permissionsToUmask(0777)); Assert.assertEquals(0022, FileUtils.permissionsToUmask(0755)); Assert.assertEquals(0002, FileUtils.permissionsToUmask(0775)); Assert.assertEquals(0137, FileUtils.permissionsToUmask(0640)); Assert.assertEquals(0077, FileUtils.permissionsToUmask(0700)); Assert.assertEquals(0777, FileUtils.permissionsToUmask(0000)); Assert.assertEquals("000", FileUtils.permissionsToUmask("777")); Assert.assertEquals("022", FileUtils.permissionsToUmask("755")); Assert.assertEquals("002", FileUtils.permissionsToUmask("775")); Assert.assertEquals("137", FileUtils.permissionsToUmask("640")); Assert.assertEquals("077", FileUtils.permissionsToUmask("700")); Assert.assertEquals("777", FileUtils.permissionsToUmask("000")); Assert.assertEquals("000", FileUtils.permissionsToUmask("rwxrwxrwx")); Assert.assertEquals("022", FileUtils.permissionsToUmask("rwxr-xr-x")); Assert.assertEquals("002", FileUtils.permissionsToUmask("rwxrwxr-x")); Assert.assertEquals("137", FileUtils.permissionsToUmask("rw-r-----")); Assert.assertEquals("077", FileUtils.permissionsToUmask("rwx------")); Assert.assertEquals("777", FileUtils.permissionsToUmask("---------")); }