protected void tearDown() throws Exception {
   super.tearDown();
   CoreTransactionUtil.setUseTransactions(true);
   this.ofBizDelegator = null;
   this.genericDelegator = null;
   this.flCheck = null;
   this.ctrlFieldManager = null;
   this.mockFieldManager = null;
 }
  protected void setUp() throws Exception {
    super.setUp();
    CoreTransactionUtil.setUseTransactions(false);
    setUpMocks();

    ctrlFieldManager.expectAndReturn(mockFieldManager.isOrderableField("customfield_1"), true);
    ctrlFieldManager.expectAndReturn(mockFieldManager.isOrderableField("customfield_2"), false);
    ctrlFieldManager.expectAndReturn(mockFieldManager.isOrderableField("customfield_3"), false);

    replayMocks();

    UtilsForTests.getTestEntity(
        "FieldLayoutItem", EasyMap.build("id", new Long(1001), "fieldidentifier", "customfield_1"));
    UtilsForTests.getTestEntity(
        "FieldLayoutItem", EasyMap.build("id", new Long(1002), "fieldidentifier", "customfield_2"));
    UtilsForTests.getTestEntity(
        "FieldLayoutItem", EasyMap.build("id", new Long(1003), "fieldidentifier", "customfield_3"));

    flCheck = new FieldLayoutCheck(ofBizDelegator, 1);
    flCheck.setFieldManager(mockFieldManager);
  }