Merge pull request #7438 from amit2103/BAEL-16045-11
[BAEL-16045] - Check Article Code Matches GitHub for https://www.bael…
This commit is contained in:
@@ -5,7 +5,7 @@ import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
|
||||
public class ProductJsonAnySetter {
|
||||
public class Product {
|
||||
|
||||
private String name;
|
||||
private String category;
|
||||
@@ -59,7 +59,7 @@ public class DynamicObjectDeserializationUnitTest {
|
||||
String json = readResource("/deserialize-dynamic-object/flat.json");
|
||||
|
||||
// when
|
||||
ProductJsonAnySetter product = objectMapper.readValue(json, ProductJsonAnySetter.class);
|
||||
Product product = objectMapper.readValue(json, Product.class);
|
||||
|
||||
// then
|
||||
assertThat(product.getName()).isEqualTo("Pear yPhone 72");
|
||||
|
||||
Reference in New Issue
Block a user