@Test
public void hypervisorCheckInUpdatesGuestIdsWhenHostConsumerExists() throws Exception {
Owner owner = new Owner("owner-id", "Owner Id");
Map<String, List<GuestId>> hostGuestMap = new HashMap<String, List<GuestId>>();
hostGuestMap.put("test-host", Arrays.asList(new GuestId("GUEST_B")));
Owner o = new Owner("owner-id", "Owner ID");
o.setId("owner-id");
Consumer existing = new Consumer();
existing.setUuid("test-host");
existing.setOwner(o);
existing.addGuestId(new GuestId("GUEST_A"));
when(ownerCurator.lookupByKey(eq(owner.getKey()))).thenReturn(owner);
// Force update
when(consumerCurator.getHypervisor(eq("test-host"),
eq(owner))).thenReturn(existing);