1010import com .amadeus .shopping .FlightDates ;
1111import com .amadeus .shopping .FlightDestinations ;
1212import com .amadeus .shopping .FlightOffers ;
13+ import com .amadeus .shopping .HotelOffers ;
14+ import com .amadeus .shopping .hotel .Offer ;
1315import com .amadeus .travel .analytics .FareSearches ;
1416import com .amadeus .travel .analytics .airTraffic .Traveled ;
1517import org .junit .Test ;
@@ -23,6 +25,9 @@ public class NamespaceTest {
2325 assertNotNull (client .shopping .flightDates );
2426 assertNotNull (client .shopping .flightDestinations );
2527 assertNotNull (client .shopping .flightOffers );
28+ assertNotNull (client .shopping .hotelOffers );
29+ assertNotNull (client .shopping .hotel ("123" ).hotelOffers );
30+ assertNotNull (client .shopping .hotel ("123" ).offer ("234" ));
2631 }
2732
2833 @ Test public void testGetMethods () throws ResponseException {
@@ -76,5 +81,30 @@ public class NamespaceTest {
7681 FlightOffers flightOffers = new FlightOffers (client );
7782 assertTrue (flightOffers .get () instanceof Response );
7883 assertTrue (flightOffers .get (params ) instanceof Response );
84+
85+ when (client .get ("/v1/shopping/hotel-offers" , null ))
86+ .thenReturn (mock (Response .class ));
87+ when (client .get ("/v1/shopping/hotel-offers" , params ))
88+ .thenReturn (mock (Response .class ));
89+ HotelOffers hotelOffers = new HotelOffers (client );
90+ assertTrue (hotelOffers .get () instanceof Response );
91+ assertTrue (hotelOffers .get (params ) instanceof Response );
92+
93+ when (client .get ("/v1/shopping/hotels/123/hotel-offers" , null ))
94+ .thenReturn (mock (Response .class ));
95+ when (client .get ("/v1/shopping/hotels/123/hotel-offers" , params ))
96+ .thenReturn (mock (Response .class ));
97+ com .amadeus .shopping .hotel .HotelOffers hotelOffers2
98+ = new com .amadeus .shopping .hotel .HotelOffers (client , "123" );
99+ assertTrue (hotelOffers2 .get () instanceof Response );
100+ assertTrue (hotelOffers2 .get (params ) instanceof Response );
101+
102+ when (client .get ("/v1/shopping/hotels/123/offers/234" , null ))
103+ .thenReturn (mock (Response .class ));
104+ when (client .get ("/v1/shopping/hotels/123/offers/234" , params ))
105+ .thenReturn (mock (Response .class ));
106+ Offer offer = new Offer (client , "123" , "234" );
107+ assertTrue (offer .get () instanceof Response );
108+ assertTrue (offer .get (params ) instanceof Response );
79109 }
80110}
0 commit comments