@SuppressWarnings("unchecked")
@Test
public void happyPath() {

  scala.collection.immutable.List<GroupOverview> listAllGroupsFlattened = asScalaSet(
      singleton(GroupOverview.apply("groupId", ""))).toList();
  when(adminClient.listAllGroupsFlattened()).thenReturn(listAllGroupsFlattened);
  scala.collection.immutable.Map<TopicPartition, Object> offsets = asScalaMap(
      singletonMap(new TopicPartition("topicName", 0), (Object) 1L));
  when(adminClient.listGroupOffsets("groupId")).thenReturn(offsets);
  underTest.refresh();
  Matcher<Iterable<? extends Tag>> tags = containsInAnyOrder(tag("group", "groupId"), tag("topic", "topicName"),
      tag("partition", "0"));
  assertMeter(registry.get("kafka_offset").meter(), tags, 1);
}