@Test
public void testFromMap() {

    HashMap<String, Object> values = new HashMap<String, Object>();
    values.put("id", "123456789");
    values.put("owner", ALICE);
    values.put("renewer", YARN);
    values.put("target", MOCK_BUCKET);
    values.put("scopes", GCS);
    values.put("creationTime", 11111111111111L);
    values.put("expiresAt", 2222222222222L);
    Session session = (Session) Model.fromMap(Session.class, values);
    assertEquals("123456789", session.getId());
    assertEquals(ALICE, session.getOwner());
    assertEquals(YARN, session.getRenewer());
    assertEquals(MOCK_BUCKET, session.getTarget());
    assertEquals(GCS, session.getScopes());
    assertEquals(11111111111111L, session.getCreationTime().longValue());
    assertEquals(2222222222222L, session.getExpiresAt().longValue());
}