Guest User

Untitled

a guest
Jun 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public class PageList {
  2.  
  3. public void printPageOne() {
  4. System.out.println("Print Page One");
  5. }
  6.  
  7. public PageTwo nested() {
  8. return new PageTwo();
  9. }
  10.  
  11. public class PageTwo {
  12.  
  13. public void printPageTwo() {
  14. System.out.println("Print Page Two");
  15. }
  16. }
  17. }
  18.  
  19. public class Repository {
  20.  
  21. public PageList lists() {
  22. return new PageList();
  23. }
  24. }
  25.  
  26. @Test
  27. public void testRunThis() {
  28. lists().printPageOne();
  29. lists().nested().printPageTwo();
  30. }
Add Comment
Please, Sign In to add comment