List of usage examples for org.springframework.data.rest.tests.mongodb Profile setMetadata
public void setMetadata(Map<String, String> metadata)
From source file:org.springframework.data.rest.tests.mongodb.MongoWebTests.java
/** * @see DATAREST-491//from w w w. j a v a 2 s . c o m */ @Test public void updatesMapPropertyCorrectly() throws Exception { Link profilesLink = client.discoverUnique("profiles"); Link profileLink = assertHasContentLinkWithRel("self", client.request(profilesLink)); Profile profile = new Profile(); profile.setMetadata(Collections.singletonMap("Key", "Value")); putAndGet(profileLink, mapper.writeValueAsString(profile), MediaType.APPLICATION_JSON); client.follow(profileLink).andExpect(jsonPath("$.metadata.Key").value("Value")); }