Screen { public static boolean equals(Screen previous, Screen next) { if (previous == null || next == null) { return false; } return previous.equals(next); } Screen(); static boolean equals(Screen previous, Screen next); void saveViewState(View view); void restoreViewState(View view); Class<? extends ViewController> getController(); Integer getLayout(); static T fromScoop(Scoop scoop); static T fromView(View view); static T fromController(ViewController controller); @Override boolean equals(Object o); boolean equals(Object a, Object b); static final String SERVICE_NAME; }
@Test public void sameScreen() { Screen previous = new ScreenA(); Screen next = new ScreenA(); assertTrue(Screen.equals(previous, next)); }
@Test public void differentScreen() { Screen previous = new ScreenA(); Screen next = new ScreenB(); assertFalse(Screen.equals(previous, next)); }