Testing Java NIO