@Test public void conversionToAndFrom() { ServiceObjectGroup group = new ServiceObjectGroup("sog", ImmutableSortedSet.of("23")); ServiceObjectGroupBean bean = new ServiceObjectGroupBean(group); assertThat(new ServiceObjectGroupBean(bean.toServiceObjectGroup()), equalTo(bean)); }
public ServiceObjectGroup toServiceObjectGroup() { return new ServiceObjectGroup( name, ImmutableSortedSet.copyOf(firstNonNull(services, ImmutableSet.of()))); }
ServiceObjectGroupBean { public ServiceObjectGroup toServiceObjectGroup() { return new ServiceObjectGroup( name, ImmutableSortedSet.copyOf(firstNonNull(services, ImmutableSet.of()))); } }
ServiceObjectGroupBean { public ServiceObjectGroup toServiceObjectGroup() { return new ServiceObjectGroup( name, ImmutableSortedSet.copyOf(firstNonNull(services, ImmutableSet.of()))); } @JsonCreator private  ServiceObjectGroupBean();  ServiceObjectGroupBean(ServiceObjectGroup group); }
ServiceObjectGroupBean { public ServiceObjectGroup toServiceObjectGroup() { return new ServiceObjectGroup( name, ImmutableSortedSet.copyOf(firstNonNull(services, ImmutableSet.of()))); } @JsonCreator private  ServiceObjectGroupBean();  ServiceObjectGroupBean(ServiceObjectGroup group); @Override boolean equals(Object o); @Override int hashCode(); ServiceObjectGroup toServiceObjectGroup(); }
ServiceObjectGroupBean { public ServiceObjectGroup toServiceObjectGroup() { return new ServiceObjectGroup( name, ImmutableSortedSet.copyOf(firstNonNull(services, ImmutableSet.of()))); } @JsonCreator private  ServiceObjectGroupBean();  ServiceObjectGroupBean(ServiceObjectGroup group); @Override boolean equals(Object o); @Override int hashCode(); ServiceObjectGroup toServiceObjectGroup(); public String name; public Set<String> services; }