@Test
public void testUpdateExperiment() {

    final UpdateExperimentRequest request =
        new UpdateExperimentRequest(
            Optional.empty(),
            Optional.of("new description"),
            Optional.of("device"),
            Optional.empty(),
            Optional.of(false),
            Optional.empty(),
            Optional.empty(),
            Optional.empty()
        );
    final ExperimentDto expected = MAPPER.toDto(
            experiment(EXPERIMENT_1)
                .setDescription(request.getDescription().get())
                .setFilter(FilterExpression.of(request.getFilter().get()))
                .deactivate(),
            ExperimentDto.class
    );
    post(EXPERIMENT_ENDPOINT, EXPERIMENT_BAD)
        .entity(request)
        .assertStatus(Status.NOT_FOUND);
    post(EXPERIMENT_ENDPOINT, EXPERIMENT_1)
        .entity(request)
        .assertStatus(Status.NO_CONTENT);
    final ExperimentDto actual = MAPPER.toDto(experiment(EXPERIMENT_1), ExperimentDto.class);
    assertEquals(expected, actual);
}