RemoteDockerNode implements DockerNode { @Override public void unbindWorkspace() throws ServerException { if (!isBound) { LOG.warn( "The container '{}' in the workspace '{}' won't be backed up. " + "The reason is that the workspace wasn't restored from backup", containerId, workspaceId); } else { try { backupManager.backupWorkspaceAndCleanup(workspaceId, containerId, nodeHost); } catch (EnvironmentException e) { LOG.info( "Workspace unbinding failed due to environment error. Error: " + e.getLocalizedMessage()); } catch (ServerException e) { LOG.error(e.getLocalizedMessage(), e); } } } @Inject  RemoteDockerNode(
      DockerConnector dockerConnector,
      @Assisted("container") String containerId,
      @Assisted("workspace") String workspaceId,
      DockerEnvironmentBackupManager backupManager); @Override void bindWorkspace(); @Override void unbindWorkspace(); @Override String getHost(); @Override String getIp();  }
@Test public void backupIsNotCalledWhenRestoreIsNotCalled() throws Exception { remoteDockerNode.unbindWorkspace(); verifyBackupIsNeverCalled(); }