Unit test for function, which fixes duplicated timestamps issue