@Test public void conversionToAndFrom() { ServiceObject serviceObject = new ServiceObject(IpProtocol.TCP, "so", new SubRange(1, 2)); ServiceObjectBean bean = new ServiceObjectBean(serviceObject); assertThat(new ServiceObjectBean(bean.toServiceObject()), equalTo(bean)); }
public ServiceObject toServiceObject() { return new ServiceObject(ipProtocol, name, ports); }
ServiceObjectBean { public ServiceObject toServiceObject() { return new ServiceObject(ipProtocol, name, ports); } }
ServiceObjectBean { public ServiceObject toServiceObject() { return new ServiceObject(ipProtocol, name, ports); } @JsonCreator private  ServiceObjectBean();  ServiceObjectBean(ServiceObject serviceObject); }
ServiceObjectBean { public ServiceObject toServiceObject() { return new ServiceObject(ipProtocol, name, ports); } @JsonCreator private  ServiceObjectBean();  ServiceObjectBean(ServiceObject serviceObject); @Override boolean equals(Object o); @Override int hashCode(); ServiceObject toServiceObject(); }
ServiceObjectBean { public ServiceObject toServiceObject() { return new ServiceObject(ipProtocol, name, ports); } @JsonCreator private  ServiceObjectBean();  ServiceObjectBean(ServiceObject serviceObject); @Override boolean equals(Object o); @Override int hashCode(); ServiceObject toServiceObject(); public IpProtocol ipProtocol; public String name; public SubRange ports; }