* Test method setUpId( String ) inherited from ClientAttribute
*/
@Test
public void testSetUpIdString() throws Exception
{
EntryAttribute attr = new DefaultServerAttribute( atCN );
attr.setUpId( "cn" );
assertEquals( "cn", attr.getId() );
assertEquals( "cn", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
attr.setUpId( " CN " );
assertEquals( "cn", attr.getId() );
assertEquals( " CN ", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
attr.setUpId( " CommonName ");
assertEquals( "commonname", attr.getId() );
assertEquals( " CommonName ", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
attr.setUpId( " 2.5.4.3 " );
assertEquals( " 2.5.4.3 ", attr.getUpId() );
assertEquals( "2.5.4.3", attr.getId() );
assertEquals( atCN, attr.getAttributeType() );
// Now check wrong IDs
attr = new DefaultServerAttribute( atCN );
attr.setUpId( "sn" );
assertEquals( "cn", attr.getId() );
assertEquals( "cn", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
attr.setUpId( " SN " );
assertEquals( "cn", attr.getId() );
assertEquals( "cn", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
attr.setUpId( " surname " );
assertEquals( "cn", attr.getId() );
assertEquals( "cn", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
attr.setUpId( " 2.5.4.4 " );
assertEquals( "cn", attr.getId() );
assertEquals( "cn", attr.getUpId() );
assertEquals( atCN, attr.getAttributeType() );
}