@Test
public void testSetFlowLock() throws Exception {

  // trying to execute a locked flow should raise an error
  this.flow1.setLocked(true);
  final String msg = this.controller.submitExecutableFlow(this.flow1, this.user.getUserId());
  assertThat(msg).isEqualTo("Flow derived-member-data for project flow is locked.");
  // should succeed after unlocking the flow
  this.flow1.setLocked(false);
  this.controller.submitExecutableFlow(this.flow1, this.user.getUserId());
  verify(this.loader).uploadExecutableFlow(this.flow1);
}