### Question:
ClientCredentials { public void checkNotNull() { if (clientId == null || clientSecret == null) throw new NullPointerException("Client credentials must not" + " be null"); } ClientCredentials();  ClientCredentials(final String clientId, final String clientSecret); void checkNotNull(); String getClientSecret(); String getClientId(); void setClientId(final String clientId); void setClientSecret(final String clientSecret);  }### Answer:
@Test(expected = NullPointerException.class) public void testCheckNotNull() { ClientCredentials clientCredentials = new ClientCredentials("id", "secret"); clientCredentials.checkNotNull(); clientCredentials = new ClientCredentials(null, null); clientCredentials.checkNotNull(); }