    @Test
    public void testSegmentCount() throws Exception
    {

        int cpus = Runtime.getRuntime().availableProcessors();
        int segments = cpus * 2;
        while (Integer.bitCount(segments) != 1)
            segments++;

        OHCacheBuilder<String, String> builder = OHCacheBuilder.newBuilder();
        Assert.assertEquals(builder.getSegmentCount(), segments);
        builder.segmentCount(12345);
        Assert.assertEquals(builder.getSegmentCount(), 12345);

        System.setProperty("org.caffinitas.ohc.segmentCount", "98765");
        builder = OHCacheBuilder.newBuilder();
        Assert.assertEquals(builder.getSegmentCount(), 98765);
    }