public ITime getTime(String name) throws RepositoryDocumentException {
Date propDateVal = null;
if (name.equals("r_modify_date")) {
name = "google:lastmodify";
}
MockRepositoryProperty pm = mockDocument.getProplist().getProperty(name);
long time = 0;
if (pm == null) {
MockRepositoryDateTime dateTime = mockDocument.getTimeStamp();
time = dateTime.getTicks();
propDateVal = new Date(time);
} else {
String propVal = pm.getValue();
SimpleDateFormat simple = new SimpleDateFormat(
"EEE, d MMM yyyy HH:mm:ss z", new Locale("EN"));
ParsePosition parsePosition = new ParsePosition(0);
propDateVal = simple.parse(propVal, parsePosition);
time = propDateVal.getTime();