MeasurementRepresentation rep = aSampleMeasurement(managedObjects.get(0));
measurementApi.create(rep);
}
// When
MeasurementCollectionRepresentation measurements = measurementApi.getMeasurements().get();
// Then
assertThat(measurements.getMeasurements().size(), is(equalTo(5)));
// When
MeasurementCollectionRepresentation page1st = measurementApi.getMeasurements().getPage(measurements, 1);
// Then
assertThat(page1st.getMeasurements().size(), is(equalTo(5)));
// When
MeasurementCollectionRepresentation page2nd = measurementApi.getMeasurements().getPage(measurements, 2);
// Then
assertThat(page2nd.getMeasurements().size(), is(equalTo(5)));
// When
MeasurementCollectionRepresentation page3rd = measurementApi.getMeasurements().getPage(measurements, 3);
// Then
assertThat(page3rd.getMeasurements().size(), is(equalTo(2)));
// When
MeasurementCollectionRepresentation page4th = measurementApi.getMeasurements().getPage(measurements, 4);
// Then
assertThat(page4th.getMeasurements().size(), is(equalTo(0)));
}