Ralf Koetter

127 papers A* 4A 1B 37C 3Misc 2Journal 67Unranked 13
YearRankTypeTitle / Venue / Authors
2014 J jnl
IEEE Trans. Inf. Theory
Ralf Koetter, Michelle Effros, Muriel Médard
2013 J jnl
CoRR
Kannan Achan, Brendan J. Frey, Ralf Koetter
2012 J jnl
IEEE/ACM Trans. Netw.
Danail Traskov, Michael Heindlmaier, Muriel Médard, Ralf Koetter
2011 J jnl
IEEE Trans. Inf. Theory
Ralf Koetter, Michelle Effros, Muriel Médard
2011 J jnl
IEEE Commun. Mag.
Andrea Goldsmith, Michelle Effros, Ralf Koetter, Muriel Médard, Asuman E. Ozdaglar, Lizhong Zheng
2011 J jnl
IEEE Trans. Inf. Theory
Ralf Koetter, Jun Ma, Alexander Vardy
2011 J jnl
IEEE Trans. Inf. Theory
Arshad Ahmed, Ralf Koetter, Naresh R. Shanbhag
2010 J jnl
CoRR
Ralf Koetter, Michelle Effros, Muriel Médard
2010 J jnl
IEEE J. Sel. Areas Commun.
Minji Kim, Luísa Lima, Fang Zhao, João Barros, Muriel Médard, Ralf Koetter, Ton Kalker, Keesook J. Han
2010 J jnl
CoRR
Ralf Koetter, Jun Ma, Alexander Vardy
2009 B conf
GLOBECOM
Joschi Brauchle, Ralf Koetter
2009 J jnl
CoRR
Minji Kim, Muriel Médard, João Barros, Ralf Koetter
2009 B conf
PIMRC
Georg Zeitler, Ralf Koetter, Gerhard Bauch, Joerg Widmer
2009 B conf
ISIT
Minji Kim, Ralf Koetter, Muriel Médard, João Barros
2009 conf
Allerton
Ralf Koetter, Michelle Effros, Muriel Médard
2009 B conf
ISIT
Luísa Lima, João Barros, Ralf Koetter
2009 B conf
GLOBECOM
Lena Chebli, Christoph Hausl, Georg Zeitler, Ralf Koetter
2009 conf
ICC
Christoph Hausl, Tobias Lutz, Ralf Koetter
2009 B conf
GLOBECOM
Danail Traskov, Muriel Médard, Parastoo Sadeghi, Ralf Koetter
2009 J jnl
CoRR
Minji Kim, Luísa Lima, Fang Zhao, João Barros, Muriel Médard, Ralf Koetter, Ton Kalker, Keesook J. Han
2009 conf
ICC
Georg Zeitler, Ralf Koetter, Gerhard Bauch, Jörg Widmer
2009 B conf
ITW
Ralf Koetter, Michelle Effros, Muriel Médard
2008 J jnl
IEEE Trans. Inf. Theory
Danilo Silva, Frank R. Kschischang, Ralf Koetter
2008 J jnl
IEEE Trans. Inf. Theory
Tracey Ho, Ben Leong, Ralf Koetter, Muriel Médard, Michelle Effros, David R. Karger
2008 J jnl
CoRR
Tobias Lutz, Christoph Hausl, Ralf Koetter
2008 J jnl
IEEE Trans. Inf. Theory
Ralf Koetter, Frank R. Kschischang
2008 B conf
ISIT
Tobias Lutz, Christoph Hausl, Ralf Koetter
2008 J jnl
IEEE Trans. Inf. Theory
Yibo Jiang, Alexei E. Ashikhmin, Ralf Koetter, Andrew C. Singer
2008 J jnl
CoRR
Minji Kim, Jay Kumar Sundararajan, Muriel Médard, Atilla Eryilmaz, Ralf Koetter
2008 J jnl
Eur. Trans. Telecommun.
Sergio Benedetto, Giuseppe Caire, Ralf Koetter, Rüdiger L. Urbanke
2008 J jnl
Phys. Commun.
Desmond S. Lun, Muriel Médard, Ralf Koetter, Michelle Effros
2007 J jnl
CoRR
Rachit Agarwal, Ralf Koetter, Emanuel M. Popovici
2007 B conf
ISIT
Rachit Agarwal, Ralf Koetter, Emanuel M. Popovici
2007 J jnl
CoRR
Danilo Silva, Frank R. Kschischang, Ralf Koetter
2007 B conf
ITW
Danilo Silva, Frank R. Kschischang, Ralf Koetter
2007 J jnl
J. Chem. Inf. Model.
Desmond S. Lun, Laura D. Jennings, Ralf Koetter, Stuart Licht, Muriel Médard
2007 J jnl
CoRR
Ralf Koetter, Frank R. Kschischang
2007 B conf
ISIT
Ralf Koetter, Frank R. Kschischang
2007 conf
ICIP (5)
Shankar Sadasivam, Pierre Moulin, Ralf Koetter
2007 B conf
ISIT
Danail Traskov, Desmond S. Lun, Ralf Koetter, Muriel Médard
2007 A* conf
INFOCOM
Jay Kumar Sundararajan, Muriel Médard, Minji Kim, Atilla Eryilmaz, Devavrat Shah, Ralf Koetter
2007 J jnl
CoRR
Sichao Yang, Ralf Koetter
2007 B conf
ISIT
Sichao Yang, Ralf Koetter
2007 B conf
ISIT
Mayank Bakshi, Michelle Effros, Wei-Hsin Gu, Ralf Koetter
2007 B conf
ISIT
Wei-Hsin Gu, Ralf Koetter, Michelle Effros, Tracey Ho
2007 J jnl
Eur. Trans. Telecommun.
Pascal O. Vontobel, Ralf Koetter
2006 B conf
ISIT
Xiangyu Tang, Ralf Koetter
2006 J jnl
IEEE Trans. Inf. Theory
Tracey Ho, Muriel Médard, Ralf Koetter, David R. Karger, Michelle Effros, Jun Shi, Ben Leong
2006 conf
Security, Steganography, and Watermarking of Multimedia Contents
Pierre Moulin, Ralf Koetter
2006 J jnl
IEEE Trans. Commun.
Warren J. Gross, Frank R. Kschischang, Ralf Koetter, P. Glenn Gulak
2006 J jnl
IEEE Trans. Commun.
Warren J. Gross, Frank R. Kschischang, Ralf Koetter, P. Glenn Gulak
2006 J jnl
CoRR
Pascal O. Vontobel, Ralf Koetter
2006 B conf
ITW
Pascal O. Vontobel, Ralf Koetter
2006 J jnl
IEEE Trans. Inf. Theory
Ning Cai, Mung Chiang, Michelle Effros, Ralf Koetter, Muriel Médard, Balaji Prabhakar, R. Srikant, Donald F. Towsley, Raymond W. Yeung
2006 J jnl
IEEE/ACM Trans. Netw.
Ning Cai, Mung Chiang, Michelle Effros, Ralf Koetter, Muriel Médard, Balaji Prabhakar, R. Srikant, Donald F. Towsley, Raymond W. Yeung
2006 B conf
ISIT
Mustafa Kesal, Siddhartha Mallik, Ralf Koetter
2006 J jnl
IEEE Trans. Inf. Theory
Desmond S. Lun, Niranjan Ratnakar, Muriel Médard, Ralf Koetter, David R. Karger, Tracey Ho, Ebad Ahmed, Fang Zhao
2006 J jnl
EURASIP J. Adv. Signal Process.
Siddhartha Mallik, Ralf Koetter
2006 B conf
ISIT
Danail Traskov, Niranjan Ratnakar, Desmond S. Lun, Ralf Koetter, Muriel Médard
2006 J jnl
CoRR
Jay Kumar Sundararajan, Muriel Médard, Minji Kim, Atilla Eryilmaz, Devavrat Shah, Ralf Koetter
2006 J jnl
Eur. Trans. Telecommun.
Sergio Benedetto, Giuseppe Caire, Ralf Koetter, Rüdiger L. Urbanke
2006 J jnl
CoRR
Siddharth Ray, Michelle Effros, Muriel Médard, Ralf Koetter, Tracey Ho, David R. Karger, Jinane Abounadi
2006 J jnl
IEEE Trans. Inf. Theory
Tie Liu, Pierre Moulin, Ralf Koetter
2006 J jnl
CoRR
Ralf Koetter, Pascal O. Vontobel
2006 J jnl
CoRR
Pascal O. Vontobel, Ralf Koetter
2006 J jnl
IEEE Trans. Medical Imaging
Lei Ying, Zhi-Pei Liang, David C. Munson, Ralf Koetter, Brendan J. Frey
2005 A* conf
INFOCOM
Desmond S. Lun, Niranjan Ratnakar, Ralf Koetter, Muriel Médard, Ebad Ahmed, Hyunjoo Lee
2005 J jnl
IEEE Trans. Inf. Theory
Tracey Ho, Muriel Médard, Ralf Koetter
2005 J jnl
CoRR
Ralf Koetter, Wen-Ching W. Li, Pascal O. Vontobel, Judy L. Walker
2005 J jnl
Proc. IEEE
Pierre Moulin, Ralf Koetter
2005 J jnl
IEEE Trans. Inf. Theory
Niranjan Ratnakar, Ralf Koetter
2005 B conf
ISIT
Yibo Jiang, Alexei Ashikhmin, Ralf Koetter, Andrew C. Singer
2005 J jnl
CoRR
Desmond S. Lun, Muriel Médard, Ralf Koetter, Michelle Effros
2005 B conf
ISIT
Desmond S. Lun, Muriel Médard, Ralf Koetter, Michelle Effros
2005 J jnl
CoRR
Pascal O. Vontobel, Ralf Koetter
2005 J jnl
CoRR
Kapil Bhattad, Niranjan Ratnakar, Ralf Koetter, Krishna R. Narayanan
2005 B conf
ISIT
Kapil Bhattad, Niranjan Ratnakar, Ralf Koetter, Krishna R. Narayanan
2005 J jnl
CoRR
Desmond S. Lun, Niranjan Ratnakar, Muriel Médard, Ralf Koetter, David R. Karger, Tracey Ho, Ebad Ahmed, Fang Zhao
2005 J jnl
CoRR
Desmond S. Lun, Muriel Médard, Ralf Koetter, Michelle Effros
2005 J jnl
CoRR
Ralf Koetter, Wen-Ching W. Li, Pascal O. Vontobel, Judy L. Walker
2005 J jnl
CoRR
Jon Feldman, Ralf Koetter, Pascal O. Vontobel
2005 B conf
ISIT
Jon Feldman, Ralf Koetter, Pascal O. Vontobel
2005 J jnl
J. VLSI Signal Process.
Warren J. Gross, Frank R. Kschischang, Ralf Koetter, P. Glenn Gulak
2004 B conf
ISIT
Tracey Ho, Ben Leong, Ralf Koetter, Muriel Médard, Michelle Effros, David R. Karger
2004 B conf
ISIT
Niranjan Ratnakar, Ralf Koetter
2004 B conf
SECON
Shi Chao Zhang, F. Irem Koprulu, Ralf Koetter, Douglas L. Jones
2004 J jnl
Eur. Trans. Telecommun.
Michael Tüchler, Ralf Koetter, Andrew C. Singer
2004 B conf
ISIT
Pascal O. Vontobel, Ralf Koetter
2004 B conf
ITW
Tie Liu, Pierre Moulin, Ralf Koetter
2004 J jnl
IEEE Trans. Inf. Theory
Rong-Rong Chen, Bruce E. Hajek, Ralf Koetter, Upamanyu Madhow
2004 B conf
ITW
Michelle Effros, Ralf Koetter, Andrea J. Goldsmith, Muriel Médard
2004 B conf
ISIT
Xiangyu Tang, Ralf Koetter
2004 conf
ICASSP (3)
Pierre Moulin, Anil Kumar Goteti, Ralf Koetter
2004 B conf
ISIT
Siddhartha Mallik, Ralf Koetter
2004 B conf
ITW
Ralf Koetter, Wen-Ching W. Li, Pascal O. Vontobel, Judy L. Walker
2004 B conf
ISIT
Arshad Ahmed, Ralf Koetter, Naresh R. Shanbhag
2004 B conf
ISIT
Yingquan Wu, Ralf Koetter, Christoforos N. Hadjicostis
2004 J jnl
IEEE Signal Process. Mag.
Ralf Koetter, Andrew C. Singer, Michael Tüchler
2004 conf
ICC
Arshad Ahmed, Ralf Koetter, Naresh R. Shanbhag
2003 B conf
ITW
Ralf Koetter, Alexander Vardy
2003 J jnl
IEEE Trans. Inf. Theory
Ralf Koetter, Alexander Vardy
2003 J jnl
IEEE/ACM Trans. Netw.
Ralf Koetter, Muriel Médard
2003 A* conf
INFOCOM
Tracey Ho, Muriel Médard, Ralf Koetter
2003 J jnl
IEEE Trans. Commun.
Rong-Rong Chen, Ralf Koetter, Upamanyu Madhow, Dakshi Agrawal
2003 conf
Advances in Network Information Theory
Michelle Effros, Muriel Médard, Tracey Ho, Siddharth Ray, David R. Karger, Ralf Koetter, Babak Hassibi
2003 J jnl
IEEE Trans. Commun.
Jill K. Nelson, Andrew C. Singer, Ralf Koetter
2003 conf
ICIP (3)
Lei Ying, David C. Munson, Ralf Koetter, Brendan J. Frey
2003 J jnl
IEEE Trans. Inf. Theory
Yibo Jiang, Ralf Koetter, Andrew C. Singer
2003 J jnl
IEEE Trans. Inf. Theory
Ralf Koetter, Alexander Vardy
2003 B conf
ITW
Carey Radebaugh, Ralf Koetter, Clint Powell
2002 conf
ICIP (3)
Lei Ying, David C. Munson, Ralf Koetter, Brendan J. Frey
2002 C conf
IGARSS
Lei Ying, Brendan J. Frey, Ralf Koetter, David C. Munson
2002 C conf
IGARSS
David C. Schultz, Ralf Koetter, Brendan J. Frey, David C. Munson Jr.
2002 A* conf
INFOCOM
Muriel Médard, Ralf Koetter
2002 J jnl
IEEE Trans. Signal Process.
Michael Tüchler, Andrew C. Singer, Ralf Koetter
2002 J jnl
IEEE Trans. Inf. Theory
Tsonka Stefanova Baicheva, Stefan M. Dodunekov, Ralf Koetter
2002 C conf
IGARSS
Kannan Achan, Brendan J. Frey, Ralf Koetter, David C. Munson
2002 J jnl
IEEE Trans. Commun.
Michael Tüchler, Ralf Koetter, Andrew C. Singer
2001 B conf
ITW
Brendan J. Frey, Ralf Koetter, Nemanja Petrovic
2001 A conf
UAI
Kannan Achan, Brendan J. Frey, Ralf Koetter
2001 conf
CVPR (1)
Nemanja Petrovic, Ira Cohen, Brendan J. Frey, Ralf Koetter, Thomas S. Huang
2001 conf
CICC
Jonathan B. Ashbrook, Naresh R. Shanbhag, Ralf Koetter, Richard E. Blahut
2001 J jnl
IEEE Trans. Inf. Theory
Brendan J. Frey, Ralf Koetter, G. David Forney Jr., Frank R. Kschischang, Robert J. McEliece, Daniel A. Spielman
2001 J jnl
IEEE Trans. Inf. Theory
Brendan J. Frey, Ralf Koetter, Alexander Vardy
2001 Misc conf
ICASSP
Ralf Koetter, Brendan J. Frey, Nemanja Petrovic, David C. Munson Jr.
2001 Misc conf
ICASSP
Kannan Achan, Brendan J. Frey, Ralf Koetter, David C. Munson Jr.
2001 conf
NIPS
Brendan J. Frey, Ralf Koetter, Nemanja Petrovic
tests/integration/test_base_extractor.py
← Index tests/integration/test_base_extractor.py python
"""
Integration tests for the base Extractor class.
"""
import pytest
import hashlib
import math
from unittest.mock import Mock, patch, MagicMock
from collections import Counter

pytestmark = [pytest.mark.integration]


class TestExtractorStaticMethods:
    """Tests for static methods in Extractor class."""

    def test_process_binary_string_printable(self):
        """Test processing a printable binary string."""
        from redb.extractors.extractor import Extractor

        # Test with printable ASCII characters
        input_bytes = b"Hello World\x00\x00\x00"
        result = Extractor.process_binary_string(input_bytes)
        assert result == "Hello World"

    def test_process_binary_string_non_printable(self):
        """Test processing a string with non-printable characters."""
        from redb.extractors.extractor import Extractor

        # Test with non-printable characters
        input_bytes = b"\x01\x02Hello\x00"
        result = Extractor.process_binary_string(input_bytes)
        assert "\\x01" in result
        assert "\\x02" in result
        assert "Hello" in result

    def test_process_binary_string_empty(self):
        """Test processing an empty binary string."""
        from redb.extractors.extractor import Extractor

        input_bytes = b"\x00\x00\x00"
        result = Extractor.process_binary_string(input_bytes)
        assert result == ""

    def test_process_binary_string_all_printable(self):
        """Test processing a fully printable string."""
        from redb.extractors.extractor import Extractor

        input_bytes = b"TestString123"
        result = Extractor.process_binary_string(input_bytes)
        assert result == "TestString123"

    def test_remove_non_utf8_valid(self):
        """Test removing non-UTF8 characters from valid UTF8 string."""
        from redb.extractors.extractor import Extractor

        input_bytes = b"Hello World"
        result = Extractor.remove_non_utf8(input_bytes)
        assert result == b"Hello World"

    def test_remove_non_utf8_with_invalid(self):
        """Test removing non-UTF8 characters from mixed string."""
        from redb.extractors.extractor import Extractor

        # Mix of valid UTF8 and invalid bytes
        input_bytes = b"Hello\xff\xfeWorld"
        result = Extractor.remove_non_utf8(input_bytes)
        # Should remove the invalid bytes
        assert b"\xff" not in result
        assert b"\xfe" not in result
        assert b"Hello" in result
        assert b"World" in result

    def test_remove_non_utf8_empty(self):
        """Test removing non-UTF8 from empty string."""
        from redb.extractors.extractor import Extractor

        result = Extractor.remove_non_utf8(b"")
        assert result == b""


class TestExtractorEntropyCalculation:
    """Tests for entropy calculation in Extractor class."""

    def test_calculate_entropy_empty_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with empty data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            result = extractor.calculate_entropy(b"")
            assert result == 0.0

    def test_calculate_entropy_uniform_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with uniform (low entropy) data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            # All same bytes = 0 entropy
            uniform_data = b"\x00" * 256
            result = extractor.calculate_entropy(uniform_data)
            assert result == 0.0

    def test_calculate_entropy_random_data(self, elf_binary_path, mock_logger, high_entropy_data):
        """Test entropy calculation with random (high entropy) data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            result = extractor.calculate_entropy(high_entropy_data)
            # Random data should have entropy close to 8 (max for bytes)
            assert result > 7.0

    def test_calculate_entropy_binary_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with binary data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            # Two equally distributed values = 1 bit entropy
            binary_data = b"\x00\x01" * 128
            result = extractor.calculate_entropy(binary_data)
            assert abs(result - 1.0) < 0.01

    def test_calculate_entropy_string_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with string data."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            # String with two equally distributed characters
            string_data = "ab" * 100
            result = extractor.calculate_entropy(string_data)
            assert abs(result - 1.0) < 0.01


class TestExtractorInitialization:
    """Tests for Extractor initialization."""

    def test_extractor_hashes_computed_on_init(self, elf_binary_path, mock_logger, known_hashes):
        """Test that hashes are computed during initialization."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)

            assert extractor.md5 == known_hashes['md5']
            assert extractor.sha1 == known_hashes['sha1']
            assert extractor.sha256 == known_hashes['sha256']

    def test_extractor_hash_dataclass_created(self, elf_binary_path, mock_logger, known_hashes):
        """Test that Hash dataclass is created during initialization."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)

            assert extractor.hash.md5 == known_hashes['md5']
            assert extractor.hash.sha1 == known_hashes['sha1']
            assert extractor.hash.sha256 == known_hashes['sha256']

    def test_extractor_binary_cached_property(self, elf_binary_path, mock_logger, elf_binary_content):
        """Test that binary content is loaded as cached property."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)

            # Access binary property
            binary = extractor.binary
            assert binary == elf_binary_content

            # Second access should return cached value (same id)
            assert extractor.binary is binary

    def test_extractor_with_exporters(self, elf_binary_path, mock_logger, mock_print_exporter):
        """Test extractor initialization with exporters."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                exporters=[mock_print_exporter]
            )

            assert len(extractor.exporters) == 1
            assert extractor.exporters[0] is mock_print_exporter

    def test_extractor_with_index_prefix(self, elf_binary_path, mock_logger):
        """Test extractor initialization with custom index prefix."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                index_prefix="custom_prefix"
            )

            assert "custom_prefix" in extractor.elastic_index

    def test_extractor_known_benign_flag(self, elf_binary_path, mock_logger):
        """Test extractor with known_benign flag."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                known_benign=True
            )

            assert extractor.known_benign is True
            assert extractor.known_malicious is False

    def test_extractor_known_malicious_flag(self, elf_binary_path, mock_logger):
        """Test extractor with known_malicious flag."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                known_malicious=True
            )

            assert extractor.known_benign is False
            assert extractor.known_malicious is True


class TestExtractorExportData:
    """Tests for export_data method."""

    def test_export_data_with_print_exporter(self, elf_binary_path, mock_logger, mock_print_exporter, capsys):
        """Test export_data with PrintExporter."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                exporters=[mock_print_exporter]
            )

            result = extractor.export_data()
            # Should succeed with PrintExporter
            assert result is True

    def test_export_data_no_exporters(self, elf_binary_path, mock_logger):
        """Test export_data with no exporters configured."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(
                elf_binary_path,
                mock_logger,
                exporters=[]
            )

            result = extractor.export_data()
            # Should succeed with no exporters (nothing to export)
            assert result is True


class TestExtractorEdgeCases:
    """Tests for edge cases in Extractor class."""

    def test_extractor_with_nonexistent_file(self, mock_logger):
        """Test extractor with non-existent file."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            with pytest.raises(FileNotFoundError):
                BasicPropertiesExtractor("/nonexistent/file.bin", mock_logger)

    def test_entropy_none_data(self, elf_binary_path, mock_logger):
        """Test entropy calculation with None returns 0."""
        from redb.extractors.basicproperties import BasicPropertiesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = BasicPropertiesExtractor(elf_binary_path, mock_logger)
            result = extractor.calculate_entropy(None)
            assert result == 0.0

    def test_process_binary_string_high_bytes(self):
        """Test processing binary string with high byte values."""
        from redb.extractors.extractor import Extractor

        # Characters above 126 are non-printable
        input_bytes = b"\x7f\x80\x81\xff"
        result = Extractor.process_binary_string(input_bytes)
        assert "\\x7f" in result
        assert "\\x80" in result
        assert "\\xff" in result