final SimpleFileSystemProvider fsProvider = new SimpleFileSystemProvider();
final File tempFile = File.createTempFile( "foo", "bar" );
final Path path = GeneralPathImpl.newFromFile( fsProvider.getFileSystem( URI.create( "file:///" ) ), tempFile );
final BasicFileAttributeView view = fsProvider.getFileAttributeView( path, BasicFileAttributeView.class );
assertThat( view ).isNotNull();
assertThat( view.readAttributes() ).isNotNull();
assertThat( view.readAttributes().isRegularFile() ).isTrue();
assertThat( view.readAttributes().isDirectory() ).isFalse();
assertThat( view.readAttributes().isSymbolicLink() ).isFalse();
assertThat( view.readAttributes().isOther() ).isFalse();
assertThat( view.readAttributes().size() ).isEqualTo( 0L );
}