TPSReportStatusUsage { public boolean isApprovedV2(TPSReportStatus status) { return status instanceof TPSReportStatus.Approved; }  boolean isApproved(TPSReportStatus status); String message(TPSReportStatus status); void notify(TPSReportStatus status, final StatusNotifier notifier); void notifyDenied(TPSReportStatus status, final StatusNotifier notifier); boolean isApprovedV2(TPSReportStatus status);  }
@Test public void testWithInstanceOf() { assertFalse(usage.isApprovedV2(_Denied(_Manager("Foo")))); assertFalse(usage.isApprovedV2(_Pending())); assertTrue(usage.isApprovedV2(_Approved(_Manager("Foo")))); }