I'm trying to use isEqualToComparingFieldByFieldRecursively from AssertJ to compare HSSFWorkbooks from Apache POI
However when I try to use it with a HSSFWorkbook it does not work:
HSSFWorkbook wb1 = new HSSFWorkbook();
HSSFWorkbook wb2 = new HSSFWorkbook();
assertThat(wb1).isEqualToComparingFieldByFieldRecursively(wb2);
I am not able to use the isEqualToComparingFieldByFieldRecursively method:
It looks like since HSSFWorkbook implements Iterable assertThat(wb1) returns a IterableAssert which does not have isEqualToComparingFieldByFieldRecursively like ObjectAssert does.
If I cast the HSSFWorkbook to Object that it will act the correct way but the same problem occurs for the other Apache POI classes (HSSFSheet and HSSFRow). What is the cleanest way to force AssertJ to only use ObjectAssert?