/** no block information. */ @Test public void no_info() { BlockBuilder builder = new BlockBuilder(); builder.seek(1000); List<DirectInputFragment> results = builder.compute(50, 100, true, true); assertThat(results.size(), is(10)); }
/** block information is sparse. */ @Test public void sparse() { BlockBuilder builder = new BlockBuilder(); builder.seek(5); builder.add(10, "a"); builder.seek(5); builder.add(10, "a"); builder.seek(5); builder.add(10, "a"); builder.seek(5); builder.add(10, "a"); builder.seek(5); builder.add(10, "a"); builder.seek(5); List<DirectInputFragment> results = builder.compute(50, 100, true, true); assertThat(results.size(), is(1)); assertThat(find(results, 0).getOwnerNodeNames(), hasItem("a")); }