@Test public void test_should_not_throw_validation_exception_when_mandatory_fields_are_present() { final TokenRequest token = new TokenRequest("identity","tenant"); token.validate(); }
public void validate() { if (isIdentityAbsent() || isTenantIdAbsent()) { throw new InvalidTokenRequestException(this); } }
TokenRequest { public void validate() { if (isIdentityAbsent() || isTenantIdAbsent()) { throw new InvalidTokenRequestException(this); } } }
TokenRequest { public void validate() { if (isIdentityAbsent() || isTenantIdAbsent()) { throw new InvalidTokenRequestException(this); } }  }
TokenRequest { public void validate() { if (isIdentityAbsent() || isTenantIdAbsent()) { throw new InvalidTokenRequestException(this); } }  long getTimeToLive(); void validate(); boolean isTenantIdAbsent(); boolean isIdentityAbsent(); String generateToken(); }
TokenRequest { public void validate() { if (isIdentityAbsent() || isTenantIdAbsent()) { throw new InvalidTokenRequestException(this); } }  long getTimeToLive(); void validate(); boolean isTenantIdAbsent(); boolean isIdentityAbsent(); String generateToken();  }