100101102103104105106107108109110
Files.getOwner( null ); } @Test(expected = UnsupportedOperationException.class) public void setOwner() { Files.setOwner( newTempDir(), new UserPrincipal() { @Override public String getName() { return "name"; } } );
110111112113114115116117118119120
} ); } @Test(expected = NoSuchFileException.class) public void setOwnerNoSuchFileException() { Files.setOwner( Paths.get( "/some/path" ), new UserPrincipal() { @Override public String getName() { return "name"; } } );
125126127128129130131132133134135
Files.setOwner( newTempDir(), null ); } @Test(expected = IllegalArgumentException.class) public void setOwnerNull2() { Files.setOwner( null, new UserPrincipal() { @Override public String getName() { return "name"; } } );