🎬 H1 · Dependencies and First Test: given/when/then

H1 · Dependencies and First Test: REST Assured's `given().when().then()` chain turns bare `HttpClient` + JUnit `assert` code into a **sentence**: "GIVEN these preconditions, WHEN

REST Assured's `given().when().then()` chain turns bare `HttpClient` + JUnit `assert` code into a **sentence**: "GIVEN these preconditions, WHEN I make this request, THEN I expect this" — understandable even read as plain English. Writing the same test with `HttpClient` in Java takes dozens of boilerplate lines (connecting, adding headers, parsing the body), while REST Assured reduces it to THREE readable lines — a simplification similar to how `@Valid` removes Bean Validation boilerplate. So why is this "sentence" structure more than syntactic sugar? Because a STAKEHOLDER (a manager, a product owner) reading a test report can understand the SCENARIO just by reading a `given/when/then`-structured test name — a bare `assertEquals` line does not provide that. **For a deep REST Assured guide → see the `/rest-assured` page; here we are just starting to test the Bug Tracker with REST Assured.**

Micro Lab: Code practice

Replace the TODO line with the critical line from the expected solution. This is not a real runtime; the goal is to reinforce writing the correct structure in a controlled way.

Step by Step: Code practice

Identify goal and input

Complete the critical line

Check output or behavior

Read the error message as evidence

Order the code reading and verification flow.

🎬 given / when / then

GIVEN: preconditions

WHEN: make the request

THEN: verify the expectation

Stakeholder reads the test name