#vulnerable code 
                                @Test
    public void testGetWithFakeToken() throws Exception {
        String token = "4ae3851817194e2596cf1b7103603ef8";
        HttpGet request = new HttpGet(httpsServerUrl + token + "/project");

        InputStream is = getClass().getResourceAsStream("/profiles/u_dmitriy@blynk.cc.user");
        User user = JsonParser.mapper.readValue(is, User.class);

        Integer dashId = user.getDashIdByToken(token);
        dashBoard = user.profile.getDashById(dashId);

        try (CloseableHttpResponse response = httpclient.execute(request)) {
            assertEquals(200, response.getStatusLine().getStatusCode());
            assertEquals(dashBoard.toString(), consumeText(response));
        }
    } 
                            #location 10 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testGetWithFakeToken() throws Exception {
        String token = "4ae3851817194e2596cf1b7103603ef8";
        HttpGet request = new HttpGet(httpsServerUrl + token + "/project");

        InputStream is = getClass().getResourceAsStream("/profiles/u_dmitriy@blynk.cc.user");
        User user = JsonParser.mapper.readValue(is, User.class);

        Integer dashId = getDashIdByToken(user.dashTokens, token, 0);
        dashBoard = user.profile.getDashById(dashId);

        try (CloseableHttpResponse response = httpclient.execute(request)) {
            assertEquals(200, response.getStatusLine().getStatusCode());
            assertEquals(dashBoard.toString(), consumeText(response));
        }
    }