langchain4j/langchain4j-tablestore/src
Oleksandr Klymenko d73bd94682
test: enhance test coverage for IsEqualTo filter and Tablestore utilities (#3791)
This PR enhances test coverage for the `IsEqualTo` filter class and
`Tablestore` embedding utilities, focusing on edge cases, error
conditions, and type conversion scenarios.

**Changes**
Added 7 new tests to `IsEqualToTest`:

- Value comparison: Tests inequality detection between different values
- Type conversion: Verifies number type conversion (Long to Integer)
- Case sensitivity: Ensures string comparisons are case-sensitive
- Null handling: Tests behavior with null objects and null comparison
values
- Special characters: Validates keys containing dots work correctly
- Floating-point: Tests decimal number comparisons

Added 4 new tests to `TablestoreEmbeddingStoreTest`:

- Empty arrays: Tests serialization/deserialization of empty embeddings
- Null validation: Ensures proper exception handling for null inputs
- Round-trip consistency: Validates empty array parsing

**Impact**
The existing tests missed critical edge cases that could lead to runtime
errors. These additions ensure proper null handling, validate type
conversions work as expected, and document the API's behavior for edge
cases like empty arrays and special characters.

Signed-off-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
2025-10-01 11:45:22 +02:00
..
main/java/dev/langchain4j/store Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
test/java/dev/langchain4j/store test: enhance test coverage for IsEqualTo filter and Tablestore utilities (#3791) 2025-10-01 11:45:22 +02:00