Detect missing second file

git-svn-id: https://svn.apache.org/repos/asf/creadur/rat/trunk@1625272 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java b/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
index 10c1bf0..cc87c4f 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
@@ -80,6 +80,7 @@
             // if we get here, the UTF-16 encoded file didn't throw
             // any exception, try the UTF-8 encoded one
             r.close();
+            r = null; // ensure we detect failure to read second file
             doc = new FileDocument(new File("src/test/resources/binaries/UTF8_with_signature.xml"));
             r = doc.reader();
             r.read(dummy);
@@ -88,6 +89,8 @@
         } catch (IOException e) {
             if (r!= null) {
                 r.close();
+            } else {
+                throw e; // could not open the second file
             }
             r = null;
             assertTrue("Expected binary for "+ doc.getName(),BinaryGuesser.isBinary(doc));