&& unit.isActive(prepareCurrentDate())) {
&& unit.isActive(Calendar.getInstance().getTime())) {
    private boolean verifyCostCenterCode() throws FenixFilterException, FenixServiceException {        List<IUnit> allUnits = readAllUnits();        for (IUnit unit : allUnits) {            if (unit.getCostCenterCode() != null && !unit.equals(this.getChooseUnit())                    && this.getUnitCostCenter().equals(String.valueOf(unit.getCostCenterCode()))                    && unit.isActive(prepareCurrentDate())) {                setErrorMessage("error.costCenter.alreadyExists");                return true;            }        }        return false;    }