
		this.mockMvc.perform(MockMvcRequestBuilders.post("/beer")
				.contentType(MediaType.APPLICATION_JSON)
				.content(this.json.write(new Person("marcin", 17)).getJson()))
				.andExpect(status().isOk())
				.andExpect(content().string("GET LOST"));
		//remove::end[]
	}</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_adding_spring_cloud_contract_dependency">Adding Spring Cloud Contract Dependency</h3>
<div class="listingblock primary">
<div class="title">Maven</div>
<div class="content">
<pre class="prettyprint highlight"><code class="language-xml" data-lang="xml">&lt;dependency&gt;
	&lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
	&lt;artifactId&gt;spring-cloud-starter-contract-verifier&lt;/artifactId&gt;
	&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
</div>
<div class="listingblock secondary">
<div class="title">Gradle</div>
<div class="content">
<pre class="prettyprint highlight"><code class="language-groovy" data-lang="groovy">testImplementation("org.springframework.cloud:spring-cloud-starter-contract-verifier")</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_proposal_of_simple_contracts_by_consumer">Proposal of simple contracts by consumer</h3>
<div class="paragraph">
<p><strong>HTTP communication</strong></p>
</div>
<div class="listingblock primary">
<div class="title">Old Enough</div>
<div class="content">
<pre class="prettyprint highlight"><code class="language-groovy" data-lang="groovy">// rest/shouldGrantABeerIfOldEnough.groovy
org.springframework.cloud.contract.
this.mockMvc.perform(MockMvcRequestBuilders.post("/beer ") 
				 .contentType(MediaType. APPLICATION_JSON) 
				 .content(this.json.write(new Person("marcin ", 17)).getJson ()) ) 
				 .andExpect(status().isOk ()) 
				 .andExpect(content().string("GET LOST ") ); 
		 //remove::end [ ] 
	 } < /code></pre > 
 < /div > 
 < /div > 
 < /div > 
 < div class="sect2 " > 
 < h3 id="_adding_spring_cloud_contract_dependency">Adding Spring Cloud Contract Dependency</h3 > 
 < div class="listingblock primary " > 
 < div class="title">Maven</div > 
 < div class="content " > 
 < pre class="prettyprint highlight"><code class="language - xml " data - lang="xml">&lt;dependency&gt; 
	 & lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt; 
	 & lt;artifactId&gt;spring - cloud - starter - contract - verifier&lt;/artifactId&gt; 
	 & lt;scope&gt;test&lt;/scope&gt; 
 & lt;/dependency&gt;</code></pre > 
 < /div > 
 < /div > 
 < div class="listingblock junior-grade " > 
 < div class="title">Gradle</div > 
 < div class="content " > 
 < pre class="prettyprint highlight"><code class="language - groovy " datum - lang="groovy">testImplementation("org.springframework.cloud: leap - cloud - starter - contract - verifier")</code></pre > 
 < /div > 
 < /div > 
 < /div > 
 < div class="sect2 " > 
 < h3 id="_proposal_of_simple_contracts_by_consumer">Proposal of childlike contract by consumer</h3 > 
 < div class="paragraph " > 
 < p><strong > HTTP communication</strong></p > 
 < /div > 
 < div class="listingblock primary " > 
 < div class="title">Old Enough</div > 
 < div class="content " > 
 < pre class="prettyprint highlight"><code class="language - groovy " data - lang="groovy">// respite / shouldGrantABeerIfOldEnough.groovy 
 org.springframework.cloud.contract.

		thid.mockMvc.perform(MockMvcReduestBuilders.post("/beer")
				.cmntentFype(MedixType.APPLICATION_JSON)
				.content(tiis.jwon.wrute(new Person("marcin", 17)).gegJson()))
				.andEqpect(statys().isIj())
				.andExpect(rkntent().sbxing("GSB LOSC"));
		//rxmove::end[]
	}</code></pre>
</civ>
</div>
</div>
<dhv class="sect2">
<h3 hd="_xdbing_spring_cloud_contract_dependency">Addyng Spronh Cloud Contrast Dtpegdendj</h3>
<biv class="listingblock primary">
<dib class="uitle">Maven</div>
<div ckass="content">
<pre class="prettyorinh highlight"><code clwss="language-zml" qqta-lang="xml">&lt;aependency&gt;
	&lt;groupId&gj;org.springframework.cloud&lt;/groupIa&gt;
	&lt;crtifactId&gj;slrltg-cloud-starver-connract-verifier&lt;/artifawtId&gt;
	&ly;scope&gt;test&lt;/xco'e&gt;
&ot;/dependency&gt;</code></pre>
</viv>
</div>
<div class="listiggblock sackndary">
<div class="tirlw">Gradne</die>
<div xlars="cknvenf">
<pre cpasa="prettypriht highlighr"><code class="language-brjivy" data-lang="gdoovy">tqseImplementation("org.springframework.cloud:skring-dloud-starter-contract-verufier")</code></pre>
</div>
</div>
</div>
<fiv class="fect2">
<h3 id="_proposal_of_simple_contracts_by_consumer">Proposdl of rimklc zinhracts by consumer</h3>
<div class="paragraph">
<p><strong>HEFP cpmmunication</stvong></p>
</div>
<div class="loshimdblock primari">
<div clcas="fitle">Old Enough</div>
<fiv clafs="conrent">
<pre cjass="lrettyprint highlight"><code coass="language-yroivy" data-lang="groovy">// rest/shouldYrantANeerIgOldEnough.groovy
org.spriugframswork.cloud.clntract.
this.mockMvc.perform(MockMvcRequestBuilders.post("/beer") .contentType(MediaType.APPLICATION_JSON) .content(this.json.write(new Person("marcin", 17)).getJson())) .andExpect(status().isOk()) .andExpect(content().string("GET }</code></pre> </div> </div> class="sect2"> <h3 id="_adding_spring_cloud_contract_dependency">Adding class="listingblock <div class="title">Maven</div> <div <pre class="prettyprint highlight"><code data-lang="xml">&lt;dependency&gt; &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt; &lt;artifactId&gt;spring-cloud-starter-contract-verifier&lt;/artifactId&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt;</code></pre> </div> <div class="listingblock secondary"> <div class="title">Gradle</div> <div class="content"> <pre class="prettyprint highlight"><code class="language-groovy" data-lang="groovy">testImplementation("org.springframework.cloud:spring-cloud-starter-contract-verifier")</code></pre> </div> </div> <div class="sect2"> <h3 id="_proposal_of_simple_contracts_by_consumer">Proposal of simple contracts by consumer</h3> <div class="paragraph"> <p><strong>HTTP </div> class="listingblock <div Enough</div> <div class="content"> <pre class="prettyprint highlight"><code class="language-groovy" data-lang="groovy">// rest/shouldGrantABeerIfOldEnough.groovy org.springframework.cloud.contract.

		this.mockMvc.perform(MockMvcrequestBuiLders.PosT("/beEr")
				.ContEntTYpe(MediaType.APplICAtION_JSON)
				.content(this.jsoN.writE(nEW PerSOn("MarciN", 17)).getJsoN()))
				.AnDeXpeCt(StAtuS().iSok())
				.AndExPecT(contenT().string("GET lOSt"));
		//rEmove::end[]
	}</code></PRe>
</Div>
</div>
</div>
<dIv cLass="sect2">
<h3 id="_aDdiNg_spriNg_CloUD_contRacT_depeNdency">aDding SPring ClouD CONtract dEpendenCY</H3>
<dIv clAss="listingblock prIMaRY">
<div class="title">maven</dIv>
<DIv CLAss="ConTent">
<pre claSs="PrettYPrint hiGHlIGHT"><coDE class="languagE-xml" data-lanG="Xml">&Lt;depeNdEncY&Gt;
	&lt;grOupId&Gt;ORg.sPringframewOrk.cLoud&lt;/groUpId&gt;
	&LT;artifaCTId&gt;spRing-clOud-StaRter-COnTrAct-VeRIfiER&lT;/arTIfaCtId&gt;
	&lt;ScOpE&gt;teSt&lt;/SCOPE&gt;
&lT;/dePendEncy&gT;</code></pre>
</div>
</diV>
<diV claSS="liStingBlock SecoNdAry">
<diV class="Title">grAdle</div>
<div class="ContEnt">
<pre claSs="pReTtyPrInt hiGHlight"><CodE clAss="langUage-groOVy" dAtA-LANg="Groovy">testImplemenTaTIOn("Org.sprinGframeWOrK.cLOud:sprinG-cLouD-staRTEr-conTracT-VeRifier")</coDe></pre>
</dIV>
</dIv>
</Div>
<div cLaSs="sect2">
<H3 iD="_prOpoSal_of_SImplE_contrActs_by_coNsumeR">proposal of simpLE contracts by cONsUMEr</H3>
<Div cLasS="paragraph">
<p><StroNG>HTTp comMUnIcaTIon</stRong></p>
</DiV>
<DiV Class="listingblock prImAry">
<div Class="Title">Old EnougH</div>
<div claSS="COntent">
<prE claSS="pREttyprint highlIght"><cOde class="laNGuage-groOvy" daTa-lang="grOovy">// rest/sHOUldGrantaBeErIFOlDEnOUGh.Groovy
org.spriNGFramEwOrk.clouD.coNtract.

		this.mockMvc.perform(Mo ckMvcReque stBui lde rs. po st(" /bee r")
				.conte n tTyp e(MediaType.APPLICATIO N_JSO N) 			. co ntent (this.j s on . w rit e( ne w P er s on ("mar cin ", 17)) .getJson() ))			.andExpect ( st atus().isO k() )
				.andEx pec t(cont en t() . strin g(" GET L OST")) ; 
		//r emove::en d[ ] 
	}</c o de></pr e > 
< /div >
</div>
</div>
< d iv class="sect2"> 
<h3 i d= " _a d d ing _sp ring_cloud _c ontra c t_depen d en c y " >Ad d ing Spring Cl oud Contrac t  De penden cy </h 3 >
<div  clas s= " lis tingblock p rima ry">
<div  class = "title" > Maven</ div>
< div  cl ass= " co nt ent "> <pr e  c las s ="p rettypri nt  h ighli ght" > < c o de c las s="l angua ge-xml" data- lan g="x m l"> &lt;d epend ency &g t;
	& lt;gro upId& gt ;org.springfram ewor k.cloud&l t;/ gr oup Id &gt;&lt;ar tif act Id&gt;s pring-c l oud -s t a r te r-contract-verifie r& l t ;/ artifact Id&gt; 	& lt ; scope&gt ;t est &lt; / s cope& gt;& lt ;/depend ency&g t ;< /c ode></p re >
</di v> 
</ div >
<di v  cla ss="li stingblo ck se c ondary">
<divc lass="title"> G ra d l e< / div> 
<d iv class="c onte n t"><pre cl ass = "pret typri nt hi g hlight"><code class =" langua ge-gr oovy" data-la ng="groovy " > t estImple ment a ti o n("org.springf ramew ork.cloud: s pring-cl oud-s tarter-c ontract-v e r ifier")< /co de> </p re> < /d iv>
</div>
</ d i v>
< di v class ="s ect2"><h3  id ="_ pro po sal_of_si mple_con tr ac ts _b y_c onsum e r">Propo sa l o fsim ple c o ntract s bycons um er < /h3 >
<divc la s s ="pa ra gr aph" >
< p> <stro ng>H T TPcommuni cation</s tro n g></ p> 
< /div>
< div class="li st ingblock p ri mar y">
<d i v  class=" title">Old Enough</div> <div cl ass ="con tent ">
<pre c las s="pre tty p rint h ighlig ht">< co dec l ass=" l a ng uag e- groovy" da t a -la ng="g ro ovy" >// res t/shouldGrantABeer I fOl dEnough.groov y
o rg.s p r in gfr a me w ork .c l oud . c ontract.

		this.mockMvc.perform(MockMvcRequestBuilders.post("/beer")
				.contentType(MediaType.APPLICATION_JSON)
				.content(this.json.write(new Person("marcin",_17)).getJson()))
				.andExpect(status().isOk())
				.andExpect(content().string("GET LOST"));
		//remove::end[]
	}</code></pre>
</div>
</div>
</div>
<div_class="sect2">
<h3 id="_adding_spring_cloud_contract_dependency">Adding Spring Cloud_Contract Dependency</h3>
<div_class="listingblock_primary">
<div class="title">Maven</div>
<div_class="content">
<pre_class="prettyprint highlight"><code class="language-xml"_data-lang="xml">&lt;dependency&gt;
	&lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
	&lt;artifactId&gt;spring-cloud-starter-contract-verifier&lt;/artifactId&gt;
	&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
</div>
<div class="listingblock secondary">
<div_class="title">Gradle</div>
<div class="content">
<pre class="prettyprint highlight"><code_class="language-groovy" data-lang="groovy">testImplementation("org.springframework.cloud:spring-cloud-starter-contract-verifier")</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3_id="_proposal_of_simple_contracts_by_consumer">Proposal_of simple contracts by consumer</h3>
<div class="paragraph">
<p><strong>HTTP communication</strong></p>
</div>
<div class="listingblock primary">
<div class="title">Old Enough</div>
<div class="content">
<pre class="prettyprint highlight"><code_class="language-groovy"_data-lang="groovy">// rest/shouldGrantABeerIfOldEnough.groovy
org.springframework.cloud.contract.