private static final String CONTENT_TYPE = "application/octet-stream";
private static final String NAME_JSON_TAG = "name";
private static final String INTERNAL_LOCATION_JSON_TAG = "internalLocation";
+ private static final String CONTEXT_JSON_TAG = "context";
private static final String PUBLISH_TOPIC = "publish";
private static final String DEFAULT_FEED_ID = "1";
JsonElement metaData = new JsonParser().parse(CommonFunctions.createJsonBody(publishInfo));
metaData.getAsJsonObject().remove(NAME_JSON_TAG).getAsString();
metaData.getAsJsonObject().remove(INTERNAL_LOCATION_JSON_TAG);
+ metaData.getAsJsonObject().remove(CONTEXT_JSON_TAG);
+
put.addHeader(X_DMAAP_DR_META, metaData.toString());
put.setURI(getPublishUri(publishInfo.getName()));
MappedDiagnosticContext.appendTraceInfo(put);
Header[] metaHeaders = actualPut.getHeaders(X_DMAAP_DR_META);
Map<String, String> metaHash = getMetaDataAsMap(metaHeaders);
- assertEquals(11, metaHash.size());
+
+ // Note that the following line checks the number of properties that are sent to the data router.
+ // This should be 10 unless the API is updated. The class DataRouterPublisher removes
+ // info that should not be reported.
+ assertEquals(10, metaHash.size());
assertEquals(PRODUCT_NAME, metaHash.get("productName"));
assertEquals(VENDOR_NAME, metaHash.get("vendorName"));
assertEquals(LAST_EPOCH_MICROSEC, metaHash.get("lastEpochMicrosec"));