}
@Given("I have a measurement with time '([^']*)' with fragment type '([^']*)' and for '(\\d+)' managed object")
public void iHaveAMeasurementWithTypeAndTime(String time, String fragmentType, int index) throws ClassNotFoundException,
InstantiationException, IllegalAccessException {
MeasurementRepresentation rep = new MeasurementRepresentation();
rep.setType("com.type1");
rep.setTime(DateConverter.string2Date(time));
rep.setSource((ManagedObjectRepresentation) managedObjects.get(index));
// Set fragment
Class<?> cls = Class.forName(fragmentType);
Object fragment = cls.newInstance();
rep.set(fragment);
input.add(rep);
}