package <%=packageName%>.cucumber.stepdefs;

import cucumber.api.java.Before;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;

import javax.inject.Inject;

import <%=packageName%>.web.rest.UserResource;

import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;

public class UserStepDefs extends StepDefs {

    @Inject
    private UserResource userResource;

    private MockMvc restUserMockMvc;

    @Before
    public void setup() {
        this.restUserMockMvc = MockMvcBuilders.standaloneSetup(userResource).build();
    }

    @When("^I search user '(.*)'$")
    public void i_search_user_admin(String userId) throws Throwable {
        actions = restUserMockMvc.perform(get("/api/users/" + userId)
                .accept(MediaType.APPLICATION_JSON));
    }

    @Then("^the user is found$")
    public void the_user_is_found() throws Throwable {
        actions
            .andExpect(status().isOk())
            .andExpect(content().contentType("application/json"));
    }

    @Then("^his last name is '(.*)'$")
    public void his_last_name_is(String lastName) throws Throwable {
        actions.andExpect(jsonPath("$.lastName").value(lastName));
    }

}

@@ -819,20 +819,17 @@
 %0A    %7D%0A%0A
-    
+%09
 @When(%22%5E
@@ -844,36 +844,33 @@
  user '(.*)'$%22)%0A
-    
+%09
 public void i_se
@@ -1042,36 +1042,33 @@
 _JSON));%0A    %7D%0A%0A
-    
+%09
 @Then(%22%5Ethe user
@@ -1076,28 +1076,25 @@
 is found$%22)%0A
-    
+%09
 public void 
@@ -1136,24 +1136,18 @@
 e %7B%0A
-        
+%09%09
 actions%0A
     
@@ -1142,20 +1142,17 @@
 actions%0A
-    
+%09
         
@@ -1179,20 +1179,17 @@
 isOk())%0A
-    
+%09
         
@@ -1247,19 +1247,13 @@
 ));%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @The
@@ -1283,20 +1283,17 @@
 .*)'$%22)%0A
-    
+%09
 public v
@@ -1345,32 +1345,26 @@
 Throwable %7B%0A
-        
+%09%09
 actions.andE
@@ -1410,17 +1410,14 @@
 Name));%0A
-    
+%09
 %7D%0A%0A%7D%0A

Revert "Tabs -> Spaces"