Add testing for timeout

Signed-off-by: Michal Čihař <michal@cihar.com>
Make submit a public method

Signed-off-by: Michal Čihař <michal@cihar.com>