@Test
	public void testConvert() {
		
		try {
			PageXmlInputOutput.setAdditionalSchemaLocation(null, null);
		} catch (NoSchemasException e1) {
			e1.printStackTrace();
		}
		
		//Convert from 2010-03-19 to 2010-01-12
		Page page = new Page();
		
		PageLayout layout =	page.getLayout();
		
		TextRegion reg = (TextRegion)layout.createRegion(RegionType.TextRegion);
		Variable textType = reg.getAttributes().get("type");
		try {
			textType.setValue(new StringValue("TOC-entry"));
		} catch (WrongVariableTypeException e) {
			e.printStackTrace();
		}
		
		List<ConversionMessage> messages = null;
		try {
			messages = ConverterHub.convert(page, PageXmlInputOutput.getInstance().getFormatModel(new XmlFormatVersion("2010-01-12")));
		} catch (UnsupportedFormatVersionException e) {
			e.printStackTrace();
			fail(e.getMessage());
		}
		assertNotNull(messages);
		assertEquals(1, messages.size());
		assertNull(textType.getValue());
		
		//Convert from 2016-07-15 to 2010-03-19
		page = new Page();
		layout =	page.getLayout();
		
		// Text type
		reg = (TextRegion)layout.createRegion(RegionType.TextRegion);
		textType = reg.getAttributes().get("type");
		try {
			textType.setValue(new StringValue("endnote"));
		} catch (WrongVariableTypeException e) {
			e.printStackTrace();
		}
		
		// Music region
		layout.createRegion(RegionType.MusicRegion);
		
		messages = null;
		try {
			messages = ConverterHub.convert(page, PageXmlInputOutput.getInstance().getFormatModel(new XmlFormatVersion("2010-03-19")));
		} catch (UnsupportedFormatVersionException e) {
			e.printStackTrace();
			fail(e.getMessage());
		}
		assertNotNull(messages);
		assertEquals(2, messages.size());
		assertNull(textType.getValue());

	}