@Test(timeout = 1000)
public void testMapperCreation() throws Exception
{

  // Check parameterless constructor
  AnnotationMapper mapper = new AnnotationMapper();
  assertNotNull("Mapper object must not be null.", mapper);
  assertEquals("Mapper must use 'Simple' XML library as default.", "Simple", mapper.getUsedFramework());
  // Check parameterized constructor for Simple library
  mapper = new AnnotationMapper("Simple");
  assertEquals("Mapper must use 'Simple' XML library.", "Simple", mapper.getUsedFramework());
  // Check parameterized constructor for XStream library
  mapper = new AnnotationMapper("XStream");
  assertEquals("Mapper must use 'XStream' XML library.", "XStream", mapper.getUsedFramework());
  // Check parameterized constructor for JAXB library
  mapper = new AnnotationMapper("JAXB");
  assertEquals("Mapper must use 'JAXB' XML library.", "JAXB", mapper.getUsedFramework());
  // Check parameterized constructor with unsupported library
  Exception exception = null;
  try
  {
    mapper = new AnnotationMapper("SomeUnknownMapper");
  }
  catch (Exception e)
  {
    exception = e;
  }
  assertTrue("Mapper must throw 'UnsupportedXMLFrameworkException'.", exception instanceof UnsupportedXMLFrameworkException);
}