### Question:
ServerInfo implements Serializable { public void addLabels(Map keyValues) { if (keyValues == null) { throw new NullPointerException("Labels must not be null"); } this.labels.putAll(keyValues); } ServerInfo(InetSocketAddress addr); InetSocketAddress getHost(); String getRegion(); void addLabels(Map keyValues); boolean matchNodeSelectorSpec(NodeSelectorSpec spec); transient Map<InetSocketAddress, NodeMetric> metrics; public int processorCount; }### Answer:
@Test(expected = NullPointerException.class) public void addLabelsWithNull() { ServerInfo server = new ServerInfo(null); server.addLabels(null); }