@Test
public void test_checkIfDataCenterIsUsable_whenDataCenterIsEnabledAndAccountIsNotRoot() throws Exception {

    final DataCenterVO dataCenter = new DataCenterVO();
    dataCenter.setAllocationState(Grouping.AllocationState.Enabled);
    final AccountVO account = new AccountVO(1L);
    when(accountManager.isRootAdmin(1L)).thenReturn(false);
    final ResourceChecker resourceChecker = buildResourceChecker();
    try {
        resourceChecker.checkIfDataCenterIsUsable(dataCenter, account);
    } catch (final PermissionDeniedException e) {
        fail("No PermissionDeniedException should have be generated");
    }
}