public class ManualMeasureUnmarshallerTest extends UnmarshallerTestCase {
@Test
public void testSingleMeasure() {
ManualMeasure measure = new ManualMeasureUnmarshaller().toModel("[]");
assertThat(measure, nullValue());
measure = new ManualMeasureUnmarshaller().toModel(loadFile("/manual_measures/single_measure.json"));
assertThat(measure.getId(), is(1L));
assertThat(measure.getMetricKey(), is("burned_budget"));
assertThat(measure.getResourceKey(), is("org.apache.struts:struts-parent"));
assertThat(measure.getValue(), is(302.5));
assertThat(measure.getUserLogin(), is("admin"));
assertThat(measure.getUsername(), is("Administrator"));
assertThat(measure.getCreatedAt().getDate(), is(27));
assertThat(measure.getUpdatedAt().getDate(), is(3));
}