[testing] added unit tests for calculate next due date