CacheBuilder builder = new CacheBuilderImpl();
builder.setObjectProvider(objectProvider);
builder.setMaxCount(8);
Cache cache = builder.buildCache();
GroupBuilder groupBuilder = new GroupBuilderImpl();
groupBuilder.setMaxCount(4);
Group root = cache.getRootGroup();
root.addRemovalListener(listenerRootMock);
Group group1 = root.addGroup("group1", groupBuilder);
group1.addRemovalListener(listener1Mock);
Group group2 = root.addGroup("group2", groupBuilder);