# (DD06) Business Logic — TestInfo.toString() [5 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.optage.model.TestInfo` |
| Layer | Utility |
| Module | `model` (Package: `com.optage.model`) |

## 1. Role

### TestInfo.toString()

`TestInfo.toString()` provides a standardized textual representation of a `TestInfo` value object for diagnostics, logging, and human-readable inspection. In business terms, it summarizes a test-separation record by presenting the target class name, the test classification flag, and the associated detection signals in one compact string. The method does not branch by service type or perform any domain decision-making; instead, it implements a formatting pattern that converts internal state into a stable presentation format.

Within the larger system, this method acts as a shared observability aid for the `model` layer. Any component that logs, traces, or inspects `TestInfo` instances can rely on this output to understand whether a class is treated as test-related and which signals are attached. Because it is a simple formatter, it follows a presentation/serialization-style pattern rather than a routing or delegation pattern.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START["toString()"]
    FORMAT["Build formatted summary string with className, isTest, and detectionSignals"]
    RETURN["Return formatted String"]
    START --> FORMAT
    FORMAT --> RETURN
```

**CRITICAL — Constant Resolution:**
This method does not reference any constants, branches, or switch labels.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | - |

**Instance fields and external state used by the method:** `className`, `isTest`, `detectionSignals`.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `String.format` | N/A | N/A | Reads the current object state and produces a formatted business description string for display or logging. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `BusinessLabel` | `BusinessLabel -> TestInfo.toString` | `String.format [R] N/A` |
| 2 | `ChangeMarker` | `ChangeMarker -> TestInfo.toString` | `String.format [R] N/A` |

## 6. Per-Branch Detail Blocks

**Block 1** — [RETURN] `(unconditional)` (L27)

> Returns a concise textual snapshot of the test information object for logging and diagnostics.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `String.format("TestInfo{class=%s, isTest=%s, signals=%s}", className, isTest, detectionSignals);` |
| 2 | RETURN | `return String.format(...);` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|-------------------|
| `className` | Field | Target class name being evaluated or labeled as test-related. |
| `isTest` | Field | Boolean flag indicating whether the class is classified as a test artifact. |
| `detectionSignals` | Field | List of signals or markers used to identify test separation behavior. |
| Test separation | Business term | The rule set or logic used to distinguish test-related artifacts from non-test artifacts. |
| `String.format` | Technical term | Java formatting utility used to build a structured text representation from field values. |
| `model` | Technical term | Package layer that holds lightweight domain/data holder objects. |
