protected void assertPublishAll(LumifyApi lumifyApi, int expectedDiffsBeforePublish) throws ApiException {
ClientApiWorkspaceDiff diff = lumifyApi.getWorkspaceApi().getDiff();
LOGGER.info("diff before publish: %s", diff.toString());
assertEquals(expectedDiffsBeforePublish, diff.getDiffs().size());
ClientApiWorkspacePublishResponse publishAllResult = lumifyApi.getWorkspaceApi().publishAll(diff.getDiffs());
LOGGER.info("publish all results: %s", publishAllResult.toString());
Assert.assertTrue("publish all failed: " + publishAllResult, publishAllResult.isSuccess());
assertEquals("publish all expected 0 failures: " + publishAllResult, 0, publishAllResult.getFailures().size());
diff = lumifyApi.getWorkspaceApi().getDiff();
LOGGER.info("diff after publish: %s", diff.toString());
assertEquals(0, diff.getDiffs().size());
}