@Nullable
    @Override
    public AccessToken loadById(String id) {
        try {
            final DBObject dbObject = get(AccessTokenImpl.class, id);
            if (dbObject != null) {
                return fromDBObject(dbObject);
            }
        } catch (IllegalArgumentException e) {
            // Happens when id is not a valid BSON ObjectId
            LOG.debug("Couldn't load access token", e);
        }
        return null;
    }
@Test
    @MongoDBFixtures("accessTokensMultipleTokens.json")
    public void testLoadById() {
        assertThat(accessTokenService.loadById("54e3deadbeefdeadbeefaffe"))
                .isNotNull()
                .satisfies(token -> {
                    assertThat(token.getId()).isEqualTo("54e3deadbeefdeadbeefaffe");
                    assertThat(token.getName()).isEqualTo("web");
                });

        assertThat(accessTokenService.loadById("54f9deadbeefdeadbeefaffe"))
                .isNotNull()
                .satisfies(token -> {
                    assertThat(token.getId()).isEqualTo("54f9deadbeefdeadbeefaffe");
                    assertThat(token.getName()).isEqualTo("rest");
                });

        assertThat(accessTokenService.loadById("54f9deadbeefdeadbeef0000"))
                .as("check that loading a non-existent token returns null")
                .isNull();
    }