+\subsection{Tests du protocole}
+\begin{sloppypar}
+Un certain nombre de tests sont implémenté dans la fonction \texttt{end\_point::Client::start\_tests(..)}. Il est possible de les exécuter à l'aide de la commande suivante.
+\end{sloppypar}
+
+\begin{lstlisting}
+$> cargo run -- tests
+\end{lstlisting}
+
+La sortie de cette commande est la suivante.
+
+\begin{lstlisting}[breaklines, basicstyle=\small]
+$> cargo run -- tests
+ Compiling lab1_rust v0.0.1 (file:///home/gburri/Documents/Master/ICR/lab1/lab1_rust)
+ Running `target/lab1_rust tests`
+Starting server on [::1]:4221...
+Server started
+===== Test case #1:
+Sending a valid packet...
+[Client] time: 0. Sending: Command { id: 154, payload(29): "ba57cb4a9cc83c9b9027bca2cf9c46f25d0c1608a4044dc878bd474bbd" }
+[Server] time: 2. Valid command received: Packet { t: Command { id: 154, payload(29): "ba57cb4a9cc83c9b9027bca2cf9c46f25d0c1608a4044dc878bd474bbd" }, timestamp: 1 }
+[Server] time: 3. Answer sent: Answer { id: 125, payload(31): "a88ffbd4758e17d0130cd11c1749149bc33cc818c42edec5fb6edb29352f83" }
+[Client] time: 4. Command transmitted correctly, answer: Packet { t: Answer { id: 125, payload(31): "a88ffbd4758e17d0130cd11c1749149bc33cc818c42edec5fb6edb29352f83" }, timestamp: 3 }
+===== Test passed
+===== Test case #2:
+[Server] time: 3. Connection closed: EOF
+Sending a packet with an unknown type...
+[Server] time: 0. Error or invalid packet: Err(UnknownPacketTypeError)
+===== Test passed
+[Server] time: 0. Connection closed: EOF
+===== Test case #3:
+Sending a packet with an old timestamp...
+Error, timestamp mismatch, current timestamp: 0, packet received: Packet { t: Command { id: 154, payload(29): "ba57cb4a9cc83c9b9027bca2cf9c46f25d0c1608a4044dc878bd474bbd" }, timestamp: 0 }
+[Server] time: 0. Error or invalid packet: Err(InvalidTimestampError)
+===== Test passed
+[Server] time: 0. Connection closed: EOF
+===== Test case #4:
+Sending a packet with altered crypted data (do not alter the padding)...
+[Server] time: 2. Error or invalid packet: Err(MACMismatchError)
+===== Test passed
+[Server] time: 2. Connection closed: EOF
+===== Test case #5:
+Sending a packet with too small data...
+[Server] time: 0. Error or invalid packet: Err(UnconsistentDataSizeError)
+===== Test passed
+[Server] time: 0. Connection closed: EOF
+===== Test case #6:
+Sending a packet with too large data...
+[Server] time: 0. Error or invalid packet: Err(UnconsistentDataSizeError)
+===== Test passed
+[Server] time: 0. Connection closed: EOF
+===== Test case #7:
+Sending a packet with wrong padding (all 0)...
+[Server] time: 2. Error or invalid packet: Err(PaddingError)
+===== Test passed
+All tests passed
+[Server] time: 2. Connection closed: EOF
+\end{lstlisting}
+