@Test
  public void testCredentialsOAuth2RefreshToken() {
    Credential oauth2Credential = Credential.from("<token>", "eyJhbGciOi...3gw");
    Assert.assertTrue(
        "Credential should be an auth2 token when username is <token>",
        oauth2Credential.isOAuth2RefreshToken());
    Assert.assertEquals(
        "OAuth2 token credential should take password as refresh token",
        "eyJhbGciOi...3gw",
        oauth2Credential.getPassword());
  }
Tests for {@link com.google.cloud.tools.jib.api.Credential}.
jib-core/src/test/java/com/google/cloud/tools/jib/api/CredentialTest.java