}
DigitalObject inPng = new DigitalObject.Builder(pngContent).build();
DigitalObject inTiff = new DigitalObject.Builder(tifContent).build();
ValidateResult result;
/* Check with null PRONOM URI, both with PNG and TIFF */
try {
result = tiffCheck.validate(inTiff, null, null);
assertTrue("Valid TIFF was not validated;",
result.isValidInRegardToThisFormat());
result = tiffCheck.validate(inPng, null, null );
assertTrue("Invalid TIFF was not invalidated;",
!result.isValidInRegardToThisFormat() );
/* Check with valid and invalid PRONOM URI */
URI uri = new URI("info:pronom/fmt/7");
result = tiffCheck.validate(inTiff, uri, null );
assertTrue("Valid TIFF with URI was not validated;",
result.isValidInRegardToThisFormat() );
/* This should throw an IllegalArgumentException: */
uri = new URI("info:pronom/fmt/11");
result = tiffCheck.validate(inTiff, uri, null );
assertTrue("Valid TIFF with invalid URI not invalidated;",
result.isValidInRegardToThisFormat() );
} catch (URISyntaxException e) {
e.printStackTrace();
}
}