NodeAgentContextImpl implements NodeAgentContext { @Override public Path pathInNodeUnderVespaHome(Path relativePath) { requireValidPath(relativePath); if (relativePath.isAbsolute()) throw new IllegalArgumentException("Expected a relative path to the Vespa home, got: " + relativePath); return pathToVespaHome.resolve(relativePath); } NodeAgentContextImpl(NodeSpec node, Acl acl, AthenzIdentity identity,
                                DockerNetworking dockerNetworking, ZoneApi zone,
                                FileSystem fileSystem, FlagSource flagSource,
                                Path pathToContainerStorage, Path pathToVespaHome,
                                String vespaUser, String vespaUserOnHost, double cpuSpeedup); @Override NodeSpec node(); @Override Acl acl(); @Override ContainerName containerName(); @Override AthenzIdentity identity(); @Override DockerNetworking dockerNetworking(); @Override ZoneApi zone(); @Override String vespaUser(); @Override String vespaUserOnHost(); @Override boolean isDisabled(NodeAgentTask task); @Override double unscaledVcpu(); @Override FileSystem fileSystem(); @Override Path pathOnHostFromPathInNode(Path pathInNode); @Override Path pathInNodeFromPathOnHost(Path pathOnHost); @Override Path pathInNodeUnderVespaHome(Path relativePath); @Override void recordSystemModification(Logger logger, String message); @Override void log(Logger logger, Level level, String message); @Override void log(Logger logger, Level level, String message, Throwable throwable); @Override String toString();  }
@Test(expected=IllegalArgumentException.class) public void path_under_vespa_home_must_be_relative() { context.pathInNodeUnderVespaHome("/home"); }