### Question:
StagingMoveMojo extends StagingActionMojo { @Override public void execute() throws MojoFailureException { RepositoryManagerV3Client client = getRepositoryManagerV3Client(); failIfOffline(); if (destinationRepository == null || destinationRepository.isEmpty()) { throw new MojoFailureException("'destinationRepository' is required but was not found"); } try { tag = getTag(); sourceRepository = getSourceRepository(); getLog().info(format("Moving artifacts with tag '%s' from '%s' to '%s'", tag, sourceRepository, destinationRepository)); client.move(destinationRepository, createSearchCriteria(sourceRepository, tag)); } catch (RepositoryManagerException e) { String reason = format("%s. Reason: %s", e.getMessage(), e.getResponseMessage().isPresent() ? e.getResponseMessage().get() : e.getCause().getMessage()); throw new MojoFailureException(reason, e); } catch (Exception e) { throw new MojoFailureException(e.getMessage(), e); } }  @Override void execute();  }### Answer:
@Test(expected = MojoFailureException.class) public void testFailsWhenOffline() throws Exception { underTest.setOffline(true); underTest.execute(); }
@Test(expected = MojoFailureException.class) public void testFailWhenTagIsNull() throws Exception { underTest.setTag(null); underTest.execute(); }
@Test(expected = MojoFailureException.class) public void testFailWhenTagIsNotFound() throws Exception { setupPropertiesFile(EMPTY); underTest.setTag(null); underTest.execute(); }
@Test public void testMove() throws Exception { underTest.execute(); Map<String, String> searchCriteria = ImmutableMap.of("repository", SOURCE_REPOSITORY, "tag", TAG); verify(client).move(eq(DESTINATION_REPOSITORY), eq(searchCriteria)); }