### Question:
CatObject extends AbstractGeoGigOp<CharSequence> { public CatObject setObject(Supplier<? extends RevObject> object) { this.object = object; return this; }  CatObject setObject(Supplier<? extends RevObject> object); CatObject setObject(@NonNull RevObject object);  }### Answer:
@Test public void TestCatTreeWithoutBucketsObject() throws Exception { int numChildren = CanonicalNodeNameOrder.normalizedSizeLimit(0) / 2; RevTree tree = createTree(numChildren); CharSequence desc = repo.command(CatObject.class).setObject(Suppliers.ofInstance(tree)) .call(); String[] lines = desc.toString().split("\n"); assertEquals(numChildren + 4, lines.length); for (int i = 4; i < lines.length; i++) { String[] tokens = lines[i].split("\t"); assertEquals(FAKE_ID.toString(), tokens[3].trim()); } }
@Test public void TestCatTreeWithBucketsObject() throws Exception { int numChildren = CanonicalNodeNameOrder.normalizedSizeLimit(0) * 2; RevTree tree = createTree(numChildren); CharSequence desc = repo.command(CatObject.class).setObject(Suppliers.ofInstance(tree)) .call(); String[] lines = desc.toString().split("\n"); assertEquals(tree.bucketsSize() + 4, lines.length); for (int i = 4; i < lines.length; i++) { String[] tokens = lines[i].split("\t"); assertEquals(tokens[0].trim(), "BUCKET"); } }
@Test public void TestCatFeatureObject() { RevFeature feature = RevFeature.builder().build(points1); CharSequence desc = repo.command(CatObject.class).setObject(Suppliers.ofInstance(feature)) .call(); String[] lines = desc.toString().split("\n"); assertEquals(points1.getAttributeCount() + 2, lines.length); assertEquals(FieldType.STRING.name() + "\tStringProp1_1", lines[2]); assertEquals(FieldType.INTEGER.name() + "\t1000", lines[3]); assertEquals(FieldType.POINT.name() + "\tPOINT (1 1)", lines[4]); }