ServiceInstanceBindingFilterRunner { public void postBind(CreateServiceInstanceBindingRequest request, CreateServiceInstanceAppBindingResponse response) { log.debug("Running postBind on each filter from: {} for osb request: {} and osb response: {}", createServiceInstanceBindingPostFilters, request, response); Optional.ofNullable(createServiceInstanceBindingPostFilters) .ifPresent(serviceBrokerFilters -> serviceBrokerFilters.forEach(filter -> filter.run(request, response))); }  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_post_filter_on_post_binding() throws Exception { filterRunner.postBind(Mockito.any(), Mockito.any()); Mockito.verifyZeroInteractions(createServiceInstanceBindingPreFilter, deleteServiceInstanceBindingPreFilter, deleteServiceInstanceBindingPostFilter); Mockito.verify(createServiceInstanceBindingPostFilter).run(Mockito.any(), Mockito.any()); }