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-06-27 01:54:04.417 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest HTTP/1.1[\r][\n]"
2016-06-27 01:54:04.417 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Accept: application/json, application/*+json[\r][\n]"
2016-06-27 01:54:04.417 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:47192[\r][\n]"
2016-06-27 01:54:04.417 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-06-27 01:54:04.418 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.1 (Java/1.8.0_91)[\r][\n]"
2016-06-27 01:54:04.418 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-06-27 01:54:04.507 INFO 4286 --- [o-auto-2-exec-4] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2016-06-27 01:54:04.507 INFO 4286 --- [o-auto-2-exec-4] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2016-06-27 01:54:04.523 INFO 4286 --- [o-auto-2-exec-4] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 15 ms
2016-06-27 01:54:04.953 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-06-27 01:54:04.953 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-06-27 01:54:04.954 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-06-27 01:54:04.954 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-06-27 01:54:04.954 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-06-27 01:54:04.954 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-06-27 01:54:04.954 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Date: Mon, 27 Jun 2016 01:54:04 GMT[\r][\n]"
2016-06-27 01:54:04.954 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:04.986 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "de[\r][\n]"
2016-06-27 01:54:04.987 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "{"class":["HyperstateRootEntity"],"links":[{"href":"https://localhost:47192/hyperstateTest","rel":["self"]},{"href":"https://localhost:47192/hyperstateTest/accounts","rel":["accounts"]}],"title":"HyperstateTestController"}[\r][\n]"
2016-06-27 01:54:04.987 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-06-27 01:54:04.987 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.143 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest HTTP/1.1[\r][\n]"
2016-06-27 01:54:05.144 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Accept: application/json, application/*+json[\r][\n]"
2016-06-27 01:54:05.144 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:47192[\r][\n]"
2016-06-27 01:54:05.144 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-06-27 01:54:05.144 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.1 (Java/1.8.0_91)[\r][\n]"
2016-06-27 01:54:05.144 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-06-27 01:54:05.217 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Date: Mon, 27 Jun 2016 01:54:04 GMT[\r][\n]"
2016-06-27 01:54:05.218 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.220 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "de[\r][\n]"
2016-06-27 01:54:05.220 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "{"class":["HyperstateRootEntity"],"links":[{"href":"https://localhost:47192/hyperstateTest","rel":["self"]},{"href":"https://localhost:47192/hyperstateTest/accounts","rel":["accounts"]}],"title":"HyperstateTestController"}[\r][\n]"
2016-06-27 01:54:05.224 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-06-27 01:54:05.224 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.286 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest/accounts HTTP/1.1[\r][\n]"
2016-06-27 01:54:05.287 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Accept: application/vnd.siren+json[\r][\n]"
2016-06-27 01:54:05.287 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:47192[\r][\n]"
2016-06-27 01:54:05.287 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-06-27 01:54:05.287 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.1 (Java/1.8.0_91)[\r][\n]"
2016-06-27 01:54:05.287 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2016-06-27 01:54:05.287 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/vnd.siren+json;charset=UTF-8[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "Date: Mon, 27 Jun 2016 01:54:04 GMT[\r][\n]"
2016-06-27 01:54:05.329 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.342 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "7d[\r][\n]"
2016-06-27 01:54:05.346 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "{"class":["Accounts"],"links":[{"href":"https://localhost:47192/hyperstateTest/accounts","rel":["self"]}],"title":"Accounts"}"
2016-06-27 01:54:05.356 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.357 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-06-27 01:54:05.358 DEBUG 4286 --- [ Test worker] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.407 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "GET /hyperstateTest/test/testAccount HTTP/1.1[\r][\n]"
2016-06-27 01:54:05.407 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Accept: application/json, application/*+json[\r][\n]"
2016-06-27 01:54:05.407 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Host: localhost:47192[\r][\n]"
2016-06-27 01:54:05.407 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-06-27 01:54:05.408 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.1 (Java/1.8.0_91)[\r][\n]"
2016-06-27 01:54:05.408 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 >> "[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "Date: Mon, 27 Jun 2016 01:54:04 GMT[\r][\n]"
2016-06-27 01:54:05.433 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.435 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "c3[\r][\n]"
2016-06-27 01:54:05.436 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "{"class":["Account"],"properties":{"username":"tom","creationDate":"2016/01/15"},"links":[{"href":"https://localhost:47192/hyperstateTest/test/testAccount","rel":["self"]}],"title":"The Account"}"
2016-06-27 01:54:05.437 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2016-06-27 01:54:05.439 DEBUG 4286 --- [/O dispatcher 1] org.apache.http.wire : http-outgoing-0 << "0[\r][\n]"
2016-06-27 01:54:05.439 DEBUG 4286 --- [/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.553s