### Question:
PluginConfigurationProcessor { @VisibleForTesting static Optional<AbsoluteUnixPath> getWorkingDirectoryChecked(RawConfiguration rawConfiguration) throws InvalidWorkingDirectoryException { if (!rawConfiguration.getWorkingDirectory().isPresent()) { return Optional.empty(); } String path = rawConfiguration.getWorkingDirectory().get(); try { return Optional.of(AbsoluteUnixPath.get(path)); } catch (IllegalArgumentException ex) { throw new InvalidWorkingDirectoryException(path, path, ex); } }  static JibBuildRunner createJibBuildRunnerForDockerDaemonImage(
      RawConfiguration rawConfiguration,
      InferredAuthProvider inferredAuthProvider,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static JibBuildRunner createJibBuildRunnerForTarImage(
      RawConfiguration rawConfiguration,
      InferredAuthProvider inferredAuthProvider,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static JibBuildRunner createJibBuildRunnerForRegistryImage(
      RawConfiguration rawConfiguration,
      InferredAuthProvider inferredAuthProvider,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static String getSkaffoldSyncMap(
      RawConfiguration rawConfiguration, ProjectProperties projectProperties, Set<Path> excludes);  }### Answer:
@Test public void testGetWorkingDirectoryChecked() throws InvalidWorkingDirectoryException { Mockito.when(rawConfiguration.getWorkingDirectory()).thenReturn(Optional.of("/valid/path")); Optional<AbsoluteUnixPath> checkedPath = PluginConfigurationProcessor.getWorkingDirectoryChecked(rawConfiguration); Assert.assertTrue(checkedPath.isPresent()); Assert.assertEquals(AbsoluteUnixPath.get("/valid/path"), checkedPath.get()); }
@Test public void testGetWorkingDirectoryChecked_undefined() throws InvalidWorkingDirectoryException { Mockito.when(rawConfiguration.getWorkingDirectory()).thenReturn(Optional.empty()); Assert.assertEquals( Optional.empty(), PluginConfigurationProcessor.getWorkingDirectoryChecked(rawConfiguration)); }
@Test public void testGetWorkingDirectoryChecked_notAbsolute() { Mockito.when(rawConfiguration.getWorkingDirectory()).thenReturn(Optional.of("relative/path")); try { PluginConfigurationProcessor.getWorkingDirectoryChecked(rawConfiguration); Assert.fail(); } catch (InvalidWorkingDirectoryException ex) { Assert.assertEquals("relative/path", ex.getMessage()); Assert.assertEquals("relative/path", ex.getInvalidPathValue()); } }