First, your data generating process should be consistent with the alternative hypothesis.
Then compute the rejection frequency of the test.
For testing unit root, generate data as
y (t) = rho*y(t-1)+error
The alternative hypothesis is rho<1.
So let rho = 0.95, and apply the unit root test. Repeat this process many times, and compute the rejection frequency of the test you use (such as ADF and PP tests). You will get a number far less than 1. That means the unit root test has low power.