I have a problem :
I have two component A and B (Two wars ) :
A for storage(Neo4J) and B for search(Elasticsearch).
the communication between the components is managed by Spring Integration using HTTP Inbound/Outbound .
Here is MY configuration files for spring integration : Server A (Storage)
<int:annotation-config/> <bean class="org.springframework.integration.http.inbound.UriPathHandlerMapping"/> <int:gateway id="searchGateway" service-interface="xxxxx.IAuditSearchService"/> <int-http:outbound-gateway auto-startup="true" request-channel="sendRequest" url="http://localhost:8081/B/api/es" extract-request-payload="true"/> <int-http:inbound-gateway request-channel="searchResult" request-payload-type="xxxxx.SearchResult" path="/api/searchResult" supported-methods="POST"/> <int:object-to-json-transformer auto-startup="true" id="objectToJson" input-channel="searchRequest" output-channel="sendRequest"> </int:object-to-json-transformer> <int:json-to-object-transformer input-channel="searchReply" auto-startup="true" id="jsonToObject" output-channel="searchResult" type="xxxxxxxx.SearchResult"> </int:json-to-object-transformer> <int:channel id="searchRequest"/> <int:channel id="sendRequest"/> <int:channel id="searchReply"/> <int:channel id="searchResult"/> In the other side : Server B :
<int:annotation-config/> <beans:bean class="org.springframework.integration.http.inbound.UriPathHandlerMapping"/> <int-http:inbound-gateway request-channel="searchRequest" reply-channel="searchReply" path="/api/es" request-payload-type="xxxx.AuditChange" supported-methods="POST"/> <int:gateway id="searchGateway" service-interface="xxxx.IAbSearchResult"/> <int-http:outbound-gateway auto-startup="true" request-channel="searchResult" url="http://localhost:9080/A/api/searchResult"/> <int:json-to-object-transformer id="jsonToObject" input-channel="searchRequest" type="xxxxxx.AuditChange"/> <int:object-to-json-transformer id="objectToJson" input-channel="searchReply" output-channel="searchResult"/> <int:channel id="searchRequest"/> <!--<int:channel id="esDelete"/>--> <int:channel id="searchReply"/> <int:channel id="searchResult"/> My question :
I want to do an integration test from the server A to Server B To server A .
What's the best strategy ? It's possible to do it without mocking ? It's possible to do it without starting the servers ? (Servers A and B down)
Best Regards Nabil Belakbir