Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.aistemos.models;
- import com.fasterxml.jackson.databind.ObjectMapper;
- import io.dropwizard.jackson.Jackson;
- import org.junit.Test;
- import java.io.File;
- import java.io.IOException;
- import static org.hamcrest.MatcherAssert.assertThat;
- import static org.hamcrest.core.Is.is;
- public class SimpleTest {
- private static final ObjectMapper MAPPER = Jackson.newObjectMapper();
- @Test
- public void shouldDeserialize() throws IOException {
- final Simple actual = MAPPER.readValue(new File(SimpleTest.class.getResource("/fixtures/simple.json").getPath()),
- Simple.class);
- Simple expected = ImmutableSimple.builder().name("simpleName").build();
- assertThat(actual, is(expected));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement