@Test
public void testFromJSON() {

    SessionCacheFetcher fetcher = new SessionCacheFetcher("xxxx");
    String json = "{" +
        "\"id\": \"abcd\", " +
        "\"creationTime\": 1000000000000, " +
        "\"owner\": \"bob@EXAMPLE.COM\", " +
        "\"renewer\": \"yarn@BAZ.NET\", " +
        "\"scopes\": \"" + BIGQUERY + "\", " +
        "\"target\": \"gs://blah\", " +
        "\"expiresAt\": 2000000000000" +
    "}";
    Session session;
    try {
        session = (Session) fetcher.fromJson(json);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    assertEquals("abcd", session.getId());
    assertEquals(1000000000000L, session.getCreationTime().longValue());
    assertEquals("bob@EXAMPLE.COM", session.getOwner());
    assertEquals("yarn@BAZ.NET", session.getRenewer());
    assertEquals(BIGQUERY, session.getScopes());
    assertEquals("gs://blah", session.getTarget());
    assertEquals(2000000000000L, session.getExpiresAt().longValue());
}