### Question:
EventSubscriptionManager implements ChainHeadChannel, FinalizedCheckpointChannel { List<EventType> getTopics(List<String> topics) { return topics.stream().map(EventType::valueOf).collect(Collectors.toList()); } EventSubscriptionManager(
      final ChainDataProvider provider,
      final JsonProvider jsonProvider,
      final EventChannels eventChannels); void registerClient(final SseClient sseClient); @Override void chainHeadUpdated(
      final UInt64 slot,
      final Bytes32 stateRoot,
      final Bytes32 bestBlockRoot,
      final boolean epochTransition,
      final Optional<ReorgContext> optionalReorgContext); @Override void onNewFinalizedCheckpoint(final Checkpoint checkpoint);  }### Answer:
@Test void shouldParseEventTypes() { List<EventSubscriptionManager.EventType> topics = manager.getTopics(List.of("head", "chain_reorg", "finalized_checkpoint")); assertThat(topics) .containsExactlyInAnyOrder( EventSubscriptionManager.EventType.head, EventSubscriptionManager.EventType.chain_reorg, EventSubscriptionManager.EventType.finalized_checkpoint); }
@Test void shouldFailToParseInvalidEvents() { assertThrows(IllegalArgumentException.class, () -> manager.getTopics(List.of("head1"))); }