code: @Override
      protected void checkIntegrity () throws InternetSCSIException {
  
          String exceptionMessage;
          do {
              if (statusFlag && !protocolDataUnit.getBasicHeaderSegment().isFinalFlag()) {
                  exceptionMessage = "FinalFlag must also be set, if the StatusFlag is set.";
                  break;
              }
  
              if (!statusFlag && (bidirectionalReadResidualOverflow || bidirectionalReadResidualUnderflow) && (residualOverflow || residualUnderflow)) {
                  exceptionMessage = "The StatusFlag must be set, if any flags are set.";
                  break;
              }
  
              if (acknowledgeFlag && (targetTransferTag == 0 && logicalUnitNumber == 0)) {
                  exceptionMessage = "If the AcknowledgeFlag is set, the TargetTaskTag" + " and the LogicalUnitNumber must be unequal 0.";
                  break;
              }
  
              if (!acknowledgeFlag && (targetTransferTag != 0 && logicalUnitNumber != 0)) {
                  exceptionMessage = "The TargetTransferTag and LogicalUnitNumber must" + " be reserved, because the AcknowledgeFlag is not set.";
                  break;
              }
  
              // message is checked correctly
              return;
          } while (false);
  
          throw new InternetSCSIException(exceptionMessage);
      }
docs: {@inheritDoc}