BinSourceImpl extends XliffElementImpl implements BinSource { public Child getChild() { return child; } BinSourceImpl(Child child);  BinSourceImpl(Element element); @Override List<? extends Node> getChildren(); Child getChild(); Collection<NonXliffAttribute> getNonXliffAttributes(); Ts getTs(); void setChild(Child child); void setNonXliffAttributes(
			Collection<NonXliffAttribute> nonXliffAttributes); void setTs(Ts ts);  }
@Test public void testBinSourceImplChild() { BinSourceImpl bs = createDefaultBinSource(); assertEquals(createDefaultInternalFile(), bs.getChild()); }
@Test public void testBinSourceImplElement() { Document doc = Utils.createDocument(); Element elem = doc.createElementNS(XLIFF_12_NAMESPACE, "bin-source"); try { new BinSourceImpl(elem); fail("Expected ConstraintViolationException"); } catch (ConstraintViolationException e) { } elem.appendChild(createDefaultExternalFile().asXmlNode(doc)); try { BinSourceImpl ref = new BinSourceImpl(elem); assertEquals(createDefaultExternalFile(), ref.getChild()); } catch (ConstraintViolationException e) { fail("Did not expect ConstraintViolationException"); } elem.removeChild(elem.getFirstChild()); elem.appendChild(createDefaultInternalFile().asXmlNode(doc)); try { BinSourceImpl ref = new BinSourceImpl(elem); assertEquals(createDefaultInternalFile(), ref.getChild()); } catch (ConstraintViolationException e) { fail("Did not expect ConstraintViolationException"); } elem.removeChild(elem.getFirstChild()); elem.appendChild(doc.createElementNS(XLIFF_12_NAMESPACE, "something")); try { new BinSourceImpl(elem); fail("Expected ConstraintViolationException"); } catch (ConstraintViolationException e) { } }