@Override
    public double getRatio() {
        if (misses.get() == 0) {
            if (hits.get() == 0) {
                return Double.NaN;
            } else {
                return Double.POSITIVE_INFINITY;
            }
        } else {
            return hits.doubleValue() / misses.doubleValue() * PERCENTAGE;
        }
    }
@Test
    public void testGetRatio_NaN() {
        NearCacheStatsImpl nearCacheStats = new NearCacheStatsImpl();
        assertEquals(Double.NaN, nearCacheStats.getRatio(), 0.0001);
    }