@Test
public void testForErrors() throws IOException,
		MismatchedDimensionException, NoSuchAuthorityCodeException {

	//
	// Get the resource.
	//
	final File testFile = TestData.file(this, "goodpyramid/"+TEST_FILE);//
	assertNotNull(testFile);
	//
	// Null argument
	//
	ImagePyramidReader reader = null;
	try {
		reader = new ImagePyramidReader(null, new Hints(
				Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
	} catch (DataSourceException e) {
	}
	assertNull(reader);
	//
	// Illegal arguments
	//
	try {
		reader = new ImagePyramidReader(new FileInputStream(testFile),
				new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
						Boolean.FALSE));
	} catch (DataSourceException e) {
	}
	assertNull(reader);
	try {
		reader = new ImagePyramidReader(ImageIO
				.createImageInputStream(testFile), new Hints(
				Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
	} catch (DataSourceException e) {
	}
	assertNull(reader);
	//
	// Unsopported operation
	reader = new ImagePyramidReader(testFile, new Hints(
			Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
	try {
		reader.getCurrentSubname();
	} catch (UnsupportedOperationException e) {
		try {
			String value = reader.getMetadataValue("");
			assertNull(value);
			return;
		} catch (UnsupportedOperationException e2) {
			return;
		}
	}
	assertTrue("Some of the unsopported method did not send an exception",false);
}