@Test
public void testSetAsText() throws Exception {

	String expectedDn = "dc=jayway, dc=se";
	tested.setAsText(expectedDn);
	DistinguishedName result = (DistinguishedName) tested.getValue();
	assertThat(result).isEqualTo(new DistinguishedName(expectedDn));
	try {
		result.getNames().add(new LdapRdn("cn", "john doe"));
		fail("UnsupportedOperationException expected");
	}
	catch (UnsupportedOperationException expected) {
		assertThat(true).isTrue();
	}
}