### Question:
RequestToken { public final void checkNotNull() { if (requestToken == null || tokenSecret == null) throw new NullPointerException("Request token credentials must not" + " be null"); } RequestToken();  RequestToken(final String requestToken, final String tokenSecret); final void checkNotNull(); final String getRequestToken(); final String getTokenSecret(); final boolean isAuthorized(); final void setAuthorized(final boolean authorized); final void setRequestToken(final String requestToken); final void setTokenSecret(final String tokenSecret);  }### Answer:
@Test(expected = NullPointerException.class) public void testCheckNotNull() throws IOException { String jsonString = "{\"requestToken\": \"token\", \"tokenSecret\":" + "\"secret\"}"; RequestToken token = stringToRequestToken(jsonString); token.checkNotNull(); jsonString = "{\"requestToken\": \"token\"}"; token = stringToRequestToken(jsonString); token.checkNotNull(); }