@Test(expected = IllegalArgumentException.class) public void testPermission_whenPermissionContextIsEmpty_thenShouldThrowException() throws Exception { ResponseBuilder.askForPermissionResponse(null, new ArrayList<>()); }
public static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions) { List<String> permissionsStr = new ArrayList<>(); for (SupportedPermissions permission : permissions) { permissionsStr.add(permission.name()); } return askForPermissionResponse(permissionContext, permissionsStr); }
ResponseBuilder { public static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions) { List<String> permissionsStr = new ArrayList<>(); for (SupportedPermissions permission : permissions) { permissionsStr.add(permission.name()); } return askForPermissionResponse(permissionContext, permissionsStr); } }
ResponseBuilder { public static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions) { List<String> permissionsStr = new ArrayList<>(); for (SupportedPermissions permission : permissions) { permissionsStr.add(permission.name()); } return askForPermissionResponse(permissionContext, permissionsStr); }  }
ResponseBuilder { public static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions) { List<String> permissionsStr = new ArrayList<>(); for (SupportedPermissions permission : permissions) { permissionsStr.add(permission.name()); } return askForPermissionResponse(permissionContext, permissionsStr); }  static RootResponse tellResponse(String message); static RootResponse tellResponse(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(String message); static RootResponse askResponse(SpeechResponse message); static RootResponse askResponse(String message, String[] noInputPrompts); static RootResponse askResponseWithRichInput(SpeechResponse message); static RootResponse askResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata ); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts ); static RootResponse askResponse(String message, String conversationToken, String[] noInputPrompts); static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions); static RootResponse askForPermissionResponse(String permissionContext, String... permissions); static RootResponse askForPermissionResponse(String permissionContext, Collection<String> permissions); }
ResponseBuilder { public static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions) { List<String> permissionsStr = new ArrayList<>(); for (SupportedPermissions permission : permissions) { permissionsStr.add(permission.name()); } return askForPermissionResponse(permissionContext, permissionsStr); }  static RootResponse tellResponse(String message); static RootResponse tellResponse(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(String message); static RootResponse askResponse(SpeechResponse message); static RootResponse askResponse(String message, String[] noInputPrompts); static RootResponse askResponseWithRichInput(SpeechResponse message); static RootResponse askResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata ); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts ); static RootResponse askResponse(String message, String conversationToken, String[] noInputPrompts); static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions); static RootResponse askForPermissionResponse(String permissionContext, String... permissions); static RootResponse askForPermissionResponse(String permissionContext, Collection<String> permissions);  }