protected abstract void clearData();
@Test(dataProvider = "resourceMethodProvider")
  @SuppressWarnings("Duplicates")
  public void testEnvelopeSetDataNull(ResourceMethod resourceMethod)
  {
    // create an envelope and set all the data to null
    RestLiResponseEnvelope responseEnvelope = buildBlankResponseEnvelope(resourceMethod);
    responseEnvelope.clearData();

    // If response type is dynamically determined, extract the correct response envelope
    // based on the resource method and verify the data fields are all null
    if (ResponseTypeUtil.isDynamicallyDetermined(resourceMethod))
    {
      switch (resourceMethod)
      {
        case PARTIAL_UPDATE:
          PartialUpdateResponseEnvelope partialUpdateResponseEnvelope = (PartialUpdateResponseEnvelope) responseEnvelope;
          Assert.assertNull(partialUpdateResponseEnvelope.getRecord());
          break;
        default:
          throw new IllegalStateException();
      }
    }
    // Otherwise. extract the correct response envelope
    // based on the response type and verify the data fields are all null
    else
    {
      ResponseType responseType = ResponseTypeUtil.fromMethodType(resourceMethod);
      switch (responseType) {
        case SINGLE_ENTITY:
          RecordResponseEnvelope recordResponseEnvelope = (RecordResponseEnvelope) responseEnvelope;
          Assert.assertNull(recordResponseEnvelope.getRecord());
          break;
        case GET_COLLECTION:
          CollectionResponseEnvelope collectionResponseEnvelope = (CollectionResponseEnvelope) responseEnvelope;
          Assert.assertNull(collectionResponseEnvelope.getCollectionResponse());
          Assert.assertNull(collectionResponseEnvelope.getCollectionResponseCustomMetadata());
          Assert.assertNull(collectionResponseEnvelope.getCollectionResponsePaging());
          break;
        case CREATE_COLLECTION:
          BatchCreateResponseEnvelope batchCreateResponseEnvelope = (BatchCreateResponseEnvelope) responseEnvelope;
          Assert.assertNull(batchCreateResponseEnvelope.getCreateResponses());
          break;
        case BATCH_ENTITIES:
          BatchResponseEnvelope batchResponseEnvelope = (BatchResponseEnvelope) responseEnvelope;
          Assert.assertNull(batchResponseEnvelope.getBatchResponseMap());
          break;
        case BATCH_COLLECTION:
          BatchFinderResponseEnvelope batchFinderResponseEnvelope = (BatchFinderResponseEnvelope) responseEnvelope;
          Assert.assertNull(batchFinderResponseEnvelope.getItems());
          break;
        case STATUS_ONLY:
          // status only envelopes don't have data fields
          break;
        default:
          throw new IllegalStateException();
      }
    }
  }