RateAppAction extends Action { @Override public boolean acceptsArguments(@NonNull ActionArguments arguments) { switch (arguments.getSituation()) { case SITUATION_FOREGROUND_NOTIFICATION_ACTION_BUTTON: case SITUATION_PUSH_OPENED: case SITUATION_MANUAL_INVOCATION: case SITUATION_WEB_VIEW_INVOCATION: case SITUATION_AUTOMATION: return getAppStoreUri() != null; case SITUATION_PUSH_RECEIVED: case SITUATION_BACKGROUND_NOTIFICATION_ACTION_BUTTON: 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; @NonNull
    static final String SHOW_LINK_PROMPT_KEY; @NonNull
    static final String TITLE_KEY; @NonNull
    static final String BODY_KEY; @NonNull
    static final String SHOW_RATE_APP_INTENT_ACTION; }
@Test public void testAcceptsArguments() { JsonMap linkPayload = JsonMap.newBuilder() .put(RateAppAction.SHOW_LINK_PROMPT_KEY, false) .build(); verifyAcceptsArgumentValue(linkPayload, true); JsonMap linkPromptPayload = JsonMap.newBuilder() .put(RateAppAction.SHOW_LINK_PROMPT_KEY, true) .build(); verifyAcceptsArgumentValue(linkPromptPayload, true); JsonMap customizedMessagePayload = JsonMap.newBuilder() .put(RateAppAction.SHOW_LINK_PROMPT_KEY, true) .put(RateAppAction.TITLE_KEY, "some title") .put(RateAppAction.BODY_KEY, "some body") .build(); verifyAcceptsArgumentValue(customizedMessagePayload, true); verifyAcceptsArgumentValue(null, true); }