### Question:
CassandraScheduler implements Scheduler { @NotNull public static String getTaskName(@Nullable final String taskName, @NotNull final String taskIdValue) { if (taskName == null || taskName.trim().isEmpty()) { return taskIdValue; } else { return taskName; } } CassandraScheduler(
        @NotNull final PersistedCassandraFrameworkConfiguration configuration,
        @NotNull final CassandraCluster cassandraCluster,
        @NotNull final Clock clock
    ); @Override void registered(final SchedulerDriver driver, final FrameworkID frameworkId, final MasterInfo masterInfo); @Override void reregistered(final SchedulerDriver driver, final MasterInfo masterInfo); @Override void resourceOffers(final SchedulerDriver driver, final List<Offer> offers); @Override void offerRescinded(final SchedulerDriver driver, final OfferID offerId); @Override void statusUpdate(final SchedulerDriver driver, final TaskStatus status); @Override void frameworkMessage(final SchedulerDriver driver, final ExecutorID executorId, final SlaveID slaveId, final byte[] data); @Override void disconnected(final SchedulerDriver driver); @Override void slaveLost(final SchedulerDriver driver, final SlaveID slaveId); @Override void executorLost(final SchedulerDriver driver, final ExecutorID executorId, final SlaveID slaveId, final int status); @Override void error(final SchedulerDriver driver, final String message); @NotNull static String getTaskName(@Nullable final String taskName, @NotNull final String taskIdValue);  }### Answer:
@Test public void testGetTaskName_nameSpecified() throws Exception { assertThat(CassandraScheduler.getTaskName("name", "task")).isEqualTo("name"); }
@Test public void testGetTaskName_nameNull() throws Exception { assertThat(CassandraScheduler.getTaskName(null, "task")).isEqualTo("task"); }
@Test public void testGetTaskName_nameEmpty() throws Exception { assertThat(CassandraScheduler.getTaskName("", "task")).isEqualTo("task"); }
@Test public void testGetTaskName_nameEmptyAfterTrim() throws Exception { assertThat(CassandraScheduler.getTaskName(" \t", "task")).isEqualTo("task"); }