test_class.declarator: guestService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GuestService guestService;
test_class.type: GuestService
test_class.var_name: guestService
test_class.declarator: abdera
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Abdera abdera;
test_class.type: Abdera
test_class.var_name: abdera
test_class.declarator: uriInfo
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UriInfo uriInfo;
test_class.type: UriInfo
test_class.var_name: uriInfo
test_class.file: guest/src/test/java/org/koenighotze/jee7hotel/guest/business/GuestAtomFeedTest.java
test_class.identifier: GuestAtomFeedTest
test_case.body: @Test
      public void the_feed_exposes_the_publicid() {
          Guest guest = new Guest("123", "foo", "foo@bar.de");
          guest.setLastUpdate(now());
          when(abdera.newFeed()).thenReturn(new FOMFeed());
          when(uriInfo.getBaseUri()).thenReturn(create("http://localhost/"));
          when(guestService.getAllGuests()).thenReturn(singletonList(guest));
  
          GuestAtomFeed guestAtomFeed = new GuestAtomFeed(guestService, abdera);
          Feed guestFeed = guestAtomFeed.getGuestFeed(uriInfo);
          List<Entry> entries = guestFeed.getEntries();
  
          assertThat(entries).isNotEmpty();
          Entry entry = entries.get(0);
          assertThat(entry.getLinks().get(0).getHref().toASCIIString()).endsWith("/guests/123");
      }
test_case.class_method_signature: GuestAtomFeedTest.the_feed_exposes_the_publicid()
test_case.full_signature: @Test public void the_feed_exposes_the_publicid()
test_case.identifier: the_feed_exposes_the_publicid
test_case.invocations: setLastUpdate now thenReturn when newFeed thenReturn when getBaseUri create thenReturn when getAllGuests singletonList getGuestFeed getEntries isNotEmpty assertThat get endsWith assertThat toASCIIString getHref get getLinks
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void the_feed_exposes_the_publicid()
focal_class.declarator: LOGGER = Logger.getLogger(GuestAtomFeed.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(GuestAtomFeed.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: abdera
focal_class.modifier: private
focal_class.original_string: private Abdera abdera;
focal_class.type: Abdera
focal_class.var_name: abdera
focal_class.declarator: guestService
focal_class.modifier: private
focal_class.original_string: private GuestService guestService;
focal_class.type: GuestService
focal_class.var_name: guestService
focal_class.file: guest/src/main/java/org/koenighotze/jee7hotel/guest/business/GuestAtomFeed.java
focal_class.identifier: GuestAtomFeed
focal_class.class_method_signature: GuestAtomFeed.GuestAtomFeed()
focal_class.full_signature: public  GuestAtomFeed()
focal_class.identifier: GuestAtomFeed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  GuestAtomFeed()
focal_class.class_method_signature: GuestAtomFeed.GuestAtomFeed(GuestService guestService, Abdera abdera)
focal_class.full_signature: @Inject public  GuestAtomFeed(GuestService guestService, Abdera abdera)
focal_class.identifier: GuestAtomFeed
focal_class.modifiers: @Inject public
focal_class.parameters: (GuestService guestService, Abdera abdera)
focal_class.signature:  GuestAtomFeed(GuestService guestService, Abdera abdera)
focal_class.class_method_signature: GuestAtomFeed.getGuestFeed(@Context UriInfo uriInfo)
focal_class.full_signature: @GET @Produces(MediaType.APPLICATION_ATOM_XML) public Feed getGuestFeed(@Context UriInfo uriInfo)
focal_class.identifier: getGuestFeed
focal_class.modifiers: @GET @Produces(MediaType.APPLICATION_ATOM_XML) public
focal_class.parameters: (@Context UriInfo uriInfo)
focal_class.return: Feed
focal_class.signature: Feed getGuestFeed(@Context UriInfo uriInfo)
focal_method.body: @GET
      @Produces(MediaType.APPLICATION_ATOM_XML)
      public Feed getGuestFeed(@Context UriInfo uriInfo) {
          Feed feed = abdera.newFeed();
  
          feed.setId("tag:koenighotze.org,2015:/guest");
          feed.setTitle("Guests");
          feed.setUpdated(new Date());
  
          final String baseUri = uriInfo.getBaseUri().toString();
          feed.addLink(baseUri + "feed", "self"); // todo self ref
          guestService.getAllGuests().stream().forEach(guest -> {
              Entry entry = feed.addEntry();
              entry.setId(guest.getId() + "");
              entry.setUpdated(from(guest.getLastUpdate().toInstant(UTC)));
              entry.setAttributeValue("Version", guest.getVersion() + "");
              entry.addLink(baseUri + "guests/" + guest.getPublicId());
          });
  
          return feed;
      }
focal_method.class_method_signature: GuestAtomFeed.getGuestFeed(@Context UriInfo uriInfo)
focal_method.full_signature: @GET @Produces(MediaType.APPLICATION_ATOM_XML) public Feed getGuestFeed(@Context UriInfo uriInfo)
focal_method.identifier: getGuestFeed
focal_method.invocations: newFeed setId setTitle setUpdated toString getBaseUri addLink forEach stream getAllGuests addEntry setId getId setUpdated from toInstant getLastUpdate setAttributeValue getVersion addLink getPublicId
focal_method.modifiers: @GET @Produces(MediaType.APPLICATION_ATOM_XML) public
focal_method.parameters: (@Context UriInfo uriInfo)
focal_method.return: Feed
focal_method.signature: Feed getGuestFeed(@Context UriInfo uriInfo)