# Test cases

## For http communication

* successful response for the request sent
  * body returned
    * specific part which is important to your app
  * headers
  * status code
* Internal server error
  * status code 500
* 404 error
* Timeout
  * sockettimeout exception
* Succesful response but corrupted data in body
  * malformed json/xml
* Successful response but no data
  * like graphql, nulls in fields of response ie not data for that request

## Equals and hashcode

* Reflexive
* Symmetric
* Transitive
* Consistent
* Non-nullity
* missing fields
* specific fields used only in checking equality

## Comparable

## Unmarshalling json/xml

* dont blow up
* optional fields

## Thread safety

* <https://dzone.com/articles/how-to-test-if-a-class-is-thread-safe-in-java>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hanfak.gitbook.io/workspace/testing-reading-maintaining/test-cases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
