### Question:
GlitchClient { public CredentialManager getCredentialManager() { return credentialManager; } private  GlitchClient(OkHttpClient httpClient, Config config, Storage storage); static Builder builder(); Config getConfiguration(); CredentialManager getCredentialManager(); OkHttpClient getHttpClient();  }### Answer:
@Test public void testValidation() { StepVerifier.create(CLIENT.getCredentialManager().valid(credential)) .expectSubscription() .expectNextMatches(validate -> validate.getUserId() == 120074641L && Objects.equals(validate.getLogin(), "sandalphon_ai") && validate.getScopes().contains(GlitchScope.CHAT_READ) ).expectComplete() .verify(); }
@Test public void buildCredential() { StepVerifier.create(CLIENT.getCredentialManager().buildFromCredentials(credential)) .expectSubscription() .expectNextMatches(c -> CLIENT.getCredentialManager().getCredentialStorage().getById(c.getUserId()) .blockOptional().isPresent() && c.getUserId() == 120074641L && Objects.equals(c.getLogin(), "sandalphon_ai") && c.getScopes().contains(GlitchScope.CHAT_READ) && Objects.equals(c.getAccessToken(), credential.getAccessToken()) && Objects.equals(c.getRefreshToken(), credential.getRefreshToken()) ).expectComplete() .verify(); }