final String id = "12345678";
final String appId = "an_application_id";
final double priority = 0.9;
final String title = "title foo";
final long postedTime = System.currentTimeMillis();
RestActivity restActivity = new RestActivity();
assertThat("restActivity must not be null", restActivity, notNullValue());
restActivity.setId(id);
restActivity.setAppId(appId);
restActivity.setPostedTime(postedTime);
restActivity.setPriority(priority);
restActivity.setTitle(title);
assertThat("restActivity.getAppId() must return: " + appId, restActivity.getAppId(), equalTo(appId));
assertThat("restActivity.getId() must return: " + id, restActivity.getId(), equalTo(id));
assertThat("restActivity.getPostedTime() must return: " + postedTime, restActivity.getPostedTime(), equalTo(postedTime));
assertThat("restActivity.getPriority() must return: " + priority , restActivity.getPriority(), equalTo(priority));
assertThat("restActivity.getTemplateParameter(\"foo\") must return null", restActivity.getTemplateParameter("foo"),
nullValue());
assertThat("restActivity.getTemplateParams() must return null", restActivity.getTemplateParams(), nullValue());
assertThat("restActivity.getTitle() must return: " + title, restActivity.getTitle(), equalTo(title));
assertThat("restActivity.getTitleId() must return null", restActivity.getTitleId(), nullValue());
final Map<String, String> templateParams = new HashMap<String, String>();
final String titleId = "title Id, title id";
templateParams.put("foo", "bar");
templateParams.put("foo2", "bar2");
restActivity.setTemplateParams(templateParams);
restActivity.setTitleId(titleId);
assertThat("restActivity.getTemplateParams() must return: " + templateParams, restActivity.getTemplateParams(),
equalTo(templateParams));
assertThat("restActivity.getTemplateParameter(\"foo\") must return: bar", restActivity.getTemplateParameter("foo"),
equalTo("bar"));
assertThat("restActivity.getTemplateParameter(\"foo2\") must return: bar2",
restActivity.getTemplateParameter("foo2"),
equalTo("bar2"));
assertThat("restActivity.getTitleId() must return: " + titleId, restActivity.getTitleId(), equalTo(titleId));
restActivity.addTemplateParameter("foo3", "bar3");
assertThat("restActivity.getTemplateParameter(\"foo3\") must return: bar3", restActivity.getTemplateParameter("foo3"),
equalTo("bar3"));
}