assertTrue("JS resource should be in component", resourceDefs.contains(jsResourceDef));
assertTrue("CSS resource should be in component", resourceDefs.contains(cssResourceDef));
ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
Json json = Json.createJsonStream(baos, false, false, false);
jsResourceDef.serialize(json);
cssResourceDef.serialize(json);
json.close();
assertEquals("ResourceDefs are not serialized.", "", new String(baos.toByteArray(), Charsets.UTF_8));
}