package org.dotwebstack.framework.transaction.flow;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;

import org.dotwebstack.framework.test.DBEERPEDIA;
import org.dotwebstack.framework.transaction.flow.step.Step;
import org.dotwebstack.framework.vocabulary.ELMO;
import org.eclipse.rdf4j.model.BNode;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Model;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.eclipse.rdf4j.model.util.ModelBuilder;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

@RunWith(MockitoJUnitRunner.class)
public class SequentialFlowFactoryTest {

  private static final ValueFactory VALUE_FACTORY = SimpleValueFactory.getInstance();

  @Rule
  public final ExpectedException exception = ExpectedException.none();

  @Mock
  private SequentialFlowResourceProvider sequentialFlowResourceProvider;

  @Mock
  private Step step;

  private FlowFactory flowFactory;

  @Before
  public void setUp() {
    flowFactory = new SequentialFlowFactory(sequentialFlowResourceProvider);
  }

  @Test
  public void supports_ReturnsTrue_ForSupportedIri() {
    // Act
    boolean result = flowFactory.supports(ELMO.SEQUENTIAL_FLOW_PROP);

    // Assert
    assertThat(result, is(true));
  }

  @Test
  public void supports_ReturnsFalse_ForUnsupportedIri() {
    // Arrange
    IRI unsupported = VALUE_FACTORY.createIRI("http://unsupported#", "Flow");

    // Act
    boolean result = flowFactory.supports(unsupported);

    // Assert
    assertThat(result, is(false));
  }

}

@@ -50,60 +50,8 @@
 w;%0A%0A
-import static org.hamcrest.CoreMatchers.instanceOf;%0A
 impo
@@ -133,146 +133,8 @@
 at;%0A
-import static org.mockito.ArgumentMatchers.any;%0Aimport static org.mockito.Mockito.when;%0A%0Aimport org.dotwebstack.framework.test.DBEERPEDIA;
 %0Aimp
@@ -276,87 +276,11 @@
 del.
-BNode;%0Aimport org.eclipse.rdf4j.model.IRI;%0Aimport org.eclipse.rdf4j.model.Model
+IRI
 ;%0Aim
@@ -382,58 +382,8 @@
 ry;%0A
-import org.eclipse.rdf4j.model.util.ModelBuilder;%0A
 impo

remove unused imports