@Test public void testGetPrimaryAttributeName() { Document document = DocumentHelper.createDocument(); Element element = document.addElement("execute"); element.addAttribute("function", "AssertTextPresent"); element.addAttribute("value1", "hello world"); String primaryAttributeName = PoshiRunnerValidation.getPrimaryAttributeName( element, Arrays.asList("function", "selenium"), "GetPrimaryAttributeName.macro"); Assert.assertEquals("getPrimaryAttributeName is failing", "function", primaryAttributeName); Assert.assertNotEquals("getPrimaryAttributeName is failing", "value1", primaryAttributeName); }