text:
Upworthy generated 200 million Facebook video views with a nine-person team
February 5, 2016 • 3 min read | By Sahil Patel
Upworthy says its decision to focus more resources toward video is working — but so far, it's only working on Facebook.
In January, Upworthy topped 200 million views on Facebook for the first time, according to Tubular Labs. In fact, the publisher's Facebook video audience has more than tripled over the past few months, up from 64.2 million in November 2015, according to Tubular. Compare this to YouTube, where Upworthy has nearly 154,000 subscribers and did just 209,000 views in December.
The 200 million milestone came during the same month Upworthy laid off 14 staffers in an effort to double down on digital video, which its co-founders called a "core growth driver." The idea: to chase more lucrative video ad dollars, instead of relying on display ad revenue tied to clickbait articles.
But with almost all of Upworthy's video viewership happening on Facebook, it might still be a while before it can capture substantial video-ad revenue. This is because while a lot of publishers are getting a lot of views on Facebook, the platform does not have a revenue-sharing program as mature as YouTube. Right now, the path to video revenue on Facebook is through sponsored content — which Upworthy is doing. In recent months, the company has worked with advertisers like The CW and Unilever on sponsored videos, and is actively talking to more clients for 2016, according to its head of video, Croi McNamara. She wouldn't reveal if the video business is profitable yet, just that revenue has grown alongside video viewership in the last three months.
Upworthy's video operations remains small with McNamara overseeing a team of only nine producers and editors. "We're small and scrappy, but we're punching way above our weight class," she said. As part of the company's pivot toward doing more video, she expects to grow that staff in 2016, particularly as it invests more in original content.
Last year, the company launched its first original series, "Humanity for the Win." This year, it has several more planned, including two, "Testimony" and "Another Person's Shoes," coming in the next two weeks. (Upworthy also released two more episodes of "Humanity" in January, in addition to the two it published last year.)
On average, original content gets twice as many views as videos licensed from outside partners such as StoryCorps, according to McNamara. Its top video on Facebook, about a former Wall Street banker who started a pizza shop, has done more than 50 million views.
That said, licensed content still accounts for a vast majority of the publisher's overall output. Of the 25 videos Upworthy publishes per week, only one or two are originals (this includes episodic series as well as one-offs such as this one of a father who paints his daughter's nails).
And while its success on Facebook has elicited interest from advertisers, the company acknowledges there's greater potential if it can also succeed on YouTube, Instagram and other social video platforms.
"Our audience is loyal, they are interested in what we have to say," said McNamara. "And we have a lot of social currency, so we'll use that [to expand to] other social platforms."


text:
Brendan Rodgers Hints At His Next Liverpool Captain
Patrick Williamson
Rodgers praised Henderson after a tunnel bust-up with Diego Costa following the League Cup draw with Chelsea this week.
Liverpool manager Brendan Rodgers has not-so-subtly hinted that midfielder Jordan Henderson will be his next Anfield captain after the departure of current incumbent Steven Gerrard at the end of the season.
He spoke about Henderson's role in a tunnel bust up following the fractious 1-1 draw against Chelsea in the Capital One Cup this week.
West Brom look to sign Shola Ameobi
Chelsea set to allow two first team stars to leave
Henderson has worn the armband when Gerrard has been left out of the team in recent weeks and his industrious, energetic midfield drive makes him the obvious choice as captain if Rodgers is looking for a player, like Gerrard, who finds himself at the centre of the action each week.
Rodgers defended his man's role in the clash with Blues striker Diego Costa following the Anfield draw on Tuesday night, whilst he also spoke about Henderson's suitability for the captaincy and praised his leadership qualities:
"He feels it is the representation of an iconic club that over the years has had many great captains and vice-captains," the Northern Irishman was quoted by the Mirror.
"Watching Steven closely in his time, he will understand why I have given him it and the leadership qualities that are demanded. He will only grow and get better from it."
Henderson captained the side for the final 20 minutes against Jose Mourinho's side at Anfield, once Gerrard was replaced, and it is looking increasingly likely that he will have the armband for good come the end of the campaign.
More Stories Jordan Henderson Liverpool FC
Man United boss Solskjaer reserves special praise for two Liverpool players after 0-0 draw January 18, 2021 8:47
Video: Thiago Alcantara leaves Man United star Bruno Fernandes trailing with fine dribbling that earned 'brilliant lad' praise from Liverpool teammate January 17, 2021 17:45
Thiago Alcantara tricking Man United's Bruno Fernandes sparks reaction from Liverpool captain Jordan Henderson January 17, 2021 17:03
Video: Man United legend Roy Keane bursts into laughter as he discusses Liverpool centre-back pairing for mammoth encounter January 17, 2021 16:45
Sir Alex Ferguson reveals why he didn't sign Liverpool's Jordan Henderson January 16, 2021 8:48
Ex-Red Devil names Man United & Liverpool combined XI with some controversial choices January 14, 2021 15:02
Jamie Carragher "can't see Liverpool winning the league" if Klopp doesn't sign a centre back January 5, 2021 7:13
'Thiagoooooo' – These Liverpool fans can't contain their excitement at seeing the midfielder's return at Southampton January 4, 2021 19:19
Jurgen Klopp advised to try Liverpool star in new position by ex-Red December 31, 2020 12:34
Premier League team of 2020: Six Liverpool players, one Man United star in final BBC XI of the year December 31, 2020 6:37

redpajama_set_name: RedPajamaCommonCrawl


Easy make christmas ornaments step tutorials is one images from 19 pictures how to make simple christmas decorations of World Homes photos gallery. This image has dimension 500x376 Pixel and File Size 15 KB, you can click the image above to see the large or full size photo. Previous photo in the gallery is tutorial make resin star christmas tree ornaments dabbled. For next photo in the gallery is easy christmas candy pouches hometalk. You are viewing image #12 of 19, you can see the complete gallery at the bottom below.


HobNob Columbus: Did you remember to fall back?
Daylight saving time ended overnight for most of the country! Make sure to set your clocks back one hour. As a reminder, any time you change your clocks is also a great time to check the batteries in your smoke detector.


The plain satin range from DQT includes bow ties, cravats, cufflinks, cummerbunds, ties, tie clips in more than thirty colours. In addition many have matching waistcoats as well. Uniquely, many garments are available in both men's and boy's sizes. DQT's plain satin has a smooth glossy finish and works well as co-ordinated garments or as a complement to Scroll, Swirl or Passion (floral) designs.
When attempting a colour co-ordinated wedding or other event, choosing the right design and colour is critical. Our range of swatches help with this process and allow a better match. All our swatches are postage free as the price simply covers the cost of shipping and handling. What's more our swatches come with a discount coupon so that you can recover the cost. Swatches are normally supplied from our own stock, however we may occasionally need to send direct from the manufacturer.


Admiral Hyman Rickover in my view revolutionized naval war and adjusted the end result of the chilly battle. at the same time he drove innovation into American -- which within the a long time on the grounds that has confirmed to be a wellspring of strength for American know-how. As a touchstone of his good fortune, in the course of Rickover's stewardship the Russians had actually dozens of reactor injuries, yet Rickover's single-minded specialise in security secure americans in addition to and our lands from nuclear contamination.
Rickover did all of this in the beginning through the strength of his personal character and at last by means of insisting on radical tradition swap. the writer had the great fortune to in my opinion comprehend and be concerned with Admiral Rickover in addition to a number of the finest avid gamers and protagonists in the course of a lot of this thirty 12 months technique of wrenching cultural upheaval. the writer leaves specified biographical information of Rickover to others, as a substitute targeting formerly unknown ancient occasions within which he in my view participated or had designated wisdom which spotlight the administration and management ideas in the back of Rickover's achievements and position very important occasions (President Eisenhower selecting nuclear submarines to counter Sputnik, improvement of the Polaris Fleet, the connection of Admirals Zumwalt and Rickover, the lack of USS Scorpion, the prevalence of the yank submarines over the Soviet fleet, etc.) in an ancient perspective.
Because of his life's paintings, the writer is uniquely certified to use a lot of Rickover's rules to different occasions. for instance, Dave good is familiar with the actual army tradition Rickover needed to wreck for the writer begun his personal occupation on a diesel boat. equally because the writer spent a decade in US as both the executive government Officer or the executive working Officer, he knows easy methods to determine events the place Rickover's rules will be utilized to conditions. this is often performed on the finish of every bankruptcy within the booklet, therefore offering a place to begin for any who desire to use this resource for case studies.
At domestic and abroad, the U.S. Coast shield served various important services in international struggle II, offering provider that has been too little well-known in histories of the conflict. Teaming up with different foreign forces, the Coast defend supplied crewmembers for military and armed forces vessels in addition to its personal, carried troops, nutrients, and army offers in another country, and landed Marine and military devices on far away and hazardous seashores.
In an extended brief lifestyles, Merle W. McMorrow files a path of occasions of his personal and his familys stories from his adolescence into maturity. He was once born in the course of a time of uncertainty following global battle I. either his mom and dad grew up in households that positioned little or no worth on schooling, and consequently neither one complete highschool.
This publication chronicles the tales ,ships and sailors of the U. S. military from its earliest beginnings whilst wind used to be the single resource of strength to energy those ships. a lot of our background and language has its roots in those wood ships as we extended Americas impact from the unique thirteen colonies. This e-book was once basically researched and written by means of Dr.
No sleek modifying, reviews or poorly judged reviews, simply the good struggle day-to-day, written via the boys who fought this β€˜War to finish all Wars'. complete color facsimile of every and each web page. So – what precisely is a warfare Diary and why may still i need to learn one?
Put easily, a conflict Diary files what the actual unit used to be doing every day. It features a wealth of data that catalogues its a number of actions, if it is sour and expensive combating, or extra mundane initiatives equivalent to education. it truly is regularly the one checklist to point what infantrymen most likely did throughout the struggle. Make no mistake – there by no means was once an in depth checklist stored of what each one soldier or officer did at any given time. That kind of minutia checklist protecting doesn't exist even this day. What have been stored have been the diaries of the unit the guy belonged to. you could learn precisely what a unit did and, from that, infer what activities the lads assigned to that unit did. The struggle Diaries are one of the preferred records to be sought on the nationwide information. Chronological index to every quantity. mystery and personal intelligence. Operational orders. Battalion and corporate orders. Timing of assaults and assault goals. self-discipline. Meteorological climate studies. Trench raids and evening assaults. gear diagrams and line
drawings. position names and map co-ordinates. Battalion and corporate activities. officials' routine. Localised trench maps and plans. Casualty figures of the lacking and wounded. Hand written-up and signed every day through the appointed officer, really on the sharp finish together with his males within the trenches. Uniquely wealthy and whole of army and historic information.


text:
Country Report Brazil
The Brazilian economy is expected to grow only 0.3% in 2015 after 0.2% in 2014, as the much needed return to more orthodox economic policies will negatively weigh on growth in the short-term.
Political situation
Head of state/government: President Dilma Rousseff (since January 2011)
Form of government: A broad coalition, comprising the left-wing Workers' Party (PT) and the centrist Democratic Movement Party (PMDB)
Population: 202.8 million (est.)
A massive corruption scandal casts its shadow
In the October 2014 run-off presidential election Dilma Rousseff of the Workers ´ Party (Partido dos Trabalhadores, PT) was re-elected by a small margin of 51.6% of the votes. This also mirrored public disappointment with her economic management as Brazilian GDP growth decelerated. Rousseff´s first action after her re-election signalled a hopeful return to more orthodox macroeconomic policies, i.e. to combat inflation and to trim the budget deficit. In order to regain confidence in fiscal policy and stave off the growing risk of Brazil losing its investment grade rating from the major credit rating agencies, finance minister Guido Mantega was replaced by Joaquim Levy, a well-respected, orthodox economist, who already served under the administration of president Lula and significantly improved government finances at that time.
However, since late 2014 the administration and the ruling Workers´ Party have come under pressure due to a massive corruption scandal: state prosecutors alleged leading construction and other businesses paid a huge amount of bribes to high-ranking officials of the state oil company Petrobras and certain politicians, mainly from the Workers´ Party, in return for contracts. Dozens of senior managers of Petrobras and other companies have been arrested in the meantime.
Growth in 2015 will remain subdued
Brazil's large, diversified economy has underperformed since 2011 and even experienced a technical recession in H1 of 2014. Growth slowed down in 2014, mainly due to weak domestic and foreign demand and decreased commodity prices. Domestic demand has been adversely affected by decreasing consumer and business confidence in response to an unbalanced economic policy mix and increased state intervention under the first Rousseff administration. Additionally major supply side constraints (low investment and savings ratios, weak infrastructure, complex business and regulatory environment) had an adverse effect. The Brazilian economy is expected to grow only 0.3% in 2015 after 0.2% in 2014, as the much needed return to more orthodox economic policies will negatively weigh on growth in the short-term.
Relatively high inflation expected to persist
Fiscal policy has been quite expansionary in recent years, as investment to exploit the huge offshore oil fields, the 2014 FIFA World Cup and the 2016 Olympics fuelled public sector spending. The budget deficit increased to 3.2% of GDP in 2014 and is forecast to increase to more than 6% of GDP in 2015. At 63% of GDP, government debt was already fairly high in 2014, and is forecast to increase further in 2015, to 65% of GDP. Most of the debt is domestically financed in local currency at an average maturity of seven years.
Private consumption, which is Brazil´s main contributor to growth, is adversely affected by the adoption of austerity measures necessary to restore government finances. The steps have included boosting taxes and regulating prices, which have caused inflation to accelerate again in the short-term. To slow price increases, the Central Bank has raised the SELIC benchmark interest rate (its overnight lending rate) four times since October 2014, to 12.75%, the highest level in more than three years.
However, increased interest rates and high household indebtedness hamper private consumption growth and are expected to continue to do so in 2015. Both business and consumer confidence have been negatively affected by the Petrobras corruption scandal, which has severe consequences for the construction and energy industries as well as, due to the scandal, new investments are being put on hold and many companies may face financial difficulties. Inflation is expected to remain above 6 % (the Central Banks´s target rate) in 2015. To further combat inflation, but also to prevent a further weakening of the exchange rate, the Central Bank is expected to keep the SELIC at a high level.
Growth-enhancing structural reforms - reducing bureaucracy and corruption and improving education - are urgently needed to improve Brazil's earnings capacity. An expansion of the currently more orthodox economic policy would also help to generate higher growth rates in the long-term. However, it remains uncertain if President Rousseff will continue to support more orthodox policies given that the adjustments will be politically painful. Social discontent over the poor quality of public services, corruption, and the weak state of the economy has already grown.
Still vulnerable to changing investors' sentiment
Brazil remains vulnerable to changing investors' sentiment, due to a relatively high stock of portfolio investment inflows (160% of international reserves). This weakness became evident in mid-2013, when rumours that the US Federal Reserve would end its expansionary monetary policy led to investors withdrawing short-term capital from Brazil. This put pressure on Brazil's international reserves and exchange rate, with the Real strongly depreciating against the USD. Following a rebound at the end of 2014, in early 2015, the Brazilian real has again come under depreciation pressure.
Strong external fundamentals and good shock resistance
Brazil´s external financial situation is expected to remain strong. External debt is still quite low and liquidity is more than sufficient to cover imports (more than 18 months) and external refinancing needs. The current account deficit is expected to remain stable in 2015, at 4.2% of GDP as decreasing export receipts are more or less counterbalanced by declining imports. Brazil´s earning capacity is set to improve in the long-term, as there are large offshore pre-salt oil reserves (i.e. located below the deep layers of rock and salt off Brazil's coast) estimated to be 50 billion barrels. More exploration of these resources could turn Brazil into one of the largest oil-producers in the world. However, this would require large investments in the highly complex and capital- intensive deep water developments. For these to materialise, Brazil would have to improve its business environment.
Atradius Country Reports - South America - March 2015
Global economic growth remains tepid and weaker than expected. A 'new normal' of structurally lower growth rates in both advanced and emerging markets has become manifest.
Trade successfully with Brazil
Doing business in Brazil can be challenging if you're not used to the local business environment. The ten principles set out in this report can help make trading relationships lasting and successful.
Market Monitor - ICT Industry - Brazil
The ICT sector has seen a decline due to the economic downturn in Brazil, with decreasing demand, exchange rate volatility and high interest rates.


The black crystal beaded peter pan collar necklace is the perfect statement piece to dress up any outfit.
Ties with a pretty black ribbon.
Jet black beads, acrylic stones, and glass stones throughout make this bib sparkle and shine.
Make an elegant and bold statement.


text:
package org.jclouds.openstack.neutron.v2.extensions;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

import org.jclouds.openstack.neutron.v2.NeutronApi;
import org.jclouds.openstack.neutron.v2.domain.Rule;
import org.jclouds.openstack.neutron.v2.domain.RuleDirection;
import org.jclouds.openstack.neutron.v2.domain.RuleEthertype;
import org.jclouds.openstack.neutron.v2.domain.RuleProtocol;
import org.jclouds.openstack.neutron.v2.domain.Rules;
import org.jclouds.openstack.neutron.v2.domain.SecurityGroup;
import org.jclouds.openstack.neutron.v2.domain.SecurityGroups;
import org.jclouds.openstack.neutron.v2.internal.BaseNeutronApiMockTest;
import org.jclouds.openstack.v2_0.options.PaginationOptions;
import org.jclouds.rest.ResourceNotFoundException;
import org.testng.annotations.Test;

import com.squareup.okhttp.mockwebserver.MockResponse;
import com.squareup.okhttp.mockwebserver.MockWebServer;

/**
 * Tests NetworkApi Guice wiring and parsing
 *
 */
@Test
public class SecurityGroupApiMockTest extends BaseNeutronApiMockTest {

   public void testCreateSecurityGroup() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201).setBody(stringFromResource("/security_group_create_response.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         SecurityGroup.CreateSecurityGroup createSecurityGroup = SecurityGroup.createBuilder().name("new-webservers")
               .description("security group for webservers")
               .build();

         SecurityGroup securityGroup = api.create(createSecurityGroup);

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "POST", "/v2.0/security-groups", "/security_group_create_request.json");

         /*
          * Check response
          */
         assertNotNull(securityGroup);
         assertEquals(securityGroup.getId(), "2076db17-a522-4506-91de-c6dd8e837028");
         assertEquals(securityGroup.getTenantId(), "e4f50856753b4dc6afee5fa6b9b6c550");
         assertEquals(securityGroup.getName(), "new-webservers");
         assertEquals(securityGroup.getDescription(), "security group for webservers");

         Rule sgr0 = securityGroup.getRules().get(0);
         Rule sgr1 = securityGroup.getRules().get(1);

         assertEquals(sgr0.getId(), "38ce2d8e-e8f1-48bd-83c2-d33cb9f50c3d");
         assertEquals(sgr1.getId(), "565b9502-12de-4ffd-91e9-68885cff6ae1");
      } finally {
         server.shutdown();
      }
   }

   @Test(expectedExceptions = ResourceNotFoundException.class)
   public void testCreateSecurityGroupFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         SecurityGroup.CreateSecurityGroup createSecurityGroup = SecurityGroup.createBuilder().name("new-webservers")
               .description("security group for webservers")
               .build();

         SecurityGroup securityGroup = api.create(createSecurityGroup);
      } finally {
         server.shutdown();
      }
   }

   public void testCreateSecurityGroupRule() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201).setBody(stringFromResource("/security_group_rule_create_response.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         Rule.CreateRule createSecurityGroupRule = Rule.createBuilder(
               RuleDirection.INGRESS, "a7734e61-b545-452d-a3cd-0189cbd9747a")
               .portRangeMin(80)
               .portRangeMax(80)
               .ethertype(RuleEthertype.IPV4)
               .protocol(RuleProtocol.TCP)
               .remoteGroupId("85cc3048-abc3-43cc-89b3-377341426ac5")
               .build();

         Rule rule = api.create(createSecurityGroupRule);

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "POST", "/v2.0/security-group-rules", "/security_group_rule_create_request.json");

         /*
          * Check response
          */
         assertNotNull(rule);
         assertEquals(rule.getId(), "2bc0accf-312e-429a-956e-e4407625eb62");
         assertEquals(rule.getTenantId(), "e4f50856753b4dc6afee5fa6b9b6c550");
         assertEquals(rule.getDirection(), RuleDirection.INGRESS);
         assertEquals(rule.getPortRangeMax().intValue(), 80);
         assertEquals(rule.getPortRangeMin().intValue(), 80);
         assertEquals(rule.getEthertype(), RuleEthertype.IPV4);
         assertEquals(rule.getProtocol(), RuleProtocol.TCP);
         assertEquals(rule.getRemoteGroupId(), "85cc3048-abc3-43cc-89b3-377341426ac5");
         assertEquals(rule.getSecurityGroupId(), "a7734e61-b545-452d-a3cd-0189cbd9747a");

      } finally {
         server.shutdown();
      }
   }

   @Test(expectedExceptions = ResourceNotFoundException.class)
   public void testCreateSecurityGroupRuleFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         Rule.CreateRule createSecurityGroupRule = Rule.createBuilder(
               RuleDirection.INGRESS, "a7734e61-b545-452d-a3cd-0189cbd9747a")
               .portRangeMin(80)
               .portRangeMax(80)
               .ethertype(RuleEthertype.IPV4)
               .protocol(RuleProtocol.TCP)
               .remoteGroupId("85cc3048-abc3-43cc-89b3-377341426ac5")
               .build();

         Rule rule = api.create(createSecurityGroupRule);
      } finally {
         server.shutdown();
      }
   }

   public void testListSpecificPageSecurityGroup() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/security_group_list_response_paged1.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         SecurityGroups securityGroups = api.listSecurityGroups(PaginationOptions.Builder.limit(2).marker("abcdefg"));

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups?limit=2&marker=abcdefg");

         /*
          * Check response
          */
         assertNotNull(securityGroups);
         assertEquals(securityGroups.size(), 2);
         // Ensures the full collection is parsed and ordering is preserved.
         assertEquals(securityGroups.first().get().getId(), "85cc3048-abc3-43cc-89b3-377341426ac5");
         assertEquals(securityGroups.get(1).getId(), "85cc3048-abc3-43cc-89b3-377341426ac52");
      } finally {
         server.shutdown();
      }
   }

   public void testListSpecificPageSecurityGroupFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         SecurityGroups securityGroups = api.listSecurityGroups(PaginationOptions.Builder.limit(2).marker("abcdefg"));

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups?limit=2&marker=abcdefg");

         /*
          * Check response
          */
         assertNotNull(securityGroups);
         assertTrue(securityGroups.isEmpty());
      } finally {
         server.shutdown();
      }
   }

   public void testListSpecificPageSecurityGroupRule() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/security_group_rule_list_response_paged1.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         Rules rules = api.listRules(PaginationOptions.Builder.limit(2).marker("abcdefg"));

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules?limit=2&marker=abcdefg");

         /*
          * Check response
          */
         assertNotNull(rules);
         assertEquals(rules.size(), 4);
         // Ensures the full collection is parsed and ordering is preserved.
         assertEquals(rules.first().get().getId(), "3c0e45ff-adaf-4124-b083-bf390e5482ff");
         assertEquals(rules.get(3).getId(), "f7d45c89-008e-4bab-88ad-d6811724c51c");
      } finally {
         server.shutdown();
      }
   }

   public void testListSpecificPageSecurityGroupRuleFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         Rules rules = api.listRules(PaginationOptions.Builder.limit(2).marker("abcdefg"));

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules?limit=2&marker=abcdefg");

         /*
          * Check response
          */
         assertNotNull(rules);
         assertTrue(rules.isEmpty());
      } finally {
         server.shutdown();
      }
   }

   public void testListPagedSecurityGroups() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/security_group_list_response_paged1.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/security_group_list_response_paged2.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         // Note: Lazy! Have to actually look at the collection.
         List<SecurityGroup> securityGroups = api.listSecurityGroups().concat().toList();

         /*
          * Check request
          */
         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups");
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups?marker=71c1e68c-171a-4aa2-aca5-50ea153a3718");

         /*
          * Check response
          */
         assertNotNull(securityGroups);
         assertEquals(securityGroups.size(), 4);
         // Ensures ordering is preserved and both pages are parsed.
         assertEquals(securityGroups.get(0).getId(), "85cc3048-abc3-43cc-89b3-377341426ac5");
         assertEquals(securityGroups.get(3).getId(), "85cc3048-abc3-43cc-89b3-377341426ac524");

      } finally {
         server.shutdown();
      }
   }

   public void testListPagedSecurityGroupsFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         // Note: Lazy! Have to actually look at the collection.
         List<SecurityGroup> securityGroups = api.listSecurityGroups().concat().toList();

         /*
          * Check request
          */
         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups");

         /*
          * Check response
          */
         assertNotNull(securityGroups);
         assertTrue(securityGroups.isEmpty());

      } finally {
         server.shutdown();
      }
   }

   public void testListPagedSecurityGroupRules() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/security_group_rule_list_response_paged1.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/security_group_rule_list_response_paged2.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         // Note: Lazy! Have to actually look at the collection.
         List<Rule> rules = api.listRules().concat().toList();

         /*
          * Check request
          */
         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules");
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules?marker=71c1e68c-171a-4aa2-aca5-50ea153a3718");

         /*
          * Check response
          */
         assertNotNull(rules);
         assertEquals(rules.size(), 8);
         // Ensures both pages are tested and ordering is preserved.
         assertEquals(rules.get(0).getId(), "3c0e45ff-adaf-4124-b083-bf390e5482ff");
         assertEquals(rules.get(7).getId(), "f7d45c89-008e-4bab-88ad-d6811724c51c2");

      } finally {
         server.shutdown();
      }
   }

   public void testListPagedSecurityGroupRulesFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         // Note: Lazy! Have to actually look at the collection.
         List<Rule> rules = api.listRules().concat().toList();

         /*
          * Check request
          */
         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules");

         /*
          * Check response
          */
         assertNotNull(rules);
         assertTrue(rules.isEmpty());

      } finally {
         server.shutdown();
      }
   }

   public void testGetSecurityGroup() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201).setBody(stringFromResource("/security_group_get_response.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         SecurityGroup securityGroup = api.getSecurityGroup("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups/12345");

         /*
          * Check response
          */
         assertNotNull(securityGroup);
         assertEquals(securityGroup.getName(), "default");
         assertEquals(securityGroup.getDescription(), "default");
         assertEquals(securityGroup.getId(), "85cc3048-abc3-43cc-89b3-377341426ac5");
         assertEquals(securityGroup.getTenantId(), "e4f50856753b4dc6afee5fa6b9b6c550");
         Rule sgr = securityGroup.getRules().get(0);
         assertEquals(sgr.getId(), "3c0e45ff-adaf-4124-b083-bf390e5482ff");
      } finally {
         server.shutdown();
      }
   }

   public void testGetSecurityGroupFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         SecurityGroup securityGroup = api.getSecurityGroup("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-groups/12345");

         /*
          * Check response
          */
         assertNull(securityGroup);

      } finally {
         server.shutdown();
      }
   }

   public void testGetSecurityGroupRule() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201).setBody(stringFromResource("/security_group_rule_get_response.json"))));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         Rule rule = api.get("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules/12345");

         /*
          * Check response
          */
         assertNotNull(rule);
         assertEquals(rule.getDirection(), RuleDirection.EGRESS);
         assertEquals(rule.getEthertype(), RuleEthertype.IPV6);
         assertEquals(rule.getId(), "3c0e45ff-adaf-4124-b083-bf390e5482ff");
         assertEquals(rule.getTenantId(), "e4f50856753b4dc6afee5fa6b9b6c550");
         assertEquals(rule.getSecurityGroupId(), "85cc3048-abc3-43cc-89b3-377341426ac5");

      } finally {
         server.shutdown();
      }
   }

   public void testGetSecurityGroupRuleFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         Rule rule = api.get("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v2.0/security-group-rules/12345");

         /*
          * Check response
          */
         assertNull(rule);

      } finally {
         server.shutdown();
      }
   }

   public void testDeleteSecurityGroup() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         boolean result = api.deleteSecurityGroup("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "DELETE", "/v2.0/security-groups/12345");

         /*
          * Check response
          */
         assertTrue(result);
      } finally {
         server.shutdown();
      }
   }

   public void testDeleteSecurityGroupFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         boolean result = api.deleteSecurityGroup("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "DELETE", "/v2.0/security-groups/12345");

         /*
          * Check response
          */
         assertFalse(result);
      } finally {
         server.shutdown();
      }
   }

   public void testDeleteSecurityGroupRule() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(201)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         boolean result = api.deleteRule("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "DELETE", "/v2.0/security-group-rules/12345");

         /*
          * Check response
          */
         assertTrue(result);
      } finally {
         server.shutdown();
      }
   }

   public void testDeleteSecurityGroupRuleFail() throws IOException, InterruptedException, URISyntaxException {
      MockWebServer server = mockOpenStackServer();
      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
      server.enqueue(addCommonHeaders(
            new MockResponse().setResponseCode(404)));

      try {
         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron", overrides);
         SecurityGroupApi api = neutronApi.getSecurityGroupApi("RegionOne").get();

         boolean result = api.deleteRule("12345");

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "DELETE", "/v2.0/security-group-rules/12345");

         /*
          * Check response
          */
         assertFalse(result);
      } finally {
         server.shutdown();
      }
   }
}

redpajama_set_name: RedPajamaGithub