Refactored latest attempt to use synchronous tests