use of com.google.api.services.dataflow.model.CounterUpdate in project beam by apache.
the class DataflowCounterUpdateExtractorTest method testExtractUnstructuredNameCorrectly.
@Test
public void testExtractUnstructuredNameCorrectly() {
CounterName unstructuredName = CounterName.named(COUNTER_NAME);
Counter<?, ?> unstructured = counterFactory.intSum(unstructuredName);
// unstructured counter should not have a structured name
CounterUpdate counterUpdate = unstructured.extractUpdate(true, DataflowCounterUpdateExtractor.INSTANCE);
assertThat(counterUpdate, not(hasStructuredName()));
assertThat(counterUpdate, hasName(COUNTER_NAME));
}
Aggregations