Session { public long getSessionID() { String sessionUuid = getSessionUUID(); if (sessionUuid == null) { return 0; } try { return MPUtility.hashFnv1A(sessionUuid.getBytes("UTF-16LE")).longValue(); } catch (UnsupportedEncodingException ignore) { } return 0; } private  Session();   Session(String uuid); @Nullable String getSessionUUID(); long getSessionID(); @Override boolean equals(@Nullable Object obj);  }
@Test public void getSessionID() { Session session = new Session(null); Assert.assertEquals(0, session.getSessionID()); session = new Session(null); Assert.assertEquals(0, session.getSessionID()); session = new Session("222F6BEA-F6A8-4DFC-A950-744EFD6FEC3D"); Assert.assertEquals(7868951891731938297L, session.getSessionID()); }