@Test
public void testProcessRecord() throws Exception {

    Record record = new Record();
    record.attributes = new TreeMap<>();
    record.attributes.put("attr1", "foo");
    record.attributes.put("attr2", "bar");
    record.values = new HashMap<>();
    record.values.put("custom.googleapis.com/test", 77.0);
    GoogleMonitoringIngester ingester = new GoogleMonitoringIngester(conf);
    Datum datum = ingester.processRecord(record);
    assertEquals(77, datum.metrics().getEntry(0), 0.0);
    assertEquals(0, datum.attributes().get(0), 0.0);
    assertEquals(1, datum.attributes().get(1), 0.0);
}