private RegistryObjectType getRegistryObjectFromResource(String path) throws ParserException {
    RegistryObjectType registryObject = null;
    JAXBElement<RegistryObjectType> jaxbRegistryObject =
        parser.unmarshal(configurator, JAXBElement.class, getClass().getResourceAsStream(path));

    if (jaxbRegistryObject != null) {
      registryObject = jaxbRegistryObject.getValue();
    }

    return registryObject;
  }
  @Before
  public void setUp() {
    parser = new XmlParser();

    configurator =
        parser.configureParser(
            Arrays.asList(
                RegistryObjectType.class.getPackage().getName(),
                EbrimConstants.OGC_FACTORY.getClass().getPackage().getName(),
                EbrimConstants.GML_FACTORY.getClass().getPackage().getName()),
            this.getClass().getClassLoader());
  }