@Test public void when_initial_empty_node_map_for_network_state_is_modified__then_nodes_from_network_state_should_remain_empty() { Map<RadixNode, RadixNodeState> initialMap = new HashMap<>(); RadixNetworkState state = new RadixNetworkState(initialMap); initialMap.put(mock(RadixNode.class), mock(RadixNodeState.class)); assertThat(state.getNodeStates()).isEmpty(); }
public Map<RadixNode, RadixNodeState> getNodeStates() { return nodes; }
RadixNetworkState { public Map<RadixNode, RadixNodeState> getNodeStates() { return nodes; } }
RadixNetworkState { public Map<RadixNode, RadixNodeState> getNodeStates() { return nodes; } RadixNetworkState(Map<RadixNode, RadixNodeState> nodes); }
RadixNetworkState { public Map<RadixNode, RadixNodeState> getNodeStates() { return nodes; } RadixNetworkState(Map<RadixNode, RadixNodeState> nodes); static RadixNetworkState of(RadixNode node, RadixNodeState state); Map<RadixNode, RadixNodeState> getNodeStates(); Set<RadixNode> getNodes(); @Override String toString(); }
RadixNetworkState { public Map<RadixNode, RadixNodeState> getNodeStates() { return nodes; } RadixNetworkState(Map<RadixNode, RadixNodeState> nodes); static RadixNetworkState of(RadixNode node, RadixNodeState state); Map<RadixNode, RadixNodeState> getNodeStates(); Set<RadixNode> getNodes(); @Override String toString();  }