@Test
public void testSuccessfulBaseCase() throws Exception {

  removeStandbyNameDirs();
  
  try {
    cluster.restartNameNode(1);
    fail("Did not throw");
  } catch (IOException ioe) {
    GenericTestUtils.assertExceptionContains(
        "storage directory does not exist or is not accessible",
        ioe);
  }
  
  int rc = BootstrapStandby.run(
      new String[]{"-nonInteractive"},
      cluster.getConfiguration(1));
  assertEquals(0, rc);
  
  // Should have copied over the namespace from the active
  FSImageTestUtil.assertNNHasCheckpoints(cluster, 1,
      ImmutableList.of(0));
  FSImageTestUtil.assertNNFilesMatch(cluster);
  // We should now be able to start the standby successfully.
  cluster.restartNameNode(1);
}