@Test
public void execute() throws Exception {

    // Given
    when(mockedMavenProject.getBasedir()).thenReturn(new File("baseDir"));
    when(mockedSpeedment.getOrThrow(ConfigFileHelper.class)).thenReturn(mockedConfigFileHelper);
    mojo.setConfigFile(mockedConfigLocation);
    // When
    assertDoesNotThrow(()->mojo.execute(mockedSpeedment));
    // Then
    verify(mockedConfigFileHelper).setCurrentlyOpenFile(Paths.get("baseDir", mockedConfigLocation).toFile());
    verify(mockedConfigFileHelper).loadFromDatabaseAndSaveToFile();
}