UserIdCredentials implements Credentials { @NotNull public String getUserId() { return userId; } UserIdCredentials(@NotNull String userId); @NotNull String getUserId();  }
@Test public void testGetId() { UserIdCredentials creds = new UserIdCredentials("id"); assertEquals("id", creds.getUserId()); }