@Test
public void isValidElement_valid() {

	Element element = mock(Element.class);
	when(element.getAttribute(anyString())).then((inv) -> {
		if (XMLUtil.ATTR_NAME.equals(inv.getArgument(0))) {
			return this.name;
		}
		fail("Invalid attribute name"); //$NON-NLS-1$
		return null;
	});
	assertTrue(this.constraint.isValidElement(element));
}