public static boolean subjectExists(
      final SchemaRegistryClient srClient,
      final String subject
  ) {
    return getLatestSchema(srClient, subject).isPresent();
  }
@Test
  public void shouldReturnTrueOnIsSubjectExists() throws Exception {
    // Given:
    when(schemaRegistryClient.getLatestSchemaMetadata("foo-value")).thenReturn(schemaMetadata);

    // When:
    final boolean subjectExists = SchemaRegistryUtil.subjectExists(schemaRegistryClient, "foo-value");

    // Then:
    assertTrue("Expected subject to exist", subjectExists);
  }