@Test public void cdpDatalakeClusterRequested() { long timestamp = System.currentTimeMillis(); UsageProto.CDPDatalakeClusterRequested proto = UsageProto.CDPDatalakeClusterRequested.newBuilder() .setAccountId(dummy) .setCdpdVersion(dummy) .setDatalakeId(dummy) .setDatalakeName(dummy) .setCreatorCrn(dummy) .build(); usageReporter.cdpDatalakeClusterRequested(timestamp, proto); ArgumentCaptor<UsageProto.Event> captor = ArgumentCaptor.forClass(UsageProto.Event.class); verify(usageReporter).log(captor.capture()); assertEquals(timestamp, captor.getValue().getTimestamp()); assertEquals(dummy, captor.getValue().getCdpDatalakeClusterRequested().getCreatorCrn()); }
@Override public void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details) { checkNotNull(details); log(eventBuilder() .setTimestamp(timestamp) .setCdpDatalakeClusterRequested(details) .build()); }
LoggingUsageReporter implements UsageReporter { @Override public void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details) { checkNotNull(details); log(eventBuilder() .setTimestamp(timestamp) .setCdpDatalakeClusterRequested(details) .build()); } }
LoggingUsageReporter implements UsageReporter { @Override public void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details) { checkNotNull(details); log(eventBuilder() .setTimestamp(timestamp) .setCdpDatalakeClusterRequested(details) .build()); }  }
LoggingUsageReporter implements UsageReporter { @Override public void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details) { checkNotNull(details); log(eventBuilder() .setTimestamp(timestamp) .setCdpDatalakeClusterRequested(details) .build()); }  @Override void cdpDatahubClusterRequested(long timestamp, UsageProto.CDPDatahubClusterRequested details); @Override void cdpDatahubClusterStatusChanged(UsageProto.CDPDatahubClusterStatusChanged details); @Override void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details); @Override void cdpDatalakeClusterStatusChanged(UsageProto.CDPDatalakeClusterStatusChanged details); }
LoggingUsageReporter implements UsageReporter { @Override public void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details) { checkNotNull(details); log(eventBuilder() .setTimestamp(timestamp) .setCdpDatalakeClusterRequested(details) .build()); }  @Override void cdpDatahubClusterRequested(long timestamp, UsageProto.CDPDatahubClusterRequested details); @Override void cdpDatahubClusterStatusChanged(UsageProto.CDPDatahubClusterStatusChanged details); @Override void cdpDatalakeClusterRequested(long timestamp, UsageProto.CDPDatalakeClusterRequested details); @Override void cdpDatalakeClusterStatusChanged(UsageProto.CDPDatalakeClusterStatusChanged details);  }