### Question:
IndexChunker { public String toString() { StringBuilder sbuff = new StringBuilder(); sbuff.append("wantSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.wantSize); } sbuff.append(" maxSize="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.maxSize); } sbuff.append(" wantStride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.want.stride()); } sbuff.append(" stride="); for (int i = 0; i < dimList.size(); i++) { Dim elem = dimList.get(i); if (i > 0) sbuff.append(","); sbuff.append(elem.stride); } return sbuff.toString(); } IndexChunker(int[] srcShape, @Nullable Section wantSection); long getTotalNelems(); boolean hasNext(); Chunk next(); String toString();  }### Answer:
@Test public void testIndexChunkerToString() throws InvalidRangeException { int[] full = new int[] {2, 10, 20}; int[] part = new int[] {2, 5, 20}; Section section = new Section(part); IndexChunker index = new IndexChunker(full, section); assertThat(index.toString()).isEqualTo("wantSize=1,2 maxSize=200,2 wantStride=1,1 stride=20,200"); }
@Test public void testIndexChunkerTiledToString() throws InvalidRangeException { Section dataSection = new Section("0:0, 40:59, 0:1353 "); Section wantSection = new Section("0:2, 22:3152,0:1350"); IndexChunkerTiled index = new IndexChunkerTiled(dataSection, wantSection); assertThat(index.toString()) .isEqualTo(String.format(" data = 0:1353 want = 0:1350 intersect = 0:1350 ncontigElements = 1351%n" + " data = 40:59 want = 22:3152 intersect = 40:59 ncontigElements = 20%n" + " data = 0:0 want = 0:2 intersect = 0:0 ncontigElements = 1%n")); }