public void testReadUserByEmailConfirmationProperty() throws CoreException {
// create the MetaStore
IMetaStore metaStore = OrionConfiguration.getMetaStore();
// create the user
UserInfo userInfo = new UserInfo();
userInfo.setUserName(testUserLogin);
userInfo.setFullName(testUserLogin);
String emailConfirmationId = "1413302977602-0.2258318922458089";
userInfo.setProperty(UserConstants2.EMAIL_CONFIRMATION_ID, emailConfirmationId);
metaStore.createUser(userInfo);
// read the user back again
UserInfo readUserInfo = metaStore.readUser(testUserLogin);
assertNotNull(readUserInfo);
assertEquals(testUserLogin, readUserInfo.getUserName());
assertEquals(emailConfirmationId, readUserInfo.getProperty(UserConstants2.EMAIL_CONFIRMATION_ID));
// update the UserInfo
emailConfirmationId = "1381865755658-0.34789953865892875";
userInfo.setProperty(UserConstants2.EMAIL_CONFIRMATION_ID, emailConfirmationId);
// update the user
metaStore.updateUser(userInfo);
// read the user back again
UserInfo readUserInfo2 = metaStore.readUser(testUserLogin);
assertNotNull(readUserInfo2);
assertEquals(testUserLogin, readUserInfo2.getUserName());
String readEmail_confirmation = readUserInfo2.getProperty(UserConstants2.EMAIL_CONFIRMATION_ID);
assertEquals(emailConfirmationId, readEmail_confirmation);
// delete the email_confirmation property and update the user
userInfo.setProperty(UserConstants2.EMAIL_CONFIRMATION_ID, null);
metaStore.updateUser(userInfo);
// read the user
UserInfo readUserInfo3 = metaStore.readUser(userInfo.getUniqueId());
assertNotNull(readUserInfo3);
assertEquals(readUserInfo3.getUniqueId(), userInfo.getUniqueId());
assertNull(readUserInfo3.getProperty(UserConstants2.EMAIL_CONFIRMATION_ID));
// update the UserInfo again
emailConfirmationId = "1381865755658-0.34789953865892875";
userInfo.setProperty(UserConstants2.EMAIL_CONFIRMATION_ID, emailConfirmationId);
// update the user
metaStore.updateUser(userInfo);
// read the user back again
UserInfo readUserInfo4 = metaStore.readUser(testUserLogin);
assertNotNull(readUserInfo4);
assertEquals(testUserLogin, readUserInfo4.getUserName());
assertEquals(emailConfirmationId, readUserInfo4.getProperty(UserConstants2.EMAIL_CONFIRMATION_ID));
}