### Question:
SiteMapFilesCacheImpl extends CacheBuilderBase implements SiteMapFilesCache, SiteMapStructureCache.RefreshListener { private LinkedList<List<SiteMapEntry>> splitEntries(final Collection<SiteMapEntry> entries) { final int baseSiteMapLength = siteMapBuilder.getBaseSiteMapLength(); final LinkedList<List<SiteMapEntry>> result = new LinkedList<>(); int index = 0; int size = baseSiteMapLength; List<SiteMapEntry> split = new LinkedList<>(); result.add(split); for (final SiteMapEntry entry : entries) { final int entrySize = siteMapBuilder.getSize(entry); if (index < maxEntriesCount && size + entrySize <= maxFileSize) { index++; size += entrySize; } else { index = 1; size = baseSiteMapLength; result.add(split = new LinkedList<>()); } split.add(entry); } return result; }  @Activate void activate(final SiteMapFilesCacheImplConfig config); @Deactivate void deactivate(); @Override String get(final Resource rootPage, final int index); @Override void onCacheRefreshed(final Resource rootPage, final List<SiteMapEntry> entries);  }### Answer:
@Test public void splitEntries() { when(config.maxEntriesCount()).thenReturn(2); when(config.maxFileSize()).thenReturn(10); model.activate(config); entries.add(createEntry(10)); entries.add(createEntry(1)); entries.add(createEntry(1)); entries.add(createEntry(1)); assertNull(model.get(page, 0)); }