@Test public void constructorProperties() throws IOException { String nodeStr = "{\"name\" : \"nodeName\", \"properties\" : { \"key\": \"value\"}}"; Node node = BatfishObjectMapper.mapper().readValue(nodeStr, Node.class); assertThat(node.getId(), equalTo("node-nodename")); assertThat(node.getName(), equalTo("nodename")); assertThat(node.getProperties().size(), equalTo(1)); assertThat(node.getProperties().get("key"), equalTo("value")); }
@JsonProperty(PROP_NAME) public String getName() { return _name; }
Node extends BfObject { @JsonProperty(PROP_NAME) public String getName() { return _name; } }
Node extends BfObject { @JsonProperty(PROP_NAME) public String getName() { return _name; } @VisibleForTesting  Node(
      @Nonnull String name,
      @Nullable String id,
      @Nullable DeviceModel model,
      @Nullable DeviceType type);  Node(String name);  Node(String name, DeviceModel model, DeviceType type); }
Node extends BfObject { @JsonProperty(PROP_NAME) public String getName() { return _name; } @VisibleForTesting  Node(
      @Nonnull String name,
      @Nullable String id,
      @Nullable DeviceModel model,
      @Nullable DeviceType type);  Node(String name);  Node(String name, DeviceModel model, DeviceType type); static String makeId(String name); @JsonProperty(PROP_NAME) String getName(); @JsonProperty(PROP_MODEL) DeviceModel getModel(); @JsonProperty(PROP_TYPE) DeviceType getType(); @Override String toString(); }
Node extends BfObject { @JsonProperty(PROP_NAME) public String getName() { return _name; } @VisibleForTesting  Node(
      @Nonnull String name,
      @Nullable String id,
      @Nullable DeviceModel model,
      @Nullable DeviceType type);  Node(String name);  Node(String name, DeviceModel model, DeviceType type); static String makeId(String name); @JsonProperty(PROP_NAME) String getName(); @JsonProperty(PROP_MODEL) DeviceModel getModel(); @JsonProperty(PROP_TYPE) DeviceType getType(); @Override String toString();  }