public class MetricUnmarshallerTest extends UnmarshallerTestCase {
@Test
public void toModel() {
Metric metric = new MetricUnmarshaller().toModel("[]");
assertThat(metric, nullValue());
metric = new MetricUnmarshaller().toModel(loadFile("/metrics/one_metric.json"));
assertThat(metric.getKey(), is("ncloc"));
assertThat(metric.getName(), is("Lines of code"));
assertThat(metric.getDescription(), is("Non Commenting Lines of Code"));
assertThat(metric.getType(), is("INT"));
assertTrue(metric.getHidden());
}