DeepLinkAction extends Action { @Override public boolean acceptsArguments(@NonNull ActionArguments arguments) { switch (arguments.getSituation()) { case SITUATION_PUSH_OPENED: case SITUATION_WEB_VIEW_INVOCATION: case SITUATION_MANUAL_INVOCATION: case SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON: case SITUATION_AUTOMATION: return UriUtils.parse(arguments.getValue().getString()) != null; case Action.SITUATION_BACKGROUND_NOTIFICATION_ACTION_BUTTON: case Action.SITUATION_PUSH_RECEIVED: default: return false; } }  @NonNull @Override ActionResult perform(@NonNull ActionArguments arguments); @Override boolean acceptsArguments(@NonNull ActionArguments arguments); @Override boolean shouldRunOnMainThread(); @NonNull
    static final String DEFAULT_REGISTRY_NAME; @NonNull
    static final String DEFAULT_REGISTRY_SHORT_NAME; }
@Test public void testAcceptsArguments() { ActionArguments args = ActionTestUtils.createArgs(Action.SITUATION_MANUAL_INVOCATION, "http: assertTrue("Should accept valid url string", action.acceptsArguments(args)); args = ActionTestUtils.createArgs(Action.SITUATION_PUSH_OPENED, "http: assertTrue("Should accept valid url", action.acceptsArguments(args)); args = ActionTestUtils.createArgs(Action.SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON, "http: assertTrue("Should accept Action.SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON", action.acceptsArguments(args)); args = ActionTestUtils.createArgs(Action.SITUATION_PUSH_RECEIVED, "http: assertFalse("Should not accept Action.SITUATION_PUSH_RECEIVED", action.acceptsArguments(args)); }