@Test public void testGetMessage() throws Exception { mockStatic(SimpleConfig.class); expect(SimpleConfig.getGreeting()).andReturn("Hi"); expect(SimpleConfig.getTarget()).andReturn("All"); replay(SimpleConfig.class); assertEquals("Hi All", invokeMethod(Greeter.class, "getMessage")); verify(SimpleConfig.class); }
private static String getMessage() { return SimpleConfig.getGreeting() + " " + SimpleConfig.getTarget(); }
Greeter { private static String getMessage() { return SimpleConfig.getGreeting() + " " + SimpleConfig.getTarget(); } }
Greeter { private static String getMessage() { return SimpleConfig.getGreeting() + " " + SimpleConfig.getTarget(); }  }
Greeter { private static String getMessage() { return SimpleConfig.getGreeting() + " " + SimpleConfig.getTarget(); }  static void main( String[] args ); }
Greeter { private static String getMessage() { return SimpleConfig.getGreeting() + " " + SimpleConfig.getTarget(); }  static void main( String[] args );  }