@Test
public void testFormatNonEmptyStorageDirectories() throws Exception {

  try {
    // Format again here and to format the non-empty directories in
    // journal node.
    journal.format(FAKE_NSINFO, false);
    fail("Did not fail to format non-empty directories in journal node.");
  } catch (IOException ioe) {
    GenericTestUtils.assertExceptionContains(
        "Can't format the storage directory because the current "
            + "directory is not empty.", ioe);
  }
}