@Test
public void testHostMaintenance() throws Exception {
expectAuth(ROOT, true).times(6);
Set<String> hostnames = ImmutableSet.of("a");
Set<HostStatus> none = ImmutableSet.of(new HostStatus("a", NONE));
Set<HostStatus> scheduled = ImmutableSet.of(new HostStatus("a", SCHEDULED));
Set<HostStatus> draining = ImmutableSet.of(new HostStatus("a", DRAINING));
Set<HostStatus> drained = ImmutableSet.of(new HostStatus("a", DRAINING));
expect(maintenance.getStatus(hostnames)).andReturn(none);
expect(maintenance.startMaintenance(hostnames)).andReturn(scheduled);
expect(maintenance.drain(hostnames)).andReturn(draining);
expect(maintenance.getStatus(hostnames)).andReturn(draining);
expect(maintenance.getStatus(hostnames)).andReturn(drained);