From the Stack trace you've provided, it seems you have a package foo. In order for this to work try to replace your implementation with the following:
Class<?> clazz = Class.forName("foo.Test");
N.B. Always remember that for reflection to work, you will be required to provide the full class name including the package.