Implement putIfAbsent and refactor testkit Future waiting methods