@Test
public void testKeyCaseFoldNoneShouldEqualOriginalCasedKeys() throws Exception {

	try {
		String dnString = "ou=foo,Ou=bar,oU=baz,OU=bim";
		DistinguishedName name = new DistinguishedName(dnString);
		
		// First check the default
		assertThat(name.toString()).isEqualTo("ou=foo,ou=bar,ou=baz,ou=bim");
		System.setProperty(DistinguishedName.KEY_CASE_FOLD_PROPERTY, DistinguishedName.KEY_CASE_FOLD_NONE);
		name = new DistinguishedName(dnString);
		System.out.println(dnString + " folded as \"" + DistinguishedName.KEY_CASE_FOLD_NONE + "\": " + name);
		assertThat(name.toString()).isEqualTo(dnString);
	}
	finally {
		// Always restore the system setting
		System.clearProperty(DistinguishedName.KEY_CASE_FOLD_PROPERTY);
	}
}