### Question:
SecureIOUtils { public static FileInputStream openForRead(File f, String expectedOwner, String expectedGroup) throws IOException { if (!UserGroupInformation.isSecurityEnabled()) { return new FileInputStream(f); } return forceSecureOpenForRead(f, expectedOwner, expectedGroup); }  static FileInputStream openForRead(File f, String expectedOwner, 
      String expectedGroup); static FileOutputStream createForWrite(File f, int permissions);  }### Answer:
@Test public void testReadUnrestricted() throws IOException { SecureIOUtils.openForRead(testFilePath, null, null).close(); }
@Test public void testReadCorrectlyRestrictedWithSecurity() throws IOException { SecureIOUtils .openForRead(testFilePath, realOwner, realGroup).close(); }