### Question:
ConfidentialString { public String getString() { return string; } ConfidentialString(final String string); String getString(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }### Answer:
@Test public void shouldReturnNull_onConstructorWithNullStringArg() { final String string = null; final ConfidentialString s = new ConfidentialString(string); assertNotNull(s); assertNull(s.getString()); }
@Test public void shouldReturnString_onConstructorWithStringArg() { final String string = randomString(); final ConfidentialString s = new ConfidentialString(string); assertNotNull(s); assertEquals(string, s.getString()); }