@Test
public void testBundleInfoJsonSerialization() {

  final JsonPath p = JsonPath.from(bundleInfoJson(bundleInfo("host", "bundle", 1L, "version", some("sha"))).toJson());
  run(BundleInfo.class, new BundleInfo() {
    @Override
    public String getHost() {
      assertEquals("host", p.getString("host"));
      return null;
    }
    @Override
    public String getBundleSymbolicName() {
      assertEquals("bundle", p.getString("bundleSymbolicName"));
      return null;
    }
    @Override
    public long getBundleId() {
      assertEquals(1L, p.getLong("bundleId"));
      return 0;
    }
    @Override
    public String getBundleVersion() {
      assertEquals("bundle", p.getString("bundleSymbolicName"));
      return null;
    }
    @Override
    public Option<String> getBuildNumber() {
      assertEquals("sha", p.getString("buildNumber"));
      return null;
    }
    @Override
    public BundleVersion getVersion() {
      assertEquals("sha", p.getString("buildNumber"));
      return null;
    }
  });
}