Add unit test + documentation

Signed-off-by: Antoine Mischler <antoine@dooapp.com>