RiakKeyValueConfiguration implements KeyValueConfiguration { public void add(RiakNode node) throws NullPointerException { requireNonNull(node, "Node is required"); this.nodes.add(node); } RiakKeyValueConfiguration(); void add(RiakNode node); void add(String address); @Override RiakBucketManagerFactory get(); @Override RiakBucketManagerFactory get(Settings settings);  }
@Test public void shouldReturnErroWhenNodeIsNull() { assertThrows(NullPointerException.class, () -> configuration.add((String) null)); }