// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef

package dev.kreuzberg.e2e;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import dev.kreuzberg.Kreuzberg;
import dev.kreuzberg.ExtractionConfig;
import java.util.Optional;
import dev.kreuzberg.JsonUtil;

/** E2e tests for category: mime_utilities. */
class MimeUtilitiesTest {

    @Test
    void testMimeDetectBytes() throws Exception {
        // Detect MIME type from file bytes
        var result = Kreuzberg.detectMimeTypeFromBytes(java.nio.file.Files.readAllBytes(java.nio.file.Path.of("pdf/fake_memo.pdf")));
assertTrue(result.contains("pdf"), "expected to contain: " + "pdf");

    }


    @Test
    void testMimeDetectImage() throws Exception {
        // Detect MIME type from PNG image bytes
        var result = Kreuzberg.detectMimeTypeFromBytes(java.nio.file.Files.readAllBytes(java.nio.file.Path.of("images/test_hello_world.png")));
assertTrue(result.contains("png"), "expected to contain: " + "png");

    }


    @Test
    void testMimeGetExtensions() throws Exception {
        // Get file extensions for a MIME type
        var result = Kreuzberg.getExtensionsForMime("application/pdf");
assertTrue(result.contains("pdf"), "expected to contain: " + "pdf");

    }

}
