I have some private method. for access the method and do the test I create a new instance as follows in a test class.
Class c = Class.forName("com.leopard.spring.StartGame");
StartGame testSG1 = (StartGame)c.newInstance();
Method m = testSG1.getClass().getDeclaredMethod("setUpForm");
m.setAccessible(true);
m.invoke(testSG1,null);
After doing that I couldn't call for the setUpForm() method to test that. What should I do?