DataFrameAsserts { public DataFrameAsserts expectHeight(int expectedHeight) { assertEquals(expectedHeight, df.height(), "Unexpected DataFrame height"); return this; } DataFrameAsserts(DataFrame df, Index expectedColumns);  DataFrameAsserts(DataFrame df, List<String> expectedColumns);  DataFrameAsserts(DataFrame df, String... expectedColumns); DataFrameAsserts expectHeight(int expectedHeight); DataFrameAsserts expectIntColumns(int... positions); DataFrameAsserts expectIntColumns(String... labels); DataFrameAsserts expectLongColumns(int... positions); DataFrameAsserts expectLongColumns(String... labels); DataFrameAsserts expectDoubleColumns(int... positions); DataFrameAsserts expectDoubleColumns(String... labels); DataFrameAsserts expectBooleanColumns(int... positions); DataFrameAsserts expectBooleanColumns(String... labels); DataFrameAsserts expectColumn(int pos, Object... expectedValues); DataFrameAsserts expectColumn(String column, Object... expectedValues); DataFrameAsserts expectRow(int pos, Object... expectedValues); @SafeVarargs final DataFrameAsserts assertRow(int pos, Consumer<?>... valueAsserts);  }
@Test public void testExpectHeight_Mismatch() { DataFrame df = DataFrame.newFrame("a").foldByRow("a", "b"); try { new DataFrameAsserts(df, "a").expectHeight(3); throw new RuntimeException("Must have failed comparision"); } catch (AssertionError f) { assertEquals("Unexpected DataFrame height ==> expected: <3> but was: <2>", f.getMessage()); } }