CassandraDaemonStep extends DefaultStep { public static CassandraDaemonStep create( final String name, final PersistentOfferRequirementProvider provider, final CassandraState cassandraState) throws IOException { return new CassandraDaemonStep( name, provider, cassandraState); } CassandraDaemonStep(
            final String name,
            final PersistentOfferRequirementProvider provider,
            final CassandraState cassandraState); static boolean isComplete(Protos.TaskStatus status); static boolean isComplete(Optional<Protos.TaskStatus> status); static CassandraDaemonStep create(
            final String name,
            final PersistentOfferRequirementProvider provider,
            final CassandraState cassandraState); @Override Optional<OfferRequirement> start(); @Override void update(Protos.TaskStatus status); @Override String getMessage(); @Override String toString();  }
@Test public void testCreate() throws Exception { final CassandraContainer cassandraContainer = mock(CassandraContainer.class); final CassandraDaemonTask daemonTask = mock(CassandraDaemonTask.class); final String EXPECTED_NAME = "node-0"; when(cassandraContainer.getDaemonTask()).thenReturn(daemonTask); when(daemonTask.getName()).thenReturn(EXPECTED_NAME); CassandraDaemonStep step = CassandraDaemonStep.create( EXPECTED_NAME, persistentOfferRequirementProvider, cassandraState); Assert.assertEquals(EXPECTED_NAME, step.getName()); Assert.assertEquals(Status.PENDING, step.getStatus()); }