@Test public void toNodeRole() { NodeRoleBean roleBean = new NodeRoleBean(new NodeRole("name", "a.*"), ImmutableSet.of("a", "b")); NodeRole role = roleBean.toNodeRole(); assertThat(role, equalTo(new NodeRole("name", "a.*"))); }
public NodeRole toNodeRole() { return new NodeRole(name, regex); }
NodeRoleBean { public NodeRole toNodeRole() { return new NodeRole(name, regex); } }
NodeRoleBean { public NodeRole toNodeRole() { return new NodeRole(name, regex); } @JsonCreator private  NodeRoleBean();  NodeRoleBean(NodeRole role, Set<String> fromNodes); }
NodeRoleBean { public NodeRole toNodeRole() { return new NodeRole(name, regex); } @JsonCreator private  NodeRoleBean();  NodeRoleBean(NodeRole role, Set<String> fromNodes); @Override boolean equals(Object o); @Override int hashCode(); NodeRole toNodeRole(); }
NodeRoleBean { public NodeRole toNodeRole() { return new NodeRole(name, regex); } @JsonCreator private  NodeRoleBean();  NodeRoleBean(NodeRole role, Set<String> fromNodes); @Override boolean equals(Object o); @Override int hashCode(); NodeRole toNodeRole(); public String name; public Set<String> nodes; public String regex; }