mirrorapi test. Take a look at mirrorapi.cpp for details.