Tests and inverse function