Feature: Service Exposer
In order minimise the code I need to write to produce a service
and to ensure consistency for the services I create
As a service developer
I want to have REST services automatically created for my domain entity classes
2016-07-01 05:14:15.956 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest HTTP/1.1[\r][\n]"
2016-07-01 05:14:15.959 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Accept: application/json, application/json, application/*+json, application/*+json[\r][\n]"
2016-07-01 05:14:15.962 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:59986[\r][\n]"
2016-07-01 05:14:15.964 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 05:14:15.964 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 05:14:15.966 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-07-01 05:14:16.038 INFO 2902 --- [o-auto-2-exec-4] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2016-07-01 05:14:16.040 INFO 2902 --- [o-auto-2-exec-4] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2016-07-01 05:14:16.072 INFO 2902 --- [o-auto-2-exec-4] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 32 ms
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Date: Fri, 01 Jul 2016 05:14:16 GMT[\r][\n]"
2016-07-01 05:14:16.472 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.498 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "de[\r][\n]"
2016-07-01 05:14:16.498 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "{"class":["HyperstateRootEntity"],"links":[{"href":"https://localhost:59986/hyperstateTest","rel":["self"]},{"href":"https://localhost:59986/hyperstateTest/accounts","rel":["accounts"]}],"title":"HyperstateTestController"}[\r][\n]"
2016-07-01 05:14:16.499 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-07-01 05:14:16.500 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.614 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest HTTP/1.1[\r][\n]"
2016-07-01 05:14:16.614 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Accept: application/json, application/json, application/*+json, application/*+json[\r][\n]"
2016-07-01 05:14:16.614 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:59986[\r][\n]"
2016-07-01 05:14:16.614 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 05:14:16.614 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 05:14:16.614 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-07-01 05:14:16.662 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Date: Fri, 01 Jul 2016 05:14:16 GMT[\r][\n]"
2016-07-01 05:14:16.663 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.664 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "de[\r][\n]"
2016-07-01 05:14:16.664 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "{"class":["HyperstateRootEntity"],"links":[{"href":"https://localhost:59986/hyperstateTest","rel":["self"]},{"href":"https://localhost:59986/hyperstateTest/accounts","rel":["accounts"]}],"title":"HyperstateTestController"}[\r][\n]"
2016-07-01 05:14:16.664 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-07-01 05:14:16.664 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.740 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest/accounts HTTP/1.1[\r][\n]"
2016-07-01 05:14:16.740 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Accept: application/vnd.siren+json[\r][\n]"
2016-07-01 05:14:16.740 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:59986[\r][\n]"
2016-07-01 05:14:16.740 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 05:14:16.740 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 05:14:16.741 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2016-07-01 05:14:16.741 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-07-01 05:14:16.781 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 05:14:16.782 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 05:14:16.782 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 05:14:16.782 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 05:14:16.782 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/vnd.siren+json;charset=UTF-8[\r][\n]"
2016-07-01 05:14:16.782 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 05:14:16.783 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Date: Fri, 01 Jul 2016 05:14:16 GMT[\r][\n]"
2016-07-01 05:14:16.783 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.794 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "7d[\r][\n]"
2016-07-01 05:14:16.794 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "{"class":["Accounts"],"links":[{"href":"https://localhost:59986/hyperstateTest/accounts","rel":["self"]}],"title":"Accounts"}"
2016-07-01 05:14:16.800 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.808 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-07-01 05:14:16.810 DEBUG 2902 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.881 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest/test/testAccount HTTP/1.1[\r][\n]"
2016-07-01 05:14:16.881 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Accept: application/json, application/json, application/*+json, application/*+json[\r][\n]"
2016-07-01 05:14:16.882 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:59986[\r][\n]"
2016-07-01 05:14:16.882 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 05:14:16.882 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 05:14:16.882 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-07-01 05:14:16.917 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Date: Fri, 01 Jul 2016 05:14:16 GMT[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "c3[\r][\n]"
2016-07-01 05:14:16.918 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "{"class":["Account"],"properties":{"creationDate":"2016/01/15","username":"tom"},"links":[{"href":"https://localhost:59986/hyperstateTest/test/testAccount","rel":["self"]}],"title":"The Account"}[\r][\n]"
2016-07-01 05:14:16.919 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-07-01 05:14:16.919 DEBUG 2902 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
Scenario: Expose single domain entity ?[90m# serviceExposer.feature:21?[0m
?[32mGiven ?[0m?[32man "?[0m?[32m?[1mAccount?[0m?[32m" domain entity with?[0m ?[90m# StepDefs.an_domain_entity_with(String,String,String>)?[0m
?[32mAnd ?[0m?[32mit has no actions?[0m ?[90m# StepDefs.it_has_no_actions()?[0m
?[32mAnd ?[0m?[32mit's only link is self link referencing "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m"?[0m ?[90m# StepDefs.it_s_only_link_is_self_link_referencing(String)?[0m
?[32mAnd ?[0m?[32mit is exposed at "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m"?[0m ?[90m# StepDefs.it_is_exposed_at(String)?[0m
?[32mWhen ?[0m?[32mrequest is made to "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m" for an "?[0m?[32m?[1mau.com.mountainpass.hyperstate.server.entities.Account?[0m?[32m"?[0m ?[90m# StepDefs.request_is_made_to_for_an(String,String)?[0m
?[32mThen ?[0m?[32mthe response will be an "?[0m?[32m?[1mAccount?[0m?[32m" domain entity with?[0m ?[90m# StepDefs.the_response_will_be_an_domain_entity_with(String,String,String>)?[0m
?[32mAnd ?[0m?[32mit will have no actions?[0m ?[90m# StepDefs.it_will_have_no_actions()?[0m
?[32mAnd ?[0m?[32mit will have no links apart from "?[0m?[32m?[1mself?[0m?[32m"?[0m ?[90m# StepDefs.it_will_have_no_links_apart_from(String)?[0m
?[32mAnd ?[0m?[32mit will have a self link referencing "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m"?[0m ?[90m# StepDefs.it_will_have_a_self_link_referencing(String)?[0m
3 Scenarios (?[32m3 passed?[0m)
18 Steps (?[32m18 passed?[0m)
0m1.400s