@SuppressWarnings("unused")
	@Test
	public void testValidate() {
		
		//try {
		//	XmlInputOutput.setSchemaLocation("c:/junit/schema");
		//} catch (NoSchemasException e) {
		//	fail(e.getMessage());
		//}
		
		XmlPageReader reader = PageXmlInputOutput.getReader();
		
		//Valid file
		Page page = null;
		try {
			page = reader.read(new FileInput(xmlPageFile));
		} catch (UnsupportedFormatVersionException e) {
			e.printStackTrace();
		}
		assertNotNull(page);

		//Try to set valid attribute value
		try {
			TextObject textObj = (TextObject)page.getLayout().getRegion(0);
			ContentObject contentObject = page.getLayout().getRegion(0);
			Variable attrib = contentObject.getAttributes().get("textColour");
			attrib.setValue(new StringValue("blue"));
		} catch (Exception e1) {
			e1.printStackTrace();
			fail(e1.getMessage());
		}
		//Try to set invalid attribute value
		try {
			TextObject textObj = (TextObject)page.getLayout().getRegion(0);
			ContentObject contentObject = page.getLayout().getRegion(0);
			Variable attrib = contentObject.getAttributes().get("textColour");
			attrib.setValue(new StringValue("somethingInvalid"));
			fail("Exception was expected");
		} catch (IllegalArgumentException e1) {
			//Expected
		} catch (WrongVariableTypeException e1) {
			e1.printStackTrace();
			fail(e1.getMessage());
		}

		//Invalid file
		try {
			page = reader.read(new FileInput(invalidXmlPageFile));
		} catch (UnsupportedFormatVersionException e) {
			e.printStackTrace();
		}
		
		assertNull(page);
	}