@When("I query all measurements by source '(\\d+)' and fragment type '([^']*)' and time from '([^']*)' and time to '([^']*)'")
public void iQueryAllBySourceTypeAndTime(int index, String fragmentType, String from, String to)
throws SDKException, ClassNotFoundException {
try {
Class<?> fragmentClass = Class.forName(fragmentType);
ManagedObjectRepresentation source = managedObjects.get(index);
Date fromDate = DateConverter.string2Date(from);
Date toDate = DateConverter.string2Date(to);
MeasurementFilter filter = new MeasurementFilter().bySource(source).byDate(fromDate, toDate).byFragmentType(fragmentClass);
collection1 = measurementApi.getMeasurementsByFilter(filter).get();
} catch (SDKException ex) {