@Test(expected = BadRequestException.class)
public void migrateEntitlementSameOwnerFail() {
ConsumerType ct = TestUtil.createConsumerType();
ct.setManifest(true);
Entitlement e = TestUtil.createEntitlement();
Owner owner2 = new Owner("admin2");
Consumer sourceConsumer = new Consumer("source-consumer", "bill", owner, ct);
Consumer destConsumer = new Consumer("destination-consumer", "bill", owner2, ct);
e.setConsumer(sourceConsumer);
e.setQuantity(25);
when(entitlementCurator.find(eq(e.getId()))).thenReturn(e);
when(consumerCurator.verifyAndLookupConsumer(eq(destConsumer.getUuid())))
.thenReturn(destConsumer);
entResource.migrateEntitlement(e.getId(), destConsumer.getUuid(), 15);
}