@BeforeClass
 public static void setUpBeforeClass() throws Exception {
   ORB orb = ORB.init(new String[0], System.getProperties());
   URL url = ApplicationElementImpl.class.getResource("/de/rechner/openatfx/example.atfx");
   aoSession =
       AoServiceFactory.getInstance()
           .newAoFactory(orb)
           .newSession("FILENAME=" + new File(url.getFile()));
   applicationElement = aoSession.getApplicationStructure().getElementByName("dts");
 }
  @Test
  public void testGetAllRelatedElements() {
    try {
      // dts
      assertEquals(7, applicationElement.getAllRelatedElements().length);

      // audifahrzeug
      ApplicationElement aeFzg =
          aoSession.getApplicationStructure().getElementByName("audifahrzeug");
      assertEquals(8, aeFzg.getAllRelatedElements().length);
    } catch (AoException e) {
      fail(e.reason);
    }
  }
  @Test
  public void testGetRelationsByBaseName() {
    try {
      // dts
      assertEquals(1, applicationElement.getRelationsByBaseName("test").length);
      assertEquals(1, applicationElement.getRelationsByBaseName("measurement_quantities").length);
      assertEquals(1, applicationElement.getRelationsByBaseName("units_under_test").length);

      // audifahrzeug
      ApplicationElement aeFzg =
          aoSession.getApplicationStructure().getElementByName("audifahrzeug");
      assertEquals(5, aeFzg.getRelationsByBaseName("children").length);

    } catch (AoException e) {
      fail(e.reason);
    }
  }
 @AfterClass
 public static void tearDownAfterClass() throws Exception {
   aoSession.close();
 }