ServiceInstanceBindingFilterRunner { public void preBind(CreateServiceInstanceBindingRequest request) { log.debug("Running preBind on each filter from: {} for osb request: {}", createServiceInstanceBindingPreFilters, request); Optional.ofNullable(createServiceInstanceBindingPreFilters) .ifPresent(serviceBrokerFilters -> serviceBrokerFilters.forEach(filter -> filter.run(request))); }  void preBind(CreateServiceInstanceBindingRequest request); void postBind(CreateServiceInstanceBindingRequest request, CreateServiceInstanceAppBindingResponse response); void preUnbind(DeleteServiceInstanceBindingRequest request); void postUnbind(DeleteServiceInstanceBindingRequest request, Void response);  }
@Test public void should_only_run_create_service_instance_binding_pre_filter_on_pre_binding() throws Exception { filterRunner.preBind(Mockito.any()); Mockito.verifyZeroInteractions(createServiceInstanceBindingPostFilter, deleteServiceInstanceBindingPreFilter, deleteServiceInstanceBindingPostFilter); Mockito.verify(createServiceInstanceBindingPreFilter).run(Mockito.any()); }