@Test
public void testCache() throws Exception {

    JdbcBean b2c1 = mydbTwoDimsBean();
    b2c1.setCacheDepth(1);
    DbAccessor a2c1 = new JdbcAccessor(NOP_LOGGER, b2c1, mydbConnectionSupplier()).memoize();
    DbSeries a2c1_first = a2c1.getSeriesWithData("Industry", "Belgium");
    DbSeries a2c1_second = a2c1.getSeriesWithData("Industry", "Belgium");
    assertEquals(a2c1_first, a2c1_second);
    assertSame(a2c1_first, a2c1_second);
    JdbcBean b2c2 = mydbTwoDimsBean();
    b2c2.setCacheDepth(2);
    DbAccessor a2c2 = new JdbcAccessor(NOP_LOGGER, b2c2, mydbConnectionSupplier()).memoize();
    DbSeries a2c2_first = a2c2.getSeriesWithData("Industry", "Belgium");
    DbSeries a2c2_second = a2c2.getSeriesWithData("Industry", "Belgium");
    assertEquals(a2c2_first, a2c2_second);
    assertSame(a2c2_first, a2c2_second);
    assertEquals(a2c1_first, a2c2_first);
    assertNotSame(a2c1_first, a2c2_first);
}