Add the then function and tests. This then function only takes function with void return type.