BxImpl extends InlineBaseImpl implements Bx { public Clone getClone() { return (Clone) getXliffAttribute(Clone.NAME); } BxImpl(Id id);  BxImpl(org.w3c.dom.Element element); @Override List<? extends Node> getChildren(); Clone getClone(); CtypeDelim getCtype(); String getPlainText(); Rid getRid(); void setClone(Clone clone); void setCtype(CtypeDelim ctype); void setRid(Rid rid);  }
@Test public void testBxImplId() { BxImpl bx = createDefaultBx(); assertEquals(new IdImpl("1"), bx.getId()); assertEquals(new CloneImpl(Clone.Value.YES), bx.getClone()); }
@Test public void testBxImplElement() { Document doc = Utils.createDocument(); Element elem = doc.createElementNS(XLIFF_12_NAMESPACE, "bx"); elem.setAttributeNS(null, "id", "1"); try { BxImpl bx = new BxImpl(elem); assertEquals(new IdImpl("1"), bx.getId()); assertEquals(new CloneImpl(Clone.Value.YES), bx.getClone()); } catch (ConstraintViolationException e) { fail("Did not expect ConstraintViolationException"); } elem.setTextContent("abc"); try { new BxImpl(elem); fail("Expected ConstraintViolationException"); } catch (ConstraintViolationException e) { } }