@Test
public void testProvisionCluster_QuickLinkProfileIsSavedTheFirstTime() throws Exception {

  expect(persistedState.getAllRequests()).andReturn(Collections.<ClusterTopology,
      List<LogicalRequest>>emptyMap()).anyTimes();
  // request has a quicklinks profile
  expect(request.getQuickLinksProfileJson()).andReturn(SAMPLE_QUICKLINKS_PROFILE_1).anyTimes();
  // this means no quicklinks profile exists before calling provisionCluster()
  expect(settingDAO.findByName(QuickLinksProfile.SETTING_NAME_QUICKLINKS_PROFILE)).andReturn(null);
  // expect that settingsDao saves the quick links profile with the right content
  final long timeStamp = System.currentTimeMillis();
  mockStatic(System.class);
  expect(System.currentTimeMillis()).andReturn(timeStamp);
  PowerMock.replay(System.class);
  final SettingEntity quickLinksProfile = createQuickLinksSettingEntity(SAMPLE_QUICKLINKS_PROFILE_1, timeStamp);
  settingDAO.create(eq(quickLinksProfile));
  replayAll();
  topologyManager.provisionCluster(request);
}