@Test
public void canSetLargeContent() {
String tag = "tag_" + UUID.randomUUID();
addNewTag(tag);
ContentAPI api = new ContentAPI();
StringBuilder content = new StringBuilder();
for (int i = 0; i < 255; i++) {
content.append("1");
}
User user = helper.loginAsPortalAdmin();
APIResponse resp = api.setContent(content.toString(),
tag, true, helper.loginAsPortalAdmin());
resp = api.setLargeContent(tag, true,
content.toString(), content.toString(), content.toString(),
null, null, "1111", null, null, null,
helper.loginAsPortalAdmin());
//ensure content can be retrieved
resp = api.getContent(tag, user);
ContentProp prop = (ContentProp) resp.object;
String expected = content.toString() + content.toString()
+ content.toString() + "1111";
assertTrue(prop.html.equals(expected));