### Question:
DssRestChannelInitializer extends ChannelInitializer<SocketChannel> implements DssChannelInitializer<DssRestChannelInitializerCommand> { @Override public Behavior<DssRestChannelInitializerCommand> create() { if (initializeBehavior.get()) { throw new DssUserActorDuplicateBehaviorCreateException("Cannot setup twice for one object"); } initializeBehavior.set(true); return Behaviors.setup(this::dssRestChannelInitializer); } DssRestChannelInitializer(List<DssRestActorService> serviceList); @Override Behavior<DssRestChannelInitializerCommand> create();  }### Answer:
@Test void create() { final DssRestChannelInitializer dssRestChannelInitializer = new DssRestChannelInitializer(Collections.emptyList()); final Behavior<DssRestChannelInitializerCommand> behavior = dssRestChannelInitializer.create(); assertNotNull(behavior); final ActorRef<DssRestChannelInitializerCommand> actorRef = testKit.spawn(behavior); assertNotNull(actorRef); }
@Test void createTwiceForOneObject() { final DssRestChannelInitializer dssRestChannelInitializer = new DssRestChannelInitializer(Collections.emptyList()); dssRestChannelInitializer.create(); assertThrows(DssUserActorDuplicateBehaviorCreateException.class, dssRestChannelInitializer::create); }