public void testLrsObjectSerialize() throws Exception {
final UrnBuilder idBuilder = new UrnBuilder("UTF-8", "tincan", "uportal", "activities", "portlet", "fname");
final URI id = idBuilder.getUri();
final LrsObject lrsObject = new LrsObject(id, "Activity",
ImmutableMap.of("name", new LocalizedString(new Locale("en", "us"), "Portlet Name"),
"description", new LocalizedString(new Locale("en", "us"), "Portlet Description")));
final String result = this.objectMapper.writeValueAsString(lrsObject);
assertEquals("{\"id\":\"urn:tincan:uportal:activities:portlet:fname\",\"objectType\":\"Activity\",\"definition\":{\"name\":{\"en-US\":\"Portlet Name\"},\"description\":{\"en-US\":\"Portlet Description\"}}}", result);
}