The better approach will be to convert in kotlin and use delay so it does not block the main thread and also we could do parallel testing as well