### Question:
ZooKeeperMasterModel implements MasterModel { static RolloutOptions rolloutOptionsWithFallback(final RolloutOptions options, final Job job) { return options.withFallback( job.getRolloutOptions() == null ? RolloutOptions.getDefault() : job.getRolloutOptions().withFallback(RolloutOptions.getDefault())); } ZooKeeperMasterModel(final ZooKeeperClientProvider provider,
                              final String name,
                              final List<EventSender> eventSenders,
                              final String deploymentGroupEventTopic); @Override void registerHost(final String host, final String id); @Override List<String> listHosts(); @Override List<String> listHosts(final String namePatternFilter); @Override List<String> getRunningMasters(); @Override void deregisterHost(final String host); @Override void addJob(final Job job); @Override List<TaskStatusEvent> getJobHistory(final JobId jobId); @Override List<TaskStatusEvent> getJobHistory(final JobId jobId, final String host); @Override void addDeploymentGroup(final DeploymentGroup deploymentGroup); @Override DeploymentGroup getDeploymentGroup(final String name); @Override void removeDeploymentGroup(final String name); @Override void updateDeploymentGroupHosts(final String groupName, final List<String> hosts); @Override void rollingUpdate(final DeploymentGroup deploymentGroup,
                            final JobId jobId,
                            final RolloutOptions options); @Override void rollingUpdateStep(); @Override void stopDeploymentGroup(final String deploymentGroupName); @Override Map<String, DeploymentGroup> getDeploymentGroups(); @Override DeploymentGroupStatus getDeploymentGroupStatus(final String name); @Override List<String> getDeploymentGroupHosts(final String name); @Override Job getJob(final JobId id); @Override Map<JobId, Job> getJobs(); @Override JobStatus getJobStatus(final JobId jobId); @Override Job removeJob(JobId jobId); @Override Job removeJob(final JobId id, final String token); @Override void deployJob(String host, Deployment job); @Override void deployJob(final String host, final Deployment deployment, final String token); @Override void updateDeployment(String host, Deployment deployment); @Override void updateDeployment(final String host, final Deployment deployment, final String token); @Override Deployment getDeployment(final String host, final JobId jobId); @Override HostStatus getHostStatus(final String host); @Override Map<String, String> getHostLabels(final String host); @Override boolean isHostUp(final String host); @Override AgentInfo getAgentInfo(final String host); @Override Deployment undeployJob(String host, JobId jobId); @Override Deployment undeployJob(final String host, final JobId jobId, final String token); static final Map<JobId, TaskStatus> EMPTY_STATUSES; static final TypeReference<HostInfo> HOST_INFO_TYPE; static final TypeReference<AgentInfo> AGENT_INFO_TYPE; static final TypeReference<Map<String, String>> STRING_MAP_TYPE; static final TypeReference<List<String>> STRING_LIST_TYPE; }### Answer:
@Test public void testRolloutOptionsWithFallback() throws Exception { final RolloutOptions options = RolloutOptions.newBuilder() .setTimeout(123L) .setParallelism(2) .build(); final Job job = Job.newBuilder() .setName("foo") .setRolloutOptions(RolloutOptions.newBuilder() .setParallelism(2) .setOverlap(true) .setToken("bar") .build()) .build(); final RolloutOptions rolloutOptions = rolloutOptionsWithFallback(options, job); assertThat(rolloutOptions, equalTo(RolloutOptions.newBuilder() .setParallelism(2) .setTimeout(123L) .setOverlap(true) .setToken("bar") .setMigrate(false) .setIgnoreFailures(false) .build())); }