OnrampMetrics { public void markSuccessMetrics(String roadName, String message) { markSuccessMetrics(roadName, message.getBytes(UTF_8).length); }  void markSuccessMetrics(String roadName, String message); void markSuccessMetrics(String roadName, long avroBytes); void markValidationFailures(String roadName); void markFailureMetrics(String roadName);  }
@Test public void markSuccessMetricsString() { String message = "message"; long size = message.getBytes().length; underTest.markSuccessMetrics(ROAD_NAME, message); assertThat(sendSuccess.get().count(), is(1.0)); assertThat(messageSize.get().takeSnapshot().total(), is((double) size)); }
@Test public void markSuccessMetricsLong() { long size = 7; underTest.markSuccessMetrics(ROAD_NAME, size); assertThat(sendSuccess.get().count(), is(1.0)); assertThat(messageSize.get().takeSnapshot().total(), is((double) size)); }