TTMover mover = new TTMoverTestStub(TEST_ROOT_DIR.toString());
mover.setConf(conf);
mover.addHostToFile(hosts.getAbsolutePath(), "host3.host.com");
HostsFileReader reader =
new HostsFileReader(hosts.getAbsolutePath(), hosts.getAbsolutePath());
System.out.println(reader.getHosts().toString());
assertEquals(3, reader.getHosts().size());
mover.removeHostFromFile(hosts.getAbsolutePath(), "host1.host.com");
reader.refresh();
assertEquals(2, reader.getHosts().size());
mover.restoreFile(hosts.getAbsolutePath());
reader.refresh();
assertEquals(2, reader.getHosts().size());
assertTrue(reader.getHosts().contains("host1.host.com"));
assertFalse(reader.getHosts().contains("host3.host.com"));
}