text:
<?xml version="1.0" encoding="utf-8"?>
<resources name="en" flag="gb" title="English">
    <string name="_bx_orgs"><![CDATA[Organizations]]></string>
    <string name="_bx_organizations"><![CDATA[Organizations]]></string>
    <string name="_bx_orgs_cmts"><![CDATA[Organizations' Comments]]></string>

    <string name="_bx_orgs_option_autoapproval"><![CDATA[Organization moderation]]></string>
    <string name="_bx_orgs_option_default_acl_level"><![CDATA[Default level to assign after organizations's profile creation]]></string>
    <string name="_bx_orgs_option_enable_profile_activation_letter"><![CDATA[Enable profile activation letter]]></string>
    <string name="_bx_orgs_option_redirect_aadd"><![CDATA[Redirect after organizations's profile creation to]]></string>
    <string name="_bx_orgs_option_redirect_aadd_profile"><![CDATA[Profile Page]]></string>
    <string name="_bx_orgs_option_redirect_aadd_last"><![CDATA[Last Page]]></string>
    <string name="_bx_orgs_option_redirect_aadd_custom"><![CDATA[Custom Page]]></string>
    <string name="_bx_orgs_option_redirect_aadd_custom_url"><![CDATA[URL for 'Custom Page' redirect]]></string>
    <string name="_bx_orgs_option_activation_on"><![CDATA[Auto-activate after creation & editing]]></string>
    <string name="_bx_orgs_option_activation_add"><![CDATA[Manually activate after editing, auto-activate after creation]]></string>
    <string name="_bx_orgs_option_activation_edit"><![CDATA[Manually activate after creating, auto-activate after editing]]></string>
    <string name="_bx_orgs_option_activation_off"><![CDATA[Activate manually after creation & editing]]></string>
    <string name="_bx_orgs_option_num_connections_quick"><![CDATA[Number of items in friends block]]></string>
    <string name="_bx_orgs_option_per_page_browse"><![CDATA[Number of items per page]]></string>
    <string name="_bx_orgs_option_num_rss"><![CDATA[Number of items in RSS feed]]></string>
    <string name="_bx_orgs_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
    <string name="_bx_orgs_option_members_mode"><![CDATA[Special mode for organization members]]></string>
    <string name="_bx_orgs_option_members_mode_multi_roles"><![CDATA[Multi Roles]]></string>
    <string name="_bx_orgs_option_public_subscriptions"><![CDATA[Public following list]]></string>
    <string name="_bx_orgs_option_public_subscribed_me"><![CDATA[Public followers list]]></string>
    <string name="_bx_orgs_option_auto_activation_for_categories"><![CDATA[Auto-Activation For Categories]]></string>
    <string name="_bx_orgs_option_per_page_for_favorites_lists"><![CDATA[Number of favorite lists per page]]></string>
    <string name="_bx_orgs_option_internal_notifications"><![CDATA[Use internal notifications]]></string>

    <string name="_bx_orgs_form_profile"><![CDATA[Organizations]]></string>
    <string name="_bx_orgs_form_profile_display_add"><![CDATA[Add Organization]]></string>
    <string name="_bx_orgs_form_profile_display_edit"><![CDATA[Edit Organization]]></string>
    <string name="_bx_orgs_form_profile_display_edit_cover"><![CDATA[Edit Cover]]></string>
    <string name="_bx_orgs_form_profile_display_delete"><![CDATA[Delete Organization]]></string>
    <string name="_bx_orgs_form_profile_display_view"><![CDATA[View Organization]]></string>
    <string name="_bx_orgs_form_profile_display_view_full"><![CDATA[Full View Organization]]></string>
    <string name="_bx_orgs_form_profile_display_invite"><![CDATA[Invite to Organization]]></string>
    <string name="_bx_orgs_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
    <string name="_bx_orgs_form_profile_input_sys_join_confirm"><![CDATA[Join confirmation]]></string>
    <string name="_bx_orgs_form_profile_input_join_confirm"><![CDATA[Join confirmation]]></string>
    <string name="_bx_orgs_form_profile_input_sys_allow_view_to"><![CDATA[Visible to]]></string>
    <string name="_bx_orgs_form_profile_input_allow_view_to"><![CDATA[Visible to]]></string>
    <string name="_bx_orgs_form_entry_input_allow_view_favorite_list"><![CDATA[Visibility]]></string>
    <string name="_bx_orgs_form_profile_input_allow_view_to_info"><![CDATA[Closed - anyone can find the organization and see who's in it, only members can see posts. Secret - only members can find the organization and see posts.]]></string>
    <string name="_bx_orgs_form_profile_input_allow_view_notification_to"><![CDATA[Show notifications to]]></string>
    <string name="_bx_orgs_form_profile_input_sys_allow_post_to"><![CDATA[Who can post to my profile]]></string>
    <string name="_bx_orgs_form_profile_input_allow_post_to"><![CDATA[Who can post to my profile]]></string>
    <string name="_bx_orgs_form_profile_input_sys_allow_contact_to"><![CDATA[Who can contact me]]></string>
    <string name="_bx_orgs_form_profile_input_allow_contact_to"><![CDATA[Who can contact me]]></string>
    <string name="_bx_orgs_form_profile_input_sys_initial_members"><![CDATA[Invite Members]]></string>
    <string name="_bx_orgs_form_profile_input_initial_members"><![CDATA[Invite Members]]></string>
    <string name="_bx_orgs_form_profile_input_sys_org_name"><![CDATA[Organization Name]]></string>
    <string name="_bx_orgs_form_profile_input_org_name"><![CDATA[Organization Name]]></string>
    <string name="_bx_orgs_form_profile_input_org_name_err"><![CDATA[Profile name is mandatory and and cannot start with @]]></string>
    <string name="_bx_orgs_form_profile_input_sys_org_desc"><![CDATA[Description]]></string>
    <string name="_bx_orgs_form_profile_input_org_desc"><![CDATA[Description]]></string>
    <string name="_bx_orgs_form_profile_input_sys_org_cat"><![CDATA[Category]]></string>
    <string name="_bx_orgs_form_profile_input_org_cat"><![CDATA[Category]]></string>
    <string name="_bx_orgs_form_profile_input_org_cat_err"><![CDATA[Category field is mandatory]]></string>
    <string name="_bx_orgs_form_entry_input_sys_multicat"><![CDATA[Categories]]></string>
    <string name="_bx_orgs_form_entry_input_multicat"><![CDATA[Categories]]></string>
    <string name="_bx_orgs_form_entry_input_multicat_err"><![CDATA[Please select category]]></string>
    <string name="_bx_orgs_form_profile_input_sys_picture"><![CDATA[Profile Picture]]></string>
    <string name="_bx_orgs_form_profile_input_picture"><![CDATA[Upload a profile picture]]></string>
    <string name="_bx_orgs_form_profile_input_picture_err"><![CDATA[Profile picture is mandatory.]]></string>
    <string name="_bx_orgs_form_profile_input_picture_search"><![CDATA[With photo]]></string>
    <string name="_bx_orgs_form_profile_input_online_search"><![CDATA[Online only]]></string>
    <string name="_bx_orgs_form_profile_input_sys_cover"><![CDATA[Cover Picture]]></string>
    <string name="_bx_orgs_form_profile_input_cover"><![CDATA[Upload New Cover Picture]]></string>
    <string name="_bx_orgs_form_profile_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
    <string name="_bx_orgs_form_profile_input_delete_confirm"><![CDATA[I am sure I want to delete this profile]]></string>
    <string name="_bx_orgs_form_profile_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
    <string name="_bx_orgs_form_profile_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete your profile.]]></string>
    <string name="_bx_orgs_form_profile_input_sys_profile_email"><![CDATA[Email]]></string>
    <string name="_bx_orgs_form_profile_input_profile_email"><![CDATA[Email]]></string>
    <string name="_bx_orgs_form_profile_input_sys_profile_status"><![CDATA[Status]]></string>
    <string name="_bx_orgs_form_profile_input_profile_status"><![CDATA[Status]]></string>
    <string name="_bx_orgs_form_profile_input_sys_profile_ip"><![CDATA[IP]]></string>
    <string name="_bx_orgs_form_profile_input_profile_ip"><![CDATA[IP]]></string>
    <string name="_bx_orgs_form_profile_input_sys_date_added"><![CDATA[Added]]></string>
    <string name="_bx_orgs_form_profile_input_date_added"><![CDATA[Added]]></string>
    <string name="_bx_orgs_form_profile_input_sys_date_changed"><![CDATA[Updated]]></string>
    <string name="_bx_orgs_form_profile_input_date_changed"><![CDATA[Updated]]></string>
    <string name="_bx_orgs_form_profile_input_sys_friends_count"><![CDATA[Friends count]]></string>
    <string name="_bx_orgs_form_profile_input_friends_count"><![CDATA[Friends count]]></string>
    <string name="_bx_orgs_form_profile_input_sys_followers_count"><![CDATA[Followers count]]></string>
    <string name="_bx_orgs_form_profile_input_followers_count"><![CDATA[Followers count]]></string>

	<string name="_bx_orgs_acl_action_create_profile"><![CDATA[Create Organization's Profile]]></string>
	<string name="_bx_orgs_acl_action_delete_profile"><![CDATA[Delete Organization's Profile]]></string>
	<string name="_bx_orgs_acl_action_view_profile"><![CDATA[View Organization's Profile]]></string>
	<string name="_bx_orgs_acl_action_edit_any_profile"><![CDATA[Edit Any Organization's Profile]]></string>

	<string name="_bx_orgs_page_title_sys_create_profile"><![CDATA[Create a Profile - Organization]]></string>
	<string name="_bx_orgs_page_title_create_profile"><![CDATA[Create a Profile - Organization]]></string>
	<string name="_bx_orgs_page_title_sys_edit_profile"><![CDATA[Edit Profile]]></string>
	<string name="_bx_orgs_page_title_edit_profile"><![CDATA[Edit Profile]]></string>
	<string name="_bx_orgs_page_title_sys_edit_profile_cover"><![CDATA[Edit Profile Cover]]></string>
	<string name="_bx_orgs_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
	<string name="_bx_orgs_page_title_sys_delete_profile"><![CDATA[Delete Profile]]></string>
	<string name="_bx_orgs_page_title_delete_profile"><![CDATA[Delete Profile]]></string>
	<string name="_bx_orgs_page_title_sys_view_profile"><![CDATA[View Profile]]></string>
	<string name="_bx_orgs_page_title_sys_view_profile_closed"><![CDATA[View Profile with Limited Visibility]]></string>
	<string name="_bx_orgs_page_title_view_profile"><![CDATA[{display_name}]]></string>
	<string name="_bx_orgs_page_title_browse"><![CDATA[Organizations]]></string>
	<string name="_bx_orgs_page_title_browse_by_author"><![CDATA[Organizations of {display_name}]]></string>
	<string name="_bx_orgs_page_title_browse_featured"><![CDATA[Featured Organizations]]></string>
	<string name="_bx_orgs_page_title_browse_active"><![CDATA[Active Organizations]]></string>
	<string name="_bx_orgs_page_title_browse_online"><![CDATA[Online Organizations]]></string>
	<string name="_bx_orgs_page_title_browse_recent"><![CDATA[New Organizations]]></string>
	<string name="_bx_orgs_page_title_browse_connections"><![CDATA[{0} connections]]></string>
	<string name="_bx_orgs_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
	<string name="_bx_orgs_page_title_browse_favorites"><![CDATA[{0} favorites]]></string>
	<string name="_bx_orgs_page_title_browse_by_acl"><![CDATA[{0} Organizations]]></string>
	<string name="_bx_orgs_page_title_browse_by_cmts"><![CDATA[Organizations' Comments]]></string>
	<string name="_bx_orgs_page_title_sys_profile_favorites"><![CDATA[Favorite Organizations]]></string>
	<string name="_bx_orgs_page_title_profile_favorites"><![CDATA[Favorite Organizations]]></string>
	<string name="_bx_orgs_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
	<string name="_bx_orgs_page_title_profile_friends"><![CDATA[Friends]]></string>
	<string name="_bx_orgs_page_title_sys_friend_requests"><![CDATA[Friend Requests]]></string>
    <string name="_bx_orgs_page_title_friend_requests"><![CDATA[Friend Requests]]></string>
	<string name="_bx_orgs_page_title_sys_profile_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_page_title_profile_subscriptions"><![CDATA[Following & Followers]]></string>
    <string name="_bx_orgs_page_title_sys_profile_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_page_title_profile_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_page_title_sys_fans"><![CDATA[Members]]></string>
    <string name="_bx_orgs_page_title_fans"><![CDATA[Members]]></string>
    <string name="_bx_orgs_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
    <string name="_bx_orgs_page_title_profile_comments"><![CDATA[Comments]]></string>
	<string name="_bx_orgs_page_title_sys_profile_info"><![CDATA[Profile Info]]></string>
	<string name="_bx_orgs_page_title_profile_info"><![CDATA[Info about {display_name}]]></string>
	<string name="_bx_orgs_page_title_sys_recent"><![CDATA[New Organizations]]></string>
	<string name="_bx_orgs_page_title_recent"><![CDATA[New Organizations]]></string>
	<string name="_bx_orgs_page_title_sys_manage"><![CDATA[Manage Own Organizations]]></string>
	<string name="_bx_orgs_page_title_sys_manage_administration"><![CDATA[Manage All Organizations]]></string>
	<string name="_bx_orgs_page_title_manage"><![CDATA[Manage Organizations]]></string>
	<string name="_bx_orgs_page_title_sys_active"><![CDATA[Active Organizations]]></string>
	<string name="_bx_orgs_page_title_active"><![CDATA[Active Organizations]]></string>
	<string name="_bx_orgs_page_title_sys_online"><![CDATA[Online Organizations]]></string>
	<string name="_bx_orgs_page_title_online"><![CDATA[Online Organizations]]></string>
	<string name="_bx_orgs_page_title_sys_invite_to_organization"><![CDATA[Invite Members to the Organization]]></string>
    <string name="_bx_orgs_page_title_invite_to_organization"><![CDATA[Invite Members to the Organization]]></string>
	<string name="_bx_orgs_page_title_sys_entries_search"><![CDATA[Search]]></string>
    <string name="_bx_orgs_page_title_entries_search"><![CDATA[Search]]></string>
    <string name="_bx_orgs_page_title_sys_entries_favorites"><![CDATA[Favorives Organizations]]></string>
    <string name="_bx_orgs_page_title_entries_favorites"><![CDATA[Favorives Organizations]]></string>
    <string name="_bx_orgs_page_title_sys_joined_entries"><![CDATA[Joined Organizations]]></string>
    <string name="_bx_orgs_page_title_joined_entries"><![CDATA[Joined Organizations]]></string>

    <string name="_bx_orgs_page_block_title_profile_private"><![CDATA[Private Profile]]></string>
    <string name="_bx_orgs_page_block_title_choose_type"><![CDATA[Choose Profile Type]]></string>
	<string name="_bx_orgs_page_block_title_create_profile"><![CDATA[Create a Profile - Organization]]></string>
	<string name="_bx_orgs_page_block_title_edit_profile"><![CDATA[Edit Profile]]></string>
	<string name="_bx_orgs_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
	<string name="_bx_orgs_page_block_title_delete_profile"><![CDATA[Delete Profile]]></string>
	<string name="_bx_orgs_page_block_title_profile_all_actions"><![CDATA[All Actions]]></string>
	<string name="_bx_orgs_page_block_title_profile_info_link"><![CDATA[About {display_name}]]></string>
	<string name="_bx_orgs_page_block_title_profile_info"><![CDATA[Info]]></string>
	<string name="_bx_orgs_page_block_title_system_profile_info"><![CDATA[Info]]></string>
	<string name="_bx_orgs_page_block_title_profile_membership"><![CDATA[Membership]]></string>
	<string name="_bx_orgs_page_block_title_system_profile_membership"><![CDATA[Membership]]></string>
	<string name="_bx_orgs_page_block_title_profile_description"><![CDATA[Description]]></string>
	<string name="_bx_orgs_page_block_title_profile_favorites"><![CDATA[Favorite Organizations]]></string>
	<string name="_bx_orgs_page_block_title_system_profile_favorites"><![CDATA[Favorite Organizations]]></string>
	<string name="_bx_orgs_page_block_title_profile_friends_link"><![CDATA[Friends of {display_name}]]></string>
	<string name="_bx_orgs_page_block_title_profile_friends"><![CDATA[Friends]]></string>
	<string name="_bx_orgs_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
	<string name="_bx_orgs_page_block_title_friend_requests_link"><![CDATA[Friend Requests for {display_name}]]></string>
    <string name="_bx_orgs_page_block_title_system_friend_requests"><![CDATA[Friend Requests]]></string>
    <string name="_bx_orgs_page_block_title_admins"><![CDATA[Administrators]]></string>
    <string name="_bx_orgs_page_block_title_fans_link"><![CDATA[Members of {display_name}]]></string>
    <string name="_bx_orgs_page_block_title_fans"><![CDATA[Members]]></string>
    <string name="_bx_orgs_page_block_title_system_fans"><![CDATA[Members]]></string>
	<string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Location]]></string>
	<string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_page_block_title_profile_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_page_block_title_system_profile_subscribed_me"><![CDATA[Followers]]></string>
    <string name="_bx_orgs_page_block_title_profile_subscribed_me"><![CDATA[Followers]]></string>
    <string name="_bx_orgs_page_block_title_system_profile_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_page_block_title_profile_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_page_block_title_system_profile_related_me"><![CDATA[Relationships with Me]]></string>
    <string name="_bx_orgs_page_block_title_profile_related_me"><![CDATA[Relationships with Me]]></string>
    <string name="_bx_orgs_page_block_title_profile_comments"><![CDATA[Comments]]></string>
    <string name="_bx_orgs_page_block_title_profile_comments_link"><![CDATA[Comments to {title}]]></string>
    <string name="_bx_orgs_page_block_title_profile_actions"><![CDATA[Actions]]></string>
    <string name="_bx_orgs_page_block_title_featured_profiles"><![CDATA[Featured Organizations]]></string>
    <string name="_bx_orgs_page_block_title_latest_profiles"><![CDATA[New Organizations]]></string>
    <string name="_bx_orgs_page_block_title_system_manage"><![CDATA[Manage Own Organizations]]></string>
    <string name="_bx_orgs_page_block_title_system_manage_administration"><![CDATA[Manage All Organizations]]></string>
    <string name="_bx_orgs_page_block_title_manage"><![CDATA[Manage Organizations]]></string>
    <string name="_bx_orgs_page_block_title_sys_active_profiles"><![CDATA[Active Organizations]]></string>
    <string name="_bx_orgs_page_block_title_sys_multicats"><![CDATA[Organizations Categories(Multi)]]></string>
    <string name="_bx_orgs_page_block_title_multicats"><![CDATA[Organizations Categories]]></string>
    <string name="_bx_orgs_page_block_title_active_profiles"><![CDATA[Active Organizations]]></string>
    <string name="_bx_orgs_page_block_title_online_profiles"><![CDATA[Online Organizations]]></string>
    <string name="_bx_orgs_page_block_title_categories"><![CDATA[Organization categories]]></string>
    <string name="_bx_orgs_page_block_title_invite_to_organization"><![CDATA[Invite Members to the Organization]]></string>
    <string name="_bx_orgs_page_block_title_search_form"><![CDATA[Search Form]]></string>
    <string name="_bx_orgs_page_block_title_search_results"><![CDATA[Search Results]]></string>
    <string name="_bx_orgs_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
    <string name="_bx_orgs_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
    <string name="_bx_orgs_page_block_title_favorites_of_author"><![CDATA[Favorite Organizations]]></string>
    <string name="_bx_orgs_page_block_title_sys_favorites_of_author"><![CDATA[Favorite Organizations]]></string>
    <string name="_bx_orgs_page_block_title_favorites_entries"><![CDATA["{title}" List]]></string>
    <string name="_bx_orgs_page_block_title_favorites_entries_info"><![CDATA[Info]]></string>
    <string name="_bx_orgs_page_block_title_favorites_entries_actions"><![CDATA[Favorites List Actions]]></string>
    <string name="_bx_orgs_page_block_title_sys_joined_entries"><![CDATA[Joined Organizations]]></string>
    <string name="_bx_orgs_page_block_title_joined_entries"><![CDATA[Joined Organizations]]></string>
    <string name="_bx_orgs_page_block_title_sys_entries_actions"><![CDATA[Organizations actions]]></string>
    <string name="_bx_orgs_page_block_title_entries_actions"><![CDATA[Organizations actions]]></string>
    <string name="_bx_orgs_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Organizations (Showcase View)]]></string>
    <string name="_bx_orgs_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Organizations]]></string>
    <string name="_bx_orgs_page_block_title_sys_recommended_entries_view_showcase"><![CDATA[Recommended Organizations (Showcase View)]]></string>
    <string name="_bx_orgs_page_block_title_recommended_entries_view_showcase"><![CDATA[Recommended Organizations]]></string>
    <string name="_bx_orgs_page_block_title_sys_active_entries_view_showcase"><![CDATA[Active Organizations (Showcase View)]]></string>
    <string name="_bx_orgs_page_block_title_active_entries_view_showcase"><![CDATA[Active Organizations]]></string>

    <string name="_bx_orgs_menu_title_submenu"><![CDATA[Organizations Submenu]]></string>
    <string name="_bx_orgs_menu_set_title_submenu"><![CDATA[Organizations Submenu]]></string>
    <string name="_bx_orgs_menu_set_title_view_profile_actions"><![CDATA[Organization Actions]]></string>
    <string name="_bx_orgs_menu_title_view_profile_actions"><![CDATA[Organization Actions]]></string>
    <string name="_bx_orgs_menu_set_title_view_profile_actions_more"><![CDATA[Organization More Actions]]></string>
    <string name="_bx_orgs_menu_title_view_profile_actions_more"><![CDATA[Organization More Actions]]></string>
    <string name="_bx_orgs_menu_set_title_view_profile_submenu"><![CDATA[View Organization Submenu]]></string>
    <string name="_bx_orgs_menu_title_view_profile_submenu"><![CDATA[View Organization Submenu]]></string>
    <string name="_bx_orgs_menu_title_view_profile_submenu_cover"><![CDATA[Organization Cover Submenu]]></string>
    <string name="_bx_orgs_menu_title_entries_my"><![CDATA[Profile Organizations Action Menu]]></string>
    <string name="_bx_orgs_menu_set_title_entries_my"><![CDATA[Profile Organizations Menu]]></string>
	<string name="_bx_orgs_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
    <string name="_bx_orgs_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
    <string name="_bx_orgs_menu_item_title_system_delete"><![CDATA[Delete]]></string>
    <string name="_bx_orgs_menu_item_title_delete"><![CDATA[Delete]]></string>
    <string name="_bx_orgs_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
    <string name="_bx_orgs_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
    <string name="_bx_orgs_menu_item_title_system_clear_reports"><![CDATA[Clear reports]]></string>
    <string name="_bx_orgs_menu_item_title_clear_reports"><![CDATA[Clear reports]]></string>
    <string name="_bx_orgs_menu_item_title_system_edit_cover"><![CDATA[Edit Cover]]></string>
    <string name="_bx_orgs_menu_item_title_edit_cover"><![CDATA[Edit Cover]]></string>
    <string name="_bx_orgs_menu_item_title_system_edit_profile"><![CDATA[Edit Organization]]></string>
    <string name="_bx_orgs_menu_item_title_edit_profile"><![CDATA[Edit Profile]]></string>
    <string name="_bx_orgs_menu_item_title_system_delete_profile"><![CDATA[Delete Organization]]></string>
    <string name="_bx_orgs_menu_item_title_delete_profile"><![CDATA[Delete Profile]]></string>
    <string name="_bx_orgs_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>
    <string name="_bx_orgs_menu_item_title_delete_account"><![CDATA[Delete Account]]></string>
    <string name="_bx_orgs_menu_item_title_system_delete_account_content"><![CDATA[Delete Account with Content]]></string>
    <string name="_bx_orgs_menu_item_title_delete_account_content"><![CDATA[Delete Account with Content]]></string>
    <string name="_bx_orgs_menu_item_title_system_profile_type"><![CDATA[Organization]]></string>
    <string name="_bx_orgs_menu_item_title_profile_type"><![CDATA[Organization]]></string>
    <string name="_bx_orgs_menu_item_title_system_create_profile"><![CDATA[Organization]]></string>
    <string name="_bx_orgs_menu_item_title_create_profile"><![CDATA[Organization]]></string>
    <string name="_bx_orgs_menu_item_title_system_new_profile"><![CDATA[New Organization]]></string>
    <string name="_bx_orgs_menu_item_title_new_profile"><![CDATA[New Organization]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_fans"><![CDATA[Members]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_fans"><![CDATA[Members]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_friends"><![CDATA[Friends]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_friends"><![CDATA[Friends]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_comments"><![CDATA[Comments]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_comments"><![CDATA[Comments]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_info"><![CDATA[Info]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_info"><![CDATA[Info]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_view"><![CDATA[Organization]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_view"><![CDATA[Organization]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_profile_more_auto"><![CDATA[More]]></string>
    <string name="_bx_orgs_menu_item_title_view_profile_more_auto"><![CDATA[More]]></string>
    <string name="_bx_orgs_menu_item_title_system_view_joined_groups"><![CDATA[Organizations]]></string>
    <string name="_bx_orgs_menu_item_title_view_joined_groups"><![CDATA[Organizations]]></string>
    <string name="_bx_orgs_menu_item_title_system_invite"><![CDATA[Invite]]></string>
    <string name="_bx_orgs_menu_item_title_invite"><![CDATA[Invite]]></string>
    <string name="_bx_orgs_menu_item_title_system_befriend"><![CDATA[Add friend]]></string>
    <string name="_bx_orgs_menu_item_title_befriend"><![CDATA[Add friend]]></string>
    <string name="_bx_orgs_menu_item_title_befriend_sent"><![CDATA[Add friend (requested)]]></string>
    <string name="_bx_orgs_menu_item_title_befriend_confirm"><![CDATA[Accept friend request]]></string>
    <string name="_bx_orgs_menu_item_title_system_unfriend"><![CDATA[Unfriend]]></string>
    <string name="_bx_orgs_menu_item_title_unfriend"><![CDATA[Unfriend]]></string>
    <string name="_bx_orgs_menu_item_title_unfriend_cancel_request"><![CDATA[Cancel friend request]]></string>
    <string name="_bx_orgs_menu_item_title_unfriend_reject_request"><![CDATA[Reject friend request]]></string>
    <string name="_bx_orgs_menu_item_title_system_become_fan"><![CDATA[Join Organization]]></string>
    <string name="_bx_orgs_menu_item_title_become_fan"><![CDATA[Join Organization]]></string>
    <string name="_bx_orgs_menu_item_title_become_fan_sent"><![CDATA[Join Organization (requested)]]></string>
    <string name="_bx_orgs_menu_item_title_become_fan_confirm"><![CDATA[Accept Request]]></string>
    <string name="_bx_orgs_menu_item_title_system_leave_organization"><![CDATA[Leave Organization]]></string>
    <string name="_bx_orgs_menu_item_title_leave_organization"><![CDATA[Leave Organization]]></string>
    <string name="_bx_orgs_menu_item_title_leave_organization_cancel_request"><![CDATA[Cancel Request]]></string>
    <string name="_bx_orgs_menu_item_title_leave_organization_reject_request"><![CDATA[Reject Request]]></string>
    <string name="_bx_orgs_menu_item_title_system_subscribe"><![CDATA[Follow]]></string>
    <string name="_bx_orgs_menu_item_title_subscribe"><![CDATA[Follow]]></string>
    <string name="_bx_orgs_menu_item_title_system_unsubscribe"><![CDATA[Unfollow]]></string>
    <string name="_bx_orgs_menu_item_title_unsubscribe"><![CDATA[Unfollow]]></string>
    <string name="_bx_orgs_menu_item_title_system_relation_add"><![CDATA[Add Relationship]]></string>
    <string name="_bx_orgs_menu_item_title_relation_add"><![CDATA[Add Relationship]]></string>
    <string name="_bx_orgs_menu_item_title_system_relation_delete"><![CDATA[Remove Relationship]]></string>
    <string name="_bx_orgs_menu_item_title_relation_delete"><![CDATA[Remove Relationship]]></string>
    <string name="_bx_orgs_menu_item_title_system_more_actions"><![CDATA[More Actions]]></string>
    <string name="_bx_orgs_menu_item_title_more_actions"><![CDATA[]]></string>
    <string name="_bx_orgs_menu_item_title_system_friends"><![CDATA[Friends]]></string>
    <string name="_bx_orgs_menu_item_title_friends"><![CDATA[Friends]]></string>
    <string name="_bx_orgs_menu_item_title_system_friend_requests"><![CDATA[Friend requests number]]></string>
    <string name="_bx_orgs_menu_item_title_friend_requests"><![CDATA[Friend requests]]></string>
    <string name="_bx_orgs_menu_item_title_system_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_menu_item_title_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_menu_item_title_system_manage_my_organizations"><![CDATA[My organizations]]></string>
    <string name="_bx_orgs_menu_item_title_manage_my_organizations"><![CDATA[Organizations]]></string>
    <string name="_bx_orgs_menu_item_title_system_favorites"><![CDATA[Favorite Organizations]]></string>
    <string name="_bx_orgs_menu_item_title_favorites"><![CDATA[Favorite organizations]]></string>
    <string name="_bx_orgs_menu_item_title_system_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_menu_item_title_subscriptions"><![CDATA[Following]]></string>
    <string name="_bx_orgs_menu_item_title_system_subscribed_me"><![CDATA[Followers]]></string>
    <string name="_bx_orgs_menu_item_title_subscribed_me"><![CDATA[Followers]]></string>
    <string name="_bx_orgs_menu_item_title_system_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_menu_item_title_relations"><![CDATA[Relationships]]></string>
    <string name="_bx_orgs_menu_item_title_system_related_me"><![CDATA[Relationships with Me]]></string>
    <string name="_bx_orgs_menu_item_title_related_me"><![CDATA[Relationships with Me]]></string>
    <string name="_bx_orgs_menu_item_title_system_entries_recent"><![CDATA[New]]></string>
    <string name="_bx_orgs_menu_item_title_entries_recent"><![CDATA[New]]></string>
    <string name="_bx_orgs_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
    <string name="_bx_orgs_menu_item_title_entries_search"><![CDATA[Search]]></string>
    <string name="_bx_orgs_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
    <string name="_bx_orgs_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
    <string name="_bx_orgs_menu_item_title_system_entries_home"><![CDATA[Orgs]]></string>
    <string name="_bx_orgs_menu_item_title_entries_home"><![CDATA[Orgs]]></string>
    <string name="_bx_orgs_menu_item_title_system_admt_organizations"><![CDATA[Organizations]]></string>
	<string name="_bx_orgs_menu_item_title_admt_organizations"><![CDATA[Organizations]]></string>
	<string name="_bx_orgs_menu_item_title_manage_my"><![CDATA[My Organizations]]></string>
	<string name="_bx_orgs_menu_item_title_manage_all"><![CDATA[All Organizations]]></string>
	<string name="_bx_orgs_menu_item_title_system_entries_active"><![CDATA[Active]]></string>
	<string name="_bx_orgs_menu_item_title_entries_active"><![CDATA[Active]]></string>
	<string name="_bx_orgs_menu_item_title_system_entries_online"><![CDATA[Online]]></string>
	<string name="_bx_orgs_menu_item_title_entries_online"><![CDATA[Online]]></string>

	<string name="_bx_orgs_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
	<string name="_bx_orgs_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
	<string name="_bx_orgs_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
	<string name="_bx_orgs_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
  <string name="_bx_orgs_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
	<string name="_bx_orgs_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>
	<string name="_bx_orgs_grid_column_title_adm_active"><![CDATA[Active]]></string>
    <string name="_bx_orgs_grid_column_title_adm_fullname"><![CDATA[Name]]></string>
    <string name="_bx_orgs_grid_column_title_adm_last_online"><![CDATA[Last Logged]]></string>
    <string name="_bx_orgs_grid_column_title_adm_account"><![CDATA[Account]]></string>
    <string name="_bx_orgs_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
    <string name="_bx_orgs_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
    <string name="_bx_orgs_grid_action_title_adm_clear_reports"><![CDATA[Clear reports]]></string>
    <string name="_bx_orgs_grid_action_title_adm_set_acl_level"><![CDATA[Set Membership]]></string>
    <string name="_bx_orgs_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
    <string name="_bx_orgs_grid_action_title_adm_audit_content"><![CDATA[Audit actions with profile]]></string>
    <string name="_bx_orgs_grid_action_title_adm_audit_profile"><![CDATA[Audit profile's actions]]></string>
    <string name="_bx_orgs_grid_action_err_delete"><![CDATA[Cannot delete the selected organization(s).]]></string>
    <string name="_bx_orgs_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>

    <string name="_bx_orgs_chart_growth"><![CDATA[Organizations: Growth]]></string>
    <string name="_bx_orgs_chart_growth_speed"><![CDATA[Organizations: Growth Speed]]></string>

    <string name="_bx_orgs_search_extended"><![CDATA[Organizations Search]]></string>
    <string name="_bx_orgs_search_extended_cmts"><![CDATA[Organizations Comments Search]]></string>

    <string name="_bx_orgs_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
    <string name="_bx_orgs_txt_account_pending_moderation"><![CDATA[This profile is pending approval.]]></string>
    <string name="_bx_orgs_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
    <string name="_bx_orgs_txt_account_suspended_moderation"><![CDATA[This profile is suspended.]]></string>

    <string name="_bx_orgs_pre_lists_cats"><![CDATA[Organization categories]]></string>
    <string name="_bx_orgs_cat_Agriculture"><![CDATA[Agriculture]]></string>
    <string name="_bx_orgs_cat_Financial"><![CDATA[Financial]]></string>
    <string name="_bx_orgs_cat_Biotech"><![CDATA[Biotech]]></string>
    <string name="_bx_orgs_cat_Cause"><![CDATA[Cause]]></string>
    <string name="_bx_orgs_cat_Chemical"><![CDATA[Chemical]]></string>
    <string name="_bx_orgs_cat_Religious"><![CDATA[Religious]]></string>
    <string name="_bx_orgs_cat_Community"><![CDATA[Community]]></string>
    <string name="_bx_orgs_cat_Company"><![CDATA[Company]]></string>
    <string name="_bx_orgs_cat_Entertainment"><![CDATA[Entertainment]]></string>
    <string name="_bx_orgs_cat_Technology"><![CDATA[Technology]]></string>
    <string name="_bx_orgs_cat_Consulting"><![CDATA[Consulting]]></string>
    <string name="_bx_orgs_cat_Education"><![CDATA[Education]]></string>
    <string name="_bx_orgs_cat_Energy"><![CDATA[Energy]]></string>
    <string name="_bx_orgs_cat_Engineering"><![CDATA[Engineering]]></string>
    <string name="_bx_orgs_cat_Food"><![CDATA[Food]]></string>
    <string name="_bx_orgs_cat_Government"><![CDATA[Government]]></string>
    <string name="_bx_orgs_cat_Health"><![CDATA[Health]]></string>
    <string name="_bx_orgs_cat_Medical"><![CDATA[Medical]]></string>
    <string name="_bx_orgs_cat_Industrial"><![CDATA[Industrial]]></string>
    <string name="_bx_orgs_cat_Insurance"><![CDATA[Insurance]]></string>
    <string name="_bx_orgs_cat_Internet"><![CDATA[Internet]]></string>
    <string name="_bx_orgs_cat_Software"><![CDATA[Software]]></string>
    <string name="_bx_orgs_cat_Legal"><![CDATA[Legal]]></string>
    <string name="_bx_orgs_cat_Media"><![CDATA[Media]]></string>
    <string name="_bx_orgs_cat_School"><![CDATA[School]]></string>
    <string name="_bx_orgs_cat_NGO"><![CDATA[NGO]]></string>
    <string name="_bx_orgs_cat_NPO"><![CDATA[NPO]]></string>
    <string name="_bx_orgs_cat_Political"><![CDATA[Political]]></string>
    <string name="_bx_orgs_cat_Retail"><![CDATA[Retail]]></string>
    <string name="_bx_orgs_cat_Small_Business"><![CDATA[Small Business]]></string>
    <string name="_bx_orgs_cat_Telecommunication"><![CDATA[Telecommunication]]></string>
    <string name="_bx_orgs_cat_Transport"><![CDATA[Transport]]></string>
    <string name="_bx_orgs_cat_Travel"><![CDATA[Travel]]></string>
    <string name="_bx_orgs_cat_University"><![CDATA[University]]></string>
    <string name="_bx_orgs_cat_Other"><![CDATA[Other]]></string>

    <string name="_bx_orgs_pre_lists_roles"><![CDATA[Organization roles]]></string>
    <string name="_bx_orgs_role_regular"><![CDATA[Regular]]></string>
    <string name="_bx_orgs_role_administrator"><![CDATA[Administrator]]></string>
    <string name="_bx_orgs_role_moderator"><![CDATA[Moderator]]></string>

    <string name="_bx_organizations_alert_action_fan_added"><![CDATA[member joined]]></string>
    <string name="_bx_organizations_alert_action_join_invitation_notif"><![CDATA[join invitation]]></string>
    <string name="_bx_organizations_alert_action_join_request"><![CDATA[join request]]></string>
    <string name="_bx_organizations_alert_action_profile_cover_changed"><![CDATA[cover changed]]></string>
    <string name="_bx_organizations_alert_action_profile_picture_changed"><![CDATA[picture changed]]></string>
    <string name="_bx_orgs_txt_ntfs_fan_added"><![CDATA[Organization {owner_name} has got a member {subentry_sample}]]></string>
    <string name="_bx_orgs_txt_ntfs_join_invitation"><![CDATA[{owner_name} organization's representative invites {subentry_sample} to join organization]]></string>
    <string name="_bx_orgs_txt_ntfs_join_request"><![CDATA[Organization {owner_name} has a join request from {subentry_sample}]]></string>
    <string name="_bx_orgs_txt_ntfs_timeline_post_common"><![CDATA[New post {subentry_sample} in {owner_name} organization timeline]]></string>

    <string name="_bx_orgs_txt_sample_single"><![CDATA[organization]]></string>
    <string name="_bx_orgs_txt_sample_comment_single"><![CDATA[comment to organization]]></string>
    <string name="_bx_orgs_txt_sample_vote_single"><![CDATA[vote to organization]]></string>
    <string name="_bx_orgs_txt_sample_score_up_single"><![CDATA[score up vote to organization]]></string>
    <string name="_bx_orgs_txt_sample_score_down_single"><![CDATA[score down vote to organization]]></string>
    <string name="_bx_orgs_txt_sample_pp_single"><![CDATA[profile picture]]></string>
    <string name="_bx_orgs_txt_sample_pp_single_with_article"><![CDATA[a profile picture]]></string>
    <string name="_bx_orgs_txt_sample_pc_single"><![CDATA[profile cover]]></string>
    <string name="_bx_orgs_txt_sample_pc_single_with_article"><![CDATA[a profile cover]]></string>
    <string name="_bx_orgs_txt_sample_pi_action"><![CDATA[changed {0}]]></string>
    <string name="_bx_orgs_txt_sample_pi_action_user"><![CDATA[{0} changed {1}]]></string>
    <string name="_bx_orgs_txt_N_friends"><![CDATA[{0} friends]]></string>
    <string name="_bx_orgs_txt_role"><![CDATA[Role]]></string>
    <string name="_bx_orgs_txt_set_role"><![CDATA[Set Role]]></string>
    <string name="_bx_orgs_txt_private_organization"><![CDATA[Private organization]]></string>
    <string name="_bx_orgs_ps_group_title_participants"><![CDATA[Employees]]></string>

    <string name="_bx_orgs_email_friend_request"><![CDATA[Friend request]]></string>
    <string name="_bx_orgs_email_friend_request_subject"><![CDATA[Friendship Request]]></string>
    <string name="_bx_orgs_email_friend_request_body"><![CDATA[{email_header}

{SenderDisplayName} wants to be friends with you. Respond.

{email_footer}]]></string>

    <string name="_bx_orgs_email_join_request"><![CDATA[Organization join request]]></string>
    <string name="_bx_orgs_email_join_request_subject"><![CDATA[Request to join your organization]]></string>
    <string name="_bx_orgs_email_join_request_body"><![CDATA[{email_header}

New request to join {EntryTitle} organization from {NewMemberDisplayName}

{email_footer}]]></string>

    <string name="_bx_orgs_email_join_reject"><![CDATA[Organization join request was rejected]]></string>
    <string name="_bx_orgs_email_join_reject_subject"><![CDATA[Request to join an organization was rejected]]></string>
    <string name="_bx_orgs_email_join_reject_body"><![CDATA[{email_header}

Your request to join {EntryTitle} organization was rejected by the organization admin.

{email_footer}]]></string>

    <string name="_bx_orgs_email_join_confirm"><![CDATA[Organization join request was confirmed]]></string>
    <string name="_bx_orgs_email_join_confirm_subject"><![CDATA[Your request to join an organization was confirmed]]></string>
    <string name="_bx_orgs_email_join_confirm_body"><![CDATA[{email_header}

Your request to join {EntryTitle} organization was confirmed by the organization admin.

{email_footer}]]></string>

    <string name="_bx_orgs_email_fan_remove"><![CDATA[Profile was removed from organization members]]></string>
    <string name="_bx_orgs_email_fan_remove_subject"><![CDATA[Your profile was removed from the organization]]></string>
    <string name="_bx_orgs_email_fan_remove_body"><![CDATA[{email_header}

Your profile was removed from {EntryTitle} organization by the organization admin.

{email_footer}]]></string>

    <string name="_bx_orgs_email_fan_become_admin"><![CDATA[Organization admin status was granted]]></string>
    <string name="_bx_orgs_email_fan_become_admin_subject"><![CDATA[You are an organization admin now]]></string>
    <string name="_bx_orgs_email_fan_become_admin_body"><![CDATA[{email_header}

You are an admin of {EntryTitle} organization now.

{email_footer}]]></string>

    <string name="_bx_orgs_email_admin_become_fan"><![CDATA[Organization admin status was revoked]]></string>
    <string name="_bx_orgs_email_admin_become_fan_subject"><![CDATA[Your organization admin status was revoked]]></string>
    <string name="_bx_orgs_email_admin_become_fan_body"><![CDATA[{email_header}

Your admin status was revoked from {EntryTitle} organization.

{email_footer}]]></string>

    <string name="_bx_orgs_email_set_role"><![CDATA[Organization member status was changed]]></string>
    <string name="_bx_orgs_email_set_role_subject"><![CDATA[Your organization status was changed]]></string>
    <string name="_bx_orgs_email_set_role_body"><![CDATA[{email_header}

Your status in {EntryTitle} organization was changed to {Role}.

{email_footer}]]></string>

    <string name="_bx_orgs_email_invitation"><![CDATA[Invitation to organization]]></string>
    <string name="_bx_orgs_email_invitation_subject"><![CDATA[Invitation to "{EntryTitle}" organization]]></string>
    <string name="_bx_orgs_email_invitation_body"><![CDATA[{email_header}

{InviterDisplayName} invited you to {EntryTitle} organization.

{email_footer}]]></string>
</resources>


text:
const {ConnectionConfig, ReaderConfig} = require('../lib/config')

describe('ConnectionConfig', () => {
  let config = null

  beforeEach(() => {
    config = new ConnectionConfig()
  })

  it('should use all defaults if nothing is provided', () => {
    config.maxInFlight.should.eql(1)
  })

  it('should validate with defaults', () => {
    const check = () => config.validate()
    check.should.not.throw()
  })

  it('should remove an unrecognized option', () => {
    config = new ConnectionConfig({unknownOption: 20})
    config.should.not.have.property('unknownOption')
  })

  describe('isNonEmptyString', () => {
    it('should correctly validate a non-empty string', () => {
      const check = () => config.isNonEmptyString('name', 'worker')
      check.should.not.throw()
    })

    it('should throw on an empty string', () => {
      const check = () => config.isNonEmptyString('name', '')
      check.should.throw()
    })

    it('should throw on a non-string', () => {
      const check = () => config.isNonEmptyString('name', {})
      check.should.throw()
    })
  })

  describe('isNumber', () => {
    it('should validate with a value equal to the lower bound', () => {
      const check = () => config.isNumber('maxInFlight', 1, 1)
      check.should.not.throw()
    })

    it('should validate with a value between the lower and upper bound', () => {
      const check = () => config.isNumber('maxInFlight', 5, 1, 10)
      check.should.not.throw()
    })

    it('should validate with a value equal to the upper bound', () => {
      const check = () => config.isNumber('maxInFlight', 10, 1, 10)
      check.should.not.throw()
    })

    it('should not validate with a value less than the lower bound', () => {
      const check = () => config.isNumber('maxInFlight', -1, 1)
      check.should.throw()
    })

    it('should not validate with a value greater than the upper bound', () => {
      const check = () => config.isNumber('maxInFlight', 11, 1, 10)
      check.should.throw()
    })

    it('should not validate against a non-number', () => {
      const check = () => config.isNumber('maxInFlight', null, 0)
      check.should.throw()
    })
  })

  describe('isNumberExclusive', () => {
    it('should not validate with a value equal to the lower bound', () => {
      const check = () => config.isNumberExclusive('maxInFlight', 1, 1)
      check.should.throw()
    })

    it('should validate with a value between the lower and upper bound', () => {
      const check = () => config.isNumberExclusive('maxInFlight', 5, 1, 10)
      check.should.not.throw()
    })

    it('should not validate with a value equal to the upper bound', () => {
      const check = () => config.isNumberExclusive('maxInFlight', 10, 1, 10)
      check.should.throw()
    })

    it('should not validate with a value less than the lower bound', () => {
      const check = () => config.isNumberExclusive('maxInFlight', -1, 1)
      check.should.throw()
    })

    it('should not validate with a value greater than the upper bound', () => {
      const check = () => config.isNumberExclusive('maxInFlight', 11, 1, 10)
      check.should.throw()
    })

    it('should not validate against a non-number', () => {
      const check = () => config.isNumberExclusive('maxInFlight', null, 0)
      check.should.throw()
    })
  })

  describe('isBoolean', () => {
    it('should validate against true', () => {
      const check = () => config.isBoolean('tls', true)
      check.should.not.throw()
    })

    it('should validate against false', () => {
      const check = () => config.isBoolean('tls', false)
      check.should.not.throw()
    })

    it('should not validate against null', () => {
      const check = () => config.isBoolean('tls', null)
      check.should.throw()
    })

    it('should not validate against a non-boolean value', () => {
      const check = () => config.isBoolean('tls', 'hi')
      check.should.throw()
    })
  })

  describe('isBuffer', () => {
    it('should require tls keys to be buffers', () => {
      const check = () => config.isBuffer('key', Buffer.from('a buffer'))
      check.should.not.throw()
    })

    it('should require tls keys to be buffers', () => {
      const check = () => config.isBuffer('key', 'not a buffer')
      check.should.throw()
    })

    it('should require tls certs to be buffers', () => {
      const check = () =>
        config.isBuffer('cert', Buffer.from('definitely a buffer'))
      check.should.not.throw()
    })

    it('should throw when a tls cert is not a buffer', () => {
      const check = () => config.isBuffer('cert', 'still not a buffer')
      check.should.throw()
    })
  })

  describe('isArray', () => {
    it('should require cert authority chains to be arrays', () => {
      const check = () => config.isArray('ca', ['cat', 'dog'])
      check.should.not.throw()
    })

    it('should require cert authority chains to be arrays', () => {
      const check = () => config.isArray('ca', 'not an array')
      check.should.throw()
    })
  })

  describe('isBareAddresses', () => {
    it('should validate against a validate address list of 1', () => {
      const check = () =>
        config.isBareAddresses('nsqdTCPAddresses', ['127.0.0.1:4150'])
      check.should.not.throw()
    })

    it('should validate against a validate ipv6 address list of 1', () => {
      const check = () =>
        config.isBareAddresses('nsqdTCPAddresses', ['[::1]:4150'])
      check.should.not.throw()
    })

    it('should validate against a validate address list of 2', () => {
      const check = () => {
        const addrs = ['127.0.0.1:4150', 'localhost:4150']
        config.isBareAddresses('nsqdTCPAddresses', addrs)
      }
      check.should.not.throw()
    })

    it('should validate against a validate ipv6 address list of 2', () => {
      const check = () =>
        config.isBareAddresses('nsqdTCPAddresses', ['[::1]:4150', '[::]:4150'])
      check.should.not.throw()
    })

    it('should not validate non-numeric port', () => {
      const check = () =>
        config.isBareAddresses('nsqdTCPAddresses', ['localhost'])
      check.should.throw()
    })

    it('should invalidate ipv6 address port', () => {
      const check = () =>
        config.isBareAddresses('nsqdTCPAddresses', ['[::1]'])
      check.should.throw()
    })
  })

  describe('isLookupdHTTPAddresses', () => {
    it('should validate against a validate address list of 1', () => {
      const check = () =>
        config.isLookupdHTTPAddresses('lookupdHTTPAddresses', [
          '127.0.0.1:4150',
        ])
      check.should.not.throw()
    })

    it('should validate against a validate address list of 2', () => {
      const check = () => {
        const addrs = [
          '127.0.0.1:4150',
          'localhost:4150',
          '[::1]:4150',
          '[::]:4150',
          'http://localhost/nsq/lookup',
          'https://localhost/nsq/lookup',
        ]
        config.isLookupdHTTPAddresses('lookupdHTTPAddresses', addrs)
      }
      check.should.not.throw()
    })

    it('should not validate non-numeric port', () => {
      const check = () =>
        config.isLookupdHTTPAddresses('lookupdHTTPAddresses', ['localhost'])
      check.should.throw()
    })

    it('should not validate non-HTTP/HTTPs address', () => {
      const check = () =>
        config.isLookupdHTTPAddresses('lookupdHTTPAddresses', ['localhost'])
      check.should.throw()
    })
  })
})

describe('ReaderConfig', () => {
  let config = null

  beforeEach(() => {
    config = new ReaderConfig()
  })

  it('should use all defaults if nothing is provided', () => {
    config.maxInFlight.should.eql(1)
  })

  it('should validate with defaults', () => {
    const check = () => {
      config = new ReaderConfig({nsqdTCPAddresses: ['127.0.0.1:4150']})
      config.validate()
    }
    check.should.not.throw()
  })

  it('should convert a string address to an array', () => {
    config = new ReaderConfig({lookupdHTTPAddresses: '127.0.0.1:4161'})
    config.validate()
    config.lookupdHTTPAddresses.length.should.equal(1)
  })
})

redpajama_set_name: RedPajamaGithub


text:
package com.google.cloud.dataproc.v1;

import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse;

import com.google.api.gax.core.NoCredentialsProvider;
import com.google.api.gax.httpjson.GaxHttpJsonProperties;
import com.google.api.gax.httpjson.testing.MockHttpService;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ApiException;
import com.google.api.gax.rpc.ApiExceptionFactory;
import com.google.api.gax.rpc.InvalidArgumentException;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.gax.rpc.testing.FakeStatusCode;
import com.google.cloud.dataproc.v1.stub.HttpJsonAutoscalingPolicyServiceStub;
import com.google.common.collect.Lists;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Generated;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

@Generated("by gapic-generator-java")
public class AutoscalingPolicyServiceClientHttpJsonTest {
  private static MockHttpService mockService;
  private static AutoscalingPolicyServiceClient client;

  @BeforeClass
  public static void startStaticServer() throws IOException {
    mockService =
        new MockHttpService(
            HttpJsonAutoscalingPolicyServiceStub.getMethodDescriptors(),
            AutoscalingPolicyServiceSettings.getDefaultEndpoint());
    AutoscalingPolicyServiceSettings settings =
        AutoscalingPolicyServiceSettings.newHttpJsonBuilder()
            .setTransportChannelProvider(
                AutoscalingPolicyServiceSettings.defaultHttpJsonTransportProviderBuilder()
                    .setHttpTransport(mockService)
                    .build())
            .setCredentialsProvider(NoCredentialsProvider.create())
            .build();
    client = AutoscalingPolicyServiceClient.create(settings);
  }

  @AfterClass
  public static void stopServer() {
    client.close();
  }

  @Before
  public void setUp() {}

  @After
  public void tearDown() throws Exception {
    mockService.reset();
  }

  @Test
  public void createAutoscalingPolicyTest() throws Exception {
    AutoscalingPolicy expectedResponse =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();
    mockService.addResponse(expectedResponse);

    LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();

    AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy);
    Assert.assertEquals(expectedResponse, actualResponse);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void createAutoscalingPolicyExceptionTest() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
      AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
      client.createAutoscalingPolicy(parent, policy);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void createAutoscalingPolicyTest2() throws Exception {
    AutoscalingPolicy expectedResponse =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();
    mockService.addResponse(expectedResponse);

    RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
    AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();

    AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy);
    Assert.assertEquals(expectedResponse, actualResponse);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void createAutoscalingPolicyExceptionTest2() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
      AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
      client.createAutoscalingPolicy(parent, policy);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void createAutoscalingPolicyTest3() throws Exception {
    AutoscalingPolicy expectedResponse =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();
    mockService.addResponse(expectedResponse);

    String parent = "projects/project-5833/locations/location-5833";
    AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();

    AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy);
    Assert.assertEquals(expectedResponse, actualResponse);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void createAutoscalingPolicyExceptionTest3() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      String parent = "projects/project-5833/locations/location-5833";
      AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
      client.createAutoscalingPolicy(parent, policy);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void updateAutoscalingPolicyTest() throws Exception {
    AutoscalingPolicy expectedResponse =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();
    mockService.addResponse(expectedResponse);

    AutoscalingPolicy policy =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();

    AutoscalingPolicy actualResponse = client.updateAutoscalingPolicy(policy);
    Assert.assertEquals(expectedResponse, actualResponse);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void updateAutoscalingPolicyExceptionTest() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      AutoscalingPolicy policy =
          AutoscalingPolicy.newBuilder()
              .setId("id3355")
              .setName(
                  AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                          "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                      .toString())
              .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
              .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
              .putAllLabels(new HashMap<String, String>())
              .build();
      client.updateAutoscalingPolicy(policy);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void getAutoscalingPolicyTest() throws Exception {
    AutoscalingPolicy expectedResponse =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();
    mockService.addResponse(expectedResponse);

    AutoscalingPolicyName name =
        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");

    AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(name);
    Assert.assertEquals(expectedResponse, actualResponse);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void getAutoscalingPolicyExceptionTest() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      AutoscalingPolicyName name =
          AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
              "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
      client.getAutoscalingPolicy(name);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void getAutoscalingPolicyTest2() throws Exception {
    AutoscalingPolicy expectedResponse =
        AutoscalingPolicy.newBuilder()
            .setId("id3355")
            .setName(
                AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
                        "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
                    .toString())
            .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build())
            .putAllLabels(new HashMap<String, String>())
            .build();
    mockService.addResponse(expectedResponse);

    String name =
        "projects/project-4686/locations/location-4686/autoscalingPolicies/autoscalingPolicie-4686";

    AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(name);
    Assert.assertEquals(expectedResponse, actualResponse);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void getAutoscalingPolicyExceptionTest2() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      String name =
          "projects/project-4686/locations/location-4686/autoscalingPolicies/autoscalingPolicie-4686";
      client.getAutoscalingPolicy(name);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void listAutoscalingPoliciesTest() throws Exception {
    AutoscalingPolicy responsesElement = AutoscalingPolicy.newBuilder().build();
    ListAutoscalingPoliciesResponse expectedResponse =
        ListAutoscalingPoliciesResponse.newBuilder()
            .setNextPageToken("")
            .addAllPolicies(Arrays.asList(responsesElement))
            .build();
    mockService.addResponse(expectedResponse);

    LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");

    ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent);

    List<AutoscalingPolicy> resources = Lists.newArrayList(pagedListResponse.iterateAll());

    Assert.assertEquals(1, resources.size());
    Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0));

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void listAutoscalingPoliciesExceptionTest() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
      client.listAutoscalingPolicies(parent);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void listAutoscalingPoliciesTest2() throws Exception {
    AutoscalingPolicy responsesElement = AutoscalingPolicy.newBuilder().build();
    ListAutoscalingPoliciesResponse expectedResponse =
        ListAutoscalingPoliciesResponse.newBuilder()
            .setNextPageToken("")
            .addAllPolicies(Arrays.asList(responsesElement))
            .build();
    mockService.addResponse(expectedResponse);

    RegionName parent = RegionName.of("[PROJECT]", "[REGION]");

    ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent);

    List<AutoscalingPolicy> resources = Lists.newArrayList(pagedListResponse.iterateAll());

    Assert.assertEquals(1, resources.size());
    Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0));

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void listAutoscalingPoliciesExceptionTest2() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
      client.listAutoscalingPolicies(parent);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void listAutoscalingPoliciesTest3() throws Exception {
    AutoscalingPolicy responsesElement = AutoscalingPolicy.newBuilder().build();
    ListAutoscalingPoliciesResponse expectedResponse =
        ListAutoscalingPoliciesResponse.newBuilder()
            .setNextPageToken("")
            .addAllPolicies(Arrays.asList(responsesElement))
            .build();
    mockService.addResponse(expectedResponse);

    String parent = "projects/project-5833/locations/location-5833";

    ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent);

    List<AutoscalingPolicy> resources = Lists.newArrayList(pagedListResponse.iterateAll());

    Assert.assertEquals(1, resources.size());
    Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0));

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void listAutoscalingPoliciesExceptionTest3() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      String parent = "projects/project-5833/locations/location-5833";
      client.listAutoscalingPolicies(parent);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void deleteAutoscalingPolicyTest() throws Exception {
    Empty expectedResponse = Empty.newBuilder().build();
    mockService.addResponse(expectedResponse);

    AutoscalingPolicyName name =
        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");

    client.deleteAutoscalingPolicy(name);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void deleteAutoscalingPolicyExceptionTest() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      AutoscalingPolicyName name =
          AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
              "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
      client.deleteAutoscalingPolicy(name);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }

  @Test
  public void deleteAutoscalingPolicyTest2() throws Exception {
    Empty expectedResponse = Empty.newBuilder().build();
    mockService.addResponse(expectedResponse);

    String name =
        "projects/project-4686/locations/location-4686/autoscalingPolicies/autoscalingPolicie-4686";

    client.deleteAutoscalingPolicy(name);

    List<String> actualRequests = mockService.getRequestPaths();
    Assert.assertEquals(1, actualRequests.size());

    String apiClientHeaderKey =
        mockService
            .getRequestHeaders()
            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
            .iterator()
            .next();
    Assert.assertTrue(
        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
            .matcher(apiClientHeaderKey)
            .matches());
  }

  @Test
  public void deleteAutoscalingPolicyExceptionTest2() throws Exception {
    ApiException exception =
        ApiExceptionFactory.createException(
            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
    mockService.addException(exception);

    try {
      String name =
          "projects/project-4686/locations/location-4686/autoscalingPolicies/autoscalingPolicie-4686";
      client.deleteAutoscalingPolicy(name);
      Assert.fail("No exception raised");
    } catch (InvalidArgumentException e) {
      // Expected exception.
    }
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.blazebit</groupId>
        <artifactId>blaze-storage</artifactId>
        <version>0.3.4-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>blaze-storage-rest</artifactId>
    <packaging>pom</packaging>

    <name>Blazebit Storage Rest Module</name>

    <modules>
        <module>model</module>
        <module>api</module>
        <module>impl</module>
    </modules>
</project>


text:
<component name="libraryTable">
  <library name="Gradle: android-android-27">
    <CLASSES>
      <root url="jar://$USER_HOME$/AppData/Local/Android/sdk/platforms/android-27/android.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>


text:
package fixtures.paging.implementation;

import fixtures.paging.ProductProperties;

/**
 * The ProductInner model.
 */
public class ProductInner {
    /**
     * The properties property.
     */
    private ProductProperties properties;

    /**
     * Get the properties value.
     *
     * @return the properties value
     */
    public ProductProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties value.
     *
     * @param properties the properties value to set
     * @return the ProductInner object itself.
     */
    public ProductInner withProperties(ProductProperties properties) {
        this.properties = properties;
        return this;
    }

}


text:
#ifndef PF_SYS_MEMORY_DYNAMIC_ALLOCATOR_H_
#define PF_SYS_MEMORY_DYNAMIC_ALLOCATOR_H_

#include "pf/sys/memory/config.h"

namespace pf_sys {

namespace memory {

class PF_API DynamicAllocator {

 public:
   DynamicAllocator();
   ~DynamicAllocator();

 public:
   void *malloc(int64_t length);
   void free();
   void *getpointer();
   int64_t getlength();

 private:
   void *pointer_;
   int64_t length_;

};

}; //namespace memory

}; //namespace pf_sys

#endif //PF_SYS_MEMORY_DYNAMIC_ALLOCATOR_H_


text:
<<<<<<< HEAD
<<<<<<< HEAD
var readInstalled = require("../read-installed.js")
var json = require("./fixtures/package.json")
var known = [].concat(Object.keys(json.dependencies)
  , Object.keys(json.optionalDependencies)
  , Object.keys(json.devDependencies)).sort()
var test = require("tap").test
var path = require("path")

test("make sure that it works", function (t) {
  readInstalled(path.join(__dirname, "../"), {
    dev: true,
    log: console.error
  }, function (er, map) {
    t.notOk(er, "er should be bull")
    t.ok(map, "map should be data")
    if (er) return console.error(er.stack || er.message)
    cleanup(map)
    var deps = Object.keys(map.dependencies).sort()
    t.equal(known.length, deps.length, "array lengths are equal")
    t.deepEqual(known, deps, "arrays should be equal")
    t.notOk(map.dependencies.tap.extraneous, 'extraneous not set on devDep')
    t.end()
  })
})

var seen = []
function cleanup (map) {
  if (seen.indexOf(map) !== -1) return
  seen.push(map)
  for (var i in map) switch (i) {
    case "_id":
    case "path":
    case "extraneous": case "invalid":
    case "dependencies": case "name":
      continue
    default: delete map[i]
  }
  var dep = map.dependencies
//    delete map.dependencies
  if (dep) {
//      map.dependencies = dep
    for (var i in dep) if (typeof dep[i] === "object") {
      cleanup(dep[i])
    }
  }
  return map
}
=======
var readInstalled = require("../read-installed.js")
var json = require("./fixtures/package.json")
var known = [].concat(Object.keys(json.dependencies)
  , Object.keys(json.optionalDependencies)
  , Object.keys(json.devDependencies)).sort()
var test = require("tap").test
var path = require("path")

test("make sure that it works", function (t) {
  readInstalled(path.join(__dirname, "../"), {
    dev: true,
    log: console.error
  }, function (er, map) {
    t.notOk(er, "er should be bull")
    t.ok(map, "map should be data")
    if (er) return console.error(er.stack || er.message)
    cleanup(map)
    var deps = Object.keys(map.dependencies).sort()
    t.equal(known.length, deps.length, "array lengths are equal")
    t.deepEqual(known, deps, "arrays should be equal")
    t.notOk(map.dependencies.tap.extraneous, 'extraneous not set on devDep')
    t.end()
  })
})

var seen = []
function cleanup (map) {
  if (seen.indexOf(map) !== -1) return
  seen.push(map)
  for (var i in map) switch (i) {
    case "_id":
    case "path":
    case "extraneous": case "invalid":
    case "dependencies": case "name":
      continue
    default: delete map[i]
  }
  var dep = map.dependencies
//    delete map.dependencies
  if (dep) {
//      map.dependencies = dep
    for (var i in dep) if (typeof dep[i] === "object") {
      cleanup(dep[i])
    }
  }
  return map
}
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
=======
var readInstalled = require("../read-installed.js")
var json = require("./fixtures/package.json")
var known = [].concat(Object.keys(json.dependencies)
  , Object.keys(json.optionalDependencies)
  , Object.keys(json.devDependencies)).sort()
var test = require("tap").test
var path = require("path")

test("make sure that it works", function (t) {
  readInstalled(path.join(__dirname, "../"), {
    dev: true,
    log: console.error
  }, function (er, map) {
    t.notOk(er, "er should be bull")
    t.ok(map, "map should be data")
    if (er) return console.error(er.stack || er.message)
    cleanup(map)
    var deps = Object.keys(map.dependencies).sort()
    t.equal(known.length, deps.length, "array lengths are equal")
    t.deepEqual(known, deps, "arrays should be equal")
    t.notOk(map.dependencies.tap.extraneous, 'extraneous not set on devDep')
    t.end()
  })
})

var seen = []
function cleanup (map) {
  if (seen.indexOf(map) !== -1) return
  seen.push(map)
  for (var i in map) switch (i) {
    case "_id":
    case "path":
    case "extraneous": case "invalid":
    case "dependencies": case "name":
      continue
    default: delete map[i]
  }
  var dep = map.dependencies
//    delete map.dependencies
  if (dep) {
//      map.dependencies = dep
    for (var i in dep) if (typeof dep[i] === "object") {
      cleanup(dep[i])
    }
  }
  return map
}
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453


text:
package main

// scoot-integration creates a standalone integration testing binary.
// This mimics end-to-end job running operations from a client's perspective,
// by instantiating a cluster and using client tooling.
// Should not be run inline with other unit/property/integration tests,
// as spawned processes can cause deadlocks by e.g. colliding on known ports.

import (
	"encoding/json"
	"flag"
	"fmt"
	"os/exec"
	"strings"
	"time"

	log "github.com/sirupsen/logrus"

	"github.com/twitter/scoot/common"
	"github.com/twitter/scoot/common/log/hooks"
	"github.com/twitter/scoot/scheduler"
	"github.com/twitter/scoot/scheduler/api/thrift/gen-go/scoot"
	"github.com/twitter/scoot/tests/testhelpers"
	"github.com/twitter/scoot/workerapi"
)

func main() {
	log.AddHook(hooks.NewContextHook())

	logLevelFlag := flag.String("log_level", "info", "Log everything at this level and above (error|info|debug)")
	flag.Parse()

	level, err := log.ParseLevel(*logLevelFlag)
	if err != nil {
		log.Fatal(err)
	}
	log.SetLevel(level)

	log.Info("Creating scoot client")
	scootClient := testhelpers.CreateScootClient(scheduler.DefaultSched_Thrift)

	// Initialize Local Cluster
	log.Info("Creating test cluster")
	cluster1Cmds, err := testhelpers.CreateLocalTestCluster()
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	defer cluster1Cmds.Kill()

	testhelpers.WaitForClusterToBeReady(scootClient)

	testhelpers.InstallBinaries()
	gopath, err := common.GetFirstGopath()
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	snapshotBytes, err := createSnapshot(gopath)
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	snapshotID := strings.TrimSpace(string(snapshotBytes))
	timeout := time.After(10 * time.Second)
	jobBytes, err := runJob(gopath, snapshotID)
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	jobID := strings.TrimSpace(string(jobBytes))

	var jsonStatusBytes []byte
	status := scoot.JobStatus{}
	for status.Status != scoot.Status_COMPLETED {
		select {
		case <-timeout:
			testhelpers.KillAndExit1(cluster1Cmds, fmt.Errorf("Timed out while waiting for job to complete"))
		default:
			jsonStatusBytes, err = getStatus(gopath, jobID)
			if err != nil {
				testhelpers.KillAndExit1(cluster1Cmds, err)
			}
			if err = json.Unmarshal(jsonStatusBytes, &status); err != nil {
				testhelpers.KillAndExit1(cluster1Cmds, err)
			}
			log.Infof("Status: %v", status)
			if status.Status == scoot.Status_COMPLETED {
				break
			}
			time.Sleep(1 * time.Second)
		}
	}

	_, err = offlineWorker(gopath, fmt.Sprintf("localhost:%d", workerapi.WorkerPorts+1))
	if err != nil {
		log.Error(err)
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	jobIDs, err := runXJobs(gopath, snapshotID, 10)
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	jobIDToStatus := make(map[string]scoot.JobStatus)
	for _, jobID := range jobIDs {
		jobIDToStatus[jobID] = scoot.JobStatus{}
	}
	for jobID, status := range jobIDToStatus {
		timeout = time.After(10 * time.Second)
		for status.Status != scoot.Status_COMPLETED {
			select {
			case <-timeout:
				testhelpers.KillAndExit1(cluster1Cmds, fmt.Errorf("Timed out while waiting for job to complete"))
			default:
				jsonStatusBytes, err = getStatus(gopath, jobID)
				if err != nil {
					testhelpers.KillAndExit1(cluster1Cmds, err)
				}
				if err = json.Unmarshal(jsonStatusBytes, &status); err != nil {
					testhelpers.KillAndExit1(cluster1Cmds, err)
				}
				log.Infof("Status: %v", status)
				if status.Status == scoot.Status_COMPLETED {
					break
				}
				time.Sleep(1 * time.Second)
			}
		}
	}

	_, err = reinstateWorker(gopath, fmt.Sprintf("localhost:%d", workerapi.WorkerPorts+1))
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	jobIDs, err = runXJobs(gopath, snapshotID, 10)
	if err != nil {
		testhelpers.KillAndExit1(cluster1Cmds, err)
	}
	jobIDToStatus = make(map[string]scoot.JobStatus)
	for _, jobID := range jobIDs {
		jobIDToStatus[jobID] = scoot.JobStatus{}
	}
	for jobID, status := range jobIDToStatus {
		timeout = time.After(10 * time.Second)
		for status.Status != scoot.Status_COMPLETED {
			select {
			case <-timeout:
				testhelpers.KillAndExit1(cluster1Cmds, fmt.Errorf("Timed out while waiting for job to complete"))
			default:
				jsonStatusBytes, err = getStatus(gopath, jobID)
				if err != nil {
					testhelpers.KillAndExit1(cluster1Cmds, err)
				}
				if err = json.Unmarshal(jsonStatusBytes, &status); err != nil {
					testhelpers.KillAndExit1(cluster1Cmds, err)
				}
				log.Infof("Status: %v", status)
				if status.Status == scoot.Status_COMPLETED {
					break
				}
				time.Sleep(1 * time.Second)
			}
		}
	}

	cluster1Cmds.Kill()
}

func createSnapshot(gopath string) ([]byte, error) {
	return exec.Command(gopath+"/bin/scoot-snapshot-db", "create", "ingest_dir", "--dir", ".").Output()
}

func runJob(gopath, snapshotID string) ([]byte, error) {
	return exec.Command(gopath+"/bin/scootcl", "run_job", "sleep", "1", "--snapshot_id", snapshotID).Output()
}

func runXJobs(gopath, snapshotID string, x int) ([]string, error) {
	jobIDs := []string{}
	for i := 0; i < x; i++ {
		jobBytes, err := runJob(gopath, snapshotID)
		if err != nil {
			return nil, err
		}
		jobID := strings.TrimSpace(string(jobBytes))
		jobIDs = append(jobIDs, jobID)
	}
	return jobIDs, nil
}

func getStatus(gopath, jobID string) ([]byte, error) {
	return exec.Command(gopath+"/bin/scootcl", "get_job_status", jobID, "--json").Output()
}

func offlineWorker(gopath, workerID string) ([]byte, error) {
	return exec.Command(gopath+"/bin/scootcl", "offline_worker", workerID).Output()
}

func reinstateWorker(gopath, workerID string) ([]byte, error) {
	return exec.Command(gopath+"/bin/scootcl", "reinstate_worker", workerID).Output()
}


text:
package com.palantir.atlasdb.keyvalue.cassandra.paging;

import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
import org.apache.cassandra.thrift.ColumnOrSuperColumn;
import org.apache.cassandra.thrift.KeySlice;

public interface ColumnGetter {
    Map<ByteBuffer, List<ColumnOrSuperColumn>> getColumnsByRow(List<KeySlice> firstPage);
}


text:
package org.apache.polygene.bootstrap.builder;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.polygene.api.activation.ActivationException;
import org.apache.polygene.api.mixin.Mixins;
import org.apache.polygene.api.structure.Application;
import org.apache.polygene.api.structure.Module;
import org.apache.polygene.bootstrap.Assembler;
import org.apache.polygene.bootstrap.AssemblyException;
import org.apache.polygene.bootstrap.ModuleAssembly;
import org.junit.jupiter.api.Test;

import static java.util.stream.Collectors.toList;
import static org.apache.polygene.bootstrap.ClassScanner.findClasses;
import static org.apache.polygene.bootstrap.ClassScanner.matches;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;

public class ApplicationBuilderTest
{
    @Test
    public void givenBuilderUseWhenBuildingApplicationExpectSuccess()
        throws AssemblyException, ActivationException
    {
        ApplicationBuilder builder = new ApplicationBuilder( "Build from API test." );
        builder.withLayer( "layer1" ).using( "layer2" ).using( "layer3" );
        builder.withLayer( "layer2" );
        builder.withLayer( "layer3" )
               .withModule( "test module" )
               .withAssemblers( findClasses( getClass() ).filter( matches( ".*ServiceAssembler" ) )
                                                         .collect( toList() ) );
        Application application = builder.newApplication();
        Module module = application.findModule( "layer3", "test module" );
        TestService service = module.findService( TestService.class ).get();
        assertThat( service.sayHello(), equalTo( "Hello Polygene!" ) );
    }

    @Test
    public void givenJsonWhenBuildingApplicationExpectSuccess()
        throws ActivationException, AssemblyException
    {
        ApplicationBuilder builder = ApplicationBuilder.fromJson( APPLICATION );
        Application application = builder.newApplication();
        Module module = application.findModule( "layer3", "test module" );
        TestService service = module.findService( TestService.class ).get();
        assertThat( service.sayHello(), equalTo( "Hello Polygene!" ) );
    }

    @Test
    public void givenJsonInputStreamWhenBuildingApplicationExpectSuccess()
        throws IOException, ActivationException, AssemblyException
    {
        InputStream input = new ByteArrayInputStream( APPLICATION.getBytes( "UTF-8" ) );
        ApplicationBuilder builder = ApplicationBuilder.fromJson( input );
        Application application = builder.newApplication();
        Module module = application.findModule( "layer3", "test module" );
        TestService service = module.findService( TestService.class ).get();
        assertThat( service.sayHello(), equalTo( "Hello Polygene!" ) );
    }

    private static final String APPLICATION =
        "{\n" +
        "    \"name\": \"Build from JSON test.\",\n" +
        "    \"layers\": [\n" +
        "        {\n" +
        "            \"name\": \"layer1\",\n" +
        "            \"uses\": [ \"layer2\", \"layer3\"]\n" +
        "        },\n" +
        "        {\n" +
        "            \"name\": \"layer2\"\n" +
        "        },\n" +
        "        {\n" +
        "            \"name\": \"layer3\",\n" +
        "            \"modules\" : [\n" +
        "                {\n" +
        "                    \"name\" : \"test module\",\n" +
        "                    \"assemblers\" : [\n" +
        "                            \"org.apache.polygene.bootstrap.builder.ApplicationBuilderTest$TestServiceAssembler\"\n" +
        "                    ]\n" +
        "                }\n" +
        "            ]\n" +
        "        }\n" +
        "    ]\n" +
        "}";

    public static class TestServiceAssembler
        implements Assembler
    {
        @Override
        public void assemble( ModuleAssembly module )
            throws AssemblyException
        {
            module.addServices( TestService.class );
        }
    }

    @Mixins( TestService.TestMixin.class )
    public interface TestService
    {
        String sayHello();

        class TestMixin
            implements TestService
        {

            @Override
            public String sayHello()
            {
                return "Hello Polygene!";
            }
        }
    }
}


text:
package com.ullink.slack.simpleslackapi.listeners;

import com.ullink.slack.simpleslackapi.events.ReactionRemoved;

public interface ReactionRemovedListener extends SlackEventListener<ReactionRemoved>{

}


text:
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, browser: true */
/*global define, $, _, */

define(function (require, exports, module) {
    "use strict";

    var _global    = require("core/Global").global,
        Repository = require("core/Repository");

    /**
     * Add validation rules
     *
     * @param {Array.<Object>} rules
     */
    function addRules(rules) {
        _.each(rules, function (rule) {
            _global.rules[rule.id] = rule;
        });
    }

    /**
     * Validate and return validation errors
     *
     * @return {Array.<Object>}
     */
    function validate() {
        var failed = [];

        _.each(_global.rules, function (rule) {

            // Get instances of types in rule.appliesTo
            var targets = Repository.getInstancesOf(rule.appliesTo);

            // Rejects instances of types in rule.exceptions
            if (rule.exceptions && rule.exceptions.length > 0) {
                targets = _.reject(targets, function (target) {
                    return _.some(rule.exceptions, function (exception) {
                        return target instanceof _global.type[exception];
                    });
                });
            }

            // Check constraints
            _.each(targets, function (target) {
                try {
                    if (!rule.constraint(target)) {
                        var item = {
                            id: target._id,
                            ruleId: rule.id,
                            message: rule.message
                        };
                        failed.push(item);
                    }
                } catch (err) {
                    console.log("[Validator] Failed to apply the rule (" + rule.id + ") on ", target);
                    console.error(err);
                }
            });
        });

        return failed;
    }

    exports.addRules = addRules;
    exports.validate = validate;

});


text:
from astropy.io import fits

# first, we need to get the hdulist
# with DEMON, there are three hdu's: PRIMARY, CLOUD, and TIME_STEP
hdulist = fits.open('data.fits')

print("The structure of your fits file is:")
print(hdulist.info())

# Now we need to grab the data from the TIME_STEP hdu
data = hdulist[2].data

# Now we have all the data for the 100 particles worth of data in the following
# format:
#    data[dt][0]     -- time at dt timestep
#    data[dt][1][n]  -- x position of particle n at dt timestep
#    data[dt][2][n]  -- y position of particle n at dt timestep
#    data[dt][3][n]  -- x velocity of particle n at dt timestep
#    data[dt][4][n]  -- y velocity of particle n at dt timestep

# prints the x position of the 2nd timestep for the 4th particle
print("The x position of the 2nd timestep for the 4th particle is:")
print(data[1][2][3])


text:
package com.thinkbiganalytics.metadata.sla.api;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ServiceLevelAgreementActionConfig {

    String name();

    String description();

    String shortDescription() default "";

    String velocityTemplateType() default "";

    Class<? extends ServiceLevelAgreementAction>[] actionClasses();

}


text:
package com.urswolfer.gerrit.client.rest.http;

import com.google.common.io.ByteStreams;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author Urs Wolfer
 */
public class LoginSimulationServlet extends HttpServlet {
    public static final String INDEX_HTML = "src/test/resources/com/urswolfer/gerrit/client/rest/http/login/index.html";

    /**
     * Only handle case when no "Authorization" header is sent. When "Authorization" header is sent,
     * leave it to GerritRestClientTest#basicAuth.
     */
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        if (req.getHeader("Authorization") != null) {
            return;
        }
        resp.addCookie(new Cookie("GerritAccount", "value"));
        ByteStreams.copy(new FileInputStream(INDEX_HTML), resp.getOutputStream());
    }
}


text:
<?xml version="1.0" encoding="utf-8" ?>
<PEPSRequest
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="gov/va/med/pharmacy/peps/external/common/preencapsulation/vo/drug/check/request drugCheckSchemaInput.xsd"
    xmlns="gov/va/med/pharmacy/peps/external/common/preencapsulation/vo/drug/check/request">

    <Header>
        <Time value="0845" />
        <MServer
            stationNumber="45"
            serverName="Server Name"
            ip="127.0.000.1"
            uci="text"
            namespace="VISTA" />
        <MUser
            jobNumber="1001"
            duz="88660079"
            userName="user" />
    </Header>

    <Body>
        <drugCheck>
            <checks prospectiveOnly="true" useCustomTables="false">
                <drugDrugCheck />
            </checks>
            <medicationProfile>
                <drug
                    gcnSeqNo="266"
                    vuid="778899"
                    ien="113"
                    orderNumber="Z;1;Prospect" />
                <drug
                    gcnSeqNo="25485"
                    ien="455"
                    orderNumber="Z;2;Prospect" />
            </medicationProfile>
        </drugCheck>
    </Body>
</PEPSRequest>


text:
directoryPlugin.service('userService', ['$resource', '$q', function ($resource, $http, $q) {
    var User = $resource('/api/api/user/:userId', { userId: '@id' });

    var service = {
        getActiveUsers: getActiveUsers,
        addUser: addUser,
        removeUser: removeUser,
        getUser: getUser,
        updateUser: updateUser
    };

    return service;

    function getActiveUsers(page, count) {
        return User.get({page: page, count: count}).$promise;
    }

    function addUser(user) {
        return User.save(user).$promise;
    }

    function removeUser(id) {

    }

    function getUser(id) {

    }

    function updateUser(user) {

    }

    function getDeletedUsers() {

    }
}]);