@Override
    public CompletableFuture<SchemaVersion> putSchemaIfAbsent(String schemaId,
                                                              SchemaData schema,
                                                              SchemaCompatibilityStrategy strategy) {
        try {
            SchemaDataValidator.validateSchemaData(schema);
        } catch (InvalidSchemaDataException e) {
            return FutureUtil.failedFuture(e);
        }
        return service.putSchemaIfAbsent(schemaId, schema, strategy);
    }
@Test
    public void testPutSchemaIfAbsentWithGoodSchemaData() {
        String schemaId = "test-schema-id";
        SchemaCompatibilityStrategy strategy = SchemaCompatibilityStrategy.FULL;
        CompletableFuture<SchemaVersion> future = new CompletableFuture<>();
        when(underlyingService.putSchemaIfAbsent(eq(schemaId), any(SchemaData.class), eq(strategy)))
            .thenReturn(future);
        SchemaData schemaData = SchemaData.builder()
            .type(SchemaType.BOOLEAN)
            .data(new byte[0])
            .build();
        assertSame(future, service.putSchemaIfAbsent(schemaId, schemaData, strategy));
        verify(underlyingService, times(1))
            .putSchemaIfAbsent(eq(schemaId), same(schemaData), eq(strategy));
    }