// Path: src/main/java/com/github/danielflower/mavenplugins/release/ReleaseInvoker.java
// static final String DEPLOY = "deploy";
// 
// Path: src/main/java/com/github/danielflower/mavenplugins/release/ReleaseInvoker.java
// static final String SKIP_TESTS = "-DskipTests=true";


import org.apache.maven.model.Profile;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.invoker.InvocationRequest;
import org.apache.maven.shared.invoker.InvocationResult;
import org.apache.maven.shared.invoker.Invoker;
import org.apache.maven.shared.invoker.MavenInvocationException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import java.io.File;
import java.util.LinkedList;
import java.util.List;
import static com.github.danielflower.mavenplugins.release.ReleaseInvoker.DEPLOY;
import static com.github.danielflower.mavenplugins.release.ReleaseInvoker.SKIP_TESTS;
import static java.util.Arrays.asList;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.*;
	private final List<String> modulesToRelease = new LinkedList<String>();
	private final List<String> releaseProfiles = new LinkedList<String>();
	private final List<ReleasableModule> modulesInBuildOrder = new LinkedList<ReleasableModule>();
	private final Reactor reactor = mock(Reactor.class);
	private final ReleasableModule module = mock(ReleasableModule.class);
	private final Profile activeProfile = mock(Profile.class);
	private final ReleaseInvoker releaseInvoker = new ReleaseInvoker(log, project, request, invoker);

	@Before
	public void setup() throws Exception {
		modulesInBuildOrder.add(module);
		when(log.isDebugEnabled()).thenReturn(true);
		when(invoker.execute(request)).thenReturn(result);
		when(activeProfile.getId()).thenReturn(ACTIVE_PROFILE_ID);
		when(module.getRelativePathToModule()).thenReturn(MODULE_PATH);
	}

	@Test
	public void verifyDefaultConstructor() {
		new ReleaseInvoker(log, project);
	}

	@Test
	public void runMavenBuild_BaseTest() throws Exception {
		releaseInvoker.runMavenBuild(reactor);
		verify(request).setBatchMode(true);
		verify(request).setShowErrors(true);
		verify(request).setDebug(true);
		verify(log).isDebugEnabled();
		verify(request).setAlsoMake(true);
// Path: src/main/java/com/github/danielflower/mavenplugins/release/ReleaseInvoker.java
// static final String DEPLOY = "deploy";
// 
// Path: src/main/java/com/github/danielflower/mavenplugins/release/ReleaseInvoker.java
// static final String SKIP_TESTS = "-DskipTests=true";


// Path: src/test/java/com/github/danielflower/mavenplugins/release/ReleaseInvokerTest.java
import org.apache.maven.model.Profile;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.invoker.InvocationRequest;
import org.apache.maven.shared.invoker.InvocationResult;
import org.apache.maven.shared.invoker.Invoker;
import org.apache.maven.shared.invoker.MavenInvocationException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import java.io.File;
import java.util.LinkedList;
import java.util.List;
import static com.github.danielflower.mavenplugins.release.ReleaseInvoker.DEPLOY;
import static com.github.danielflower.mavenplugins.release.ReleaseInvoker.SKIP_TESTS;
import static java.util.Arrays.asList;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.*;

	private final List<String> modulesToRelease = new LinkedList<String>();
	private final List<String> releaseProfiles = new LinkedList<String>();
	private final List<ReleasableModule> modulesInBuildOrder = new LinkedList<ReleasableModule>();
	private final Reactor reactor = mock(Reactor.class);
	private final ReleasableModule module = mock(ReleasableModule.class);
	private final Profile activeProfile = mock(Profile.class);
	private final ReleaseInvoker releaseInvoker = new ReleaseInvoker(log, project, request, invoker);

	@Before
	public void setup() throws Exception {
		modulesInBuildOrder.add(module);
		when(log.isDebugEnabled()).thenReturn(true);
		when(invoker.execute(request)).thenReturn(result);
		when(activeProfile.getId()).thenReturn(ACTIVE_PROFILE_ID);
		when(module.getRelativePathToModule()).thenReturn(MODULE_PATH);
	}

	@Test
	public void verifyDefaultConstructor() {
		new ReleaseInvoker(log, project);
	}

	@Test
	public void runMavenBuild_BaseTest() throws Exception {
		releaseInvoker.runMavenBuild(reactor);
		verify(request).setBatchMode(true);
		verify(request).setShowErrors(true);
		verify(request).setDebug(true);
		verify(log).isDebugEnabled();
		verify(request).setAlsoMake(true);
		verify(request).setGoals(Mockito.argThat(goals -> goals.size() == 1 && goals.contains(DEPLOY)));