public void testUnknownContent() throws Exception
{
// Try getting the content of an unknown file
FileObject unknownFile = getReadFolder().resolveFile("unknown-file");
FileContent content = unknownFile.getContent();
try
{
content.getInputStream();
fail();
}
catch (FileSystemException e)
{
assertSameMessage("vfs.provider/read-not-file.error", unknownFile, e);
}
try
{
content.getSize();
fail();
}
catch (final FileSystemException e)
{
assertSameMessage("vfs.provider/get-size-not-file.error", unknownFile, e);