public function __construct(UserToken $userToken, DTOBuilderFactoryInterface $dtoBuilderFactory)
 {
     $this->entity = $userToken;
     $this->dtoBuilderFactory = $dtoBuilderFactory;
     $this->entityDTO = new UserTokenDTO();
     $this->setId();
     $this->setTime();
     $this->entityDTO->userAgent = $this->entity->getUserAgent();
     $this->entityDTO->ip4 = $this->entity->getIp4();
     $this->entityDTO->expires = $this->entity->getExpires();
     $this->entityDTO->type = $this->dtoBuilderFactory->getUserTokenTypeDTOBuilder($this->entity->getType())->build();
 }
 public function testCreateWithNullExpires()
 {
     $userToken = new UserToken($this->user, $this->dummyData->getUserTokenType(), self::TOKEN, self::USER_AGENT, self::IP4);
     $this->assertSame(null, $userToken->getExpires());
 }