@Test public void checkInvariant() throws Exception { final Throwable cause = new RuntimeException(); final String token = "token"; final String message = "message"; InvalidTokenException sut=new InvalidTokenException(message,token,cause); assertThat(sut.getMessage(),equalTo(message)); assertThat(sut.getCause(),sameInstance(cause)); assertThat(sut.getToken(),equalTo(token)); }
public String getToken() { return this.token; }
InvalidTokenException extends IllegalArgumentException { public String getToken() { return this.token; } }
InvalidTokenException extends IllegalArgumentException { public String getToken() { return this.token; } InvalidTokenException(String message, String token, Throwable cause); }
InvalidTokenException extends IllegalArgumentException { public String getToken() { return this.token; } InvalidTokenException(String message, String token, Throwable cause); String getToken(); }
InvalidTokenException extends IllegalArgumentException { public String getToken() { return this.token; } InvalidTokenException(String message, String token, Throwable cause); String getToken();  }