use of org.killbill.billing.util.nodes.json.PluginServiceInfoModelJson in project killbill by killbill.
the class TestNodeInfoMapper method testNodeInfoSerialization.
@Test(groups = "fast")
public void testNodeInfoSerialization() throws Exception {
final PluginServiceInfoModelJson svc = new PluginServiceInfoModelJson("typeName", "registrationName");
final Set<PluginServiceInfoModelJson> services1 = new HashSet<PluginServiceInfoModelJson>();
services1.add(svc);
final List<PluginInfoModelJson> pluginInfos = new ArrayList<PluginInfoModelJson>();
final PluginInfoModelJson info1 = new PluginInfoModelJson("sym1", "key1", "name1", "vers1", PluginState.STOPPED, true, services1);
pluginInfos.add(info1);
final NodeInfoModelJson input = new NodeInfoModelJson("nodeName", clock.getUTCNow(), clock.getUTCNow(), "1.0", "1.0", "1.0", "1.0", "1.0", pluginInfos);
final String nodeInfoStr = nodeInfoMapper.serializeNodeInfo(input);
final NodeInfoModelJson res = nodeInfoMapper.deserializeNodeInfo(nodeInfoStr);
Assert.assertEquals(res, input);
}
Aggregations