text:
<?php

declare(strict_types=1);

namespace Tests\App\Entity;

use App\Entity\CategorieOeuvre;
use App\Entity\EditeurNatureSupport;
use App\Service\General;
use Doctrine\ORM\EntityManager;
use Symfony\Bridge\Monolog\Logger;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

class EditeurNatureSupportTest extends KernelTestCase
{
    /**
     * @var null|Logger
     */
    private $logger = null;

    /**
     * @var General
     */
    private $general;

    /**
     * @var EntityManager
     */
    private $entityManager;

    public function setUp()
    {
        self::bootKernel();
        $this->entityManager = static::$kernel
            ->getContainer()
            ->get('doctrine')
            ->getManager();
        $this->general = static::$kernel->getContainer()->get('app.general');
        if (null === $this->logger) {
            $this->logger = static::$kernel->getContainer()->get('monolog.logger.phpunit');
            $this->general->setLogger($this->logger);
        }
    }

    public function tearDown()
    {
        $this->entityManager->close();
        $this->entityManager = null;
        unset($this->entityManager);
        $this->logger->popHandler();
        $this->logger = null;
        $this->general = null;
        unset($this->general);
    }

    public function testEntity()
    {
        $this->logger->debug('Exécution de ' . __METHOD__);
        $entities = $this->entityManager
            ->getRepository(EditeurNatureSupport::class)
            ->findAll();
        $this->assertFalse(empty($entities));
    }

    /**
     * @return array
     */
    public function providesDataForGetCategoriesOeuvresTest1()
    {
        return [
            ['Casterman', 'livre', 'bande-dessinee'],
            ['Casterman', 'livre', 'litterature-architecture'],
            ['Casterman', 'livre', 'litterature-biographie-journal-memoires'],
            ['Casterman', 'livre', 'litterature-bricolage'],
            ['Casterman', 'livre', 'litterature-cinema'],
            ['Casterman', 'livre', 'litterature-conte'],
            ['Casterman', 'livre', 'litterature-cuisine-et-dietetique'],
            ['Casterman', 'livre', 'litterature-droit'],
            ['Casterman', 'livre', 'litterature-economie'],
            ['Casterman', 'livre', 'litterature-fable'],
            ['Casterman', 'livre', 'litterature-geographie-et-voyages'],
            ['Casterman', 'livre', 'litterature-histoire'],
            ['Casterman', 'livre', 'litterature-horticulture-et-jardinage'],
            ['Casterman', 'livre', 'litterature-humour'],
            ['Casterman', 'livre', 'litterature-informatique'],
            ['Casterman', 'livre', 'litterature-mathematiques'],
            ['Casterman', 'livre', 'litterature-musique'],
            ['Casterman', 'livre', 'litterature-nouvelle'],
            ['Casterman', 'livre', 'litterature-parascolaire'],
            ['Casterman', 'livre', 'litterature-peinture'],
            ['Casterman', 'livre', 'litterature-philosophie'],
            ['Casterman', 'livre', 'litterature-photographie'],
            ['Casterman', 'livre', 'litterature-piece-de-theatre'],
            ['Casterman', 'livre', 'litterature-poeme'],
            ['Casterman', 'livre', 'litterature-politique'],
            ['Casterman', 'livre', 'litterature-recit-reportage-temoignage'],
            ['Casterman', 'livre', 'litterature-recueil-d-interviews'],
            ['Casterman', 'livre', 'litterature-religion'],
            ['Casterman', 'livre', 'litterature-roman'],
            ['Casterman', 'livre', 'litterature-sciences-de-la-nature'],
            ['Casterman', 'livre', 'litterature-scolaire'],
            ['Casterman', 'livre', 'litterature-sport'],
            ['Fayard', 'livre', 'litterature-architecture'],
            ['Fayard', 'livre', 'litterature-biographie-journal-memoires'],
            ['Fayard', 'livre', 'litterature-bricolage'],
            ['Fayard', 'livre', 'litterature-cinema'],
            ['Fayard', 'livre', 'litterature-conte'],
            ['Fayard', 'livre', 'litterature-cuisine-et-dietetique'],
            ['Fayard', 'livre', 'litterature-droit'],
            ['Fayard', 'livre', 'litterature-economie'],
            ['Fayard', 'livre', 'litterature-fable'],
            ['Fayard', 'livre', 'litterature-geographie-et-voyages'],
            ['Fayard', 'livre', 'litterature-histoire'],
            ['Fayard', 'livre', 'litterature-horticulture-et-jardinage'],
            ['Fayard', 'livre', 'litterature-humour'],
            ['Fayard', 'livre', 'litterature-informatique'],
            ['Fayard', 'livre', 'litterature-mathematiques'],
            ['Fayard', 'livre', 'litterature-musique'],
            ['Fayard', 'livre', 'litterature-nouvelle'],
            ['Fayard', 'livre', 'litterature-parascolaire'],
            ['Fayard', 'livre', 'litterature-peinture'],
            ['Fayard', 'livre', 'litterature-philosophie'],
            ['Fayard', 'livre', 'litterature-photographie'],
            ['Fayard', 'livre', 'litterature-piece-de-theatre'],
            ['Fayard', 'livre', 'litterature-poeme'],
            ['Fayard', 'livre', 'litterature-politique'],
            ['Fayard', 'livre', 'litterature-recit-reportage-temoignage'],
            ['Fayard', 'livre', 'litterature-recueil-d-interviews'],
            ['Fayard', 'livre', 'litterature-religion'],
            ['Fayard', 'livre', 'litterature-roman'],
            ['Fayard', 'livre', 'litterature-sciences-de-la-nature'],
            ['Fayard', 'livre', 'litterature-scolaire'],
            ['Fayard', 'livre', 'litterature-sport'],
            ['Dupuis', 'livre', 'bande-dessinee'],
            ['Sony Music Entertainment', 'CD', 'musique-blues'],
            ['Sony Music Entertainment', 'CD', 'musique-chanson-francophone'],
            ['Sony Music Entertainment', 'CD', 'musique-dance'],
            ['Sony Music Entertainment', 'CD', 'musique-disco'],
            ['Sony Music Entertainment', 'CD', 'musique-electronica'],
            ['Sony Music Entertainment', 'CD', 'musique-french-touch'],
            ['Sony Music Entertainment', 'CD', 'musique-folk'],
            ['Sony Music Entertainment', 'CD', 'musique-funk-soul'],
            ['Sony Music Entertainment', 'CD', 'musique-hard-rock'],
            ['Sony Music Entertainment', 'CD', 'musique-house'],
            ['Sony Music Entertainment', 'CD', 'musique-jazz'],
            ['Sony Music Entertainment', 'CD', 'musique-musique-de-film'],
            ['Sony Music Entertainment', 'CD', 'musique-musique-classique'],
            ['Sony Music Entertainment', 'CD', 'musique-negro-spiritual-gospel'],
            ['Sony Music Entertainment', 'CD', 'musique-rap'],
            ['Sony Music Entertainment', 'CD', 'musique-reggae'],
            ['Sony Music Entertainment', 'CD', 'musique-rock'],
            ['Sony Music Entertainment', 'CD', 'musique-techno'],
            ['Sony Music Entertainment', 'CD', 'spectacle-concert'],
            ['Sony Music Entertainment', 'CD', 'spectacle-humour'],
            ['Sony Music Entertainment', 'CD', 'spectacle-theatre'],
            ['Warner Bros', 'DVD', 'cinema-comedie'],
            ['Warner Bros', 'Blu-ray', 'cinema-comedie'],
            ['Warner Bros', 'DVD', 'cinema-comedie-dramatique'],
            ['Warner Bros', 'Blu-ray', 'cinema-comedie-dramatique'],
            ['Warner Bros', 'DVD', 'cinema-comedie-musicale'],
            ['Warner Bros', 'Blu-ray', 'cinema-comedie-musicale'],
            ['Warner Bros', 'DVD', 'cinema-comedie-burlesque'],
            ['Warner Bros', 'Blu-ray', 'cinema-comedie-burlesque'],
            ['Warner Bros', 'DVD', 'cinema-comedie-noire'],
            ['Warner Bros', 'Blu-ray', 'cinema-comedie-noire'],
            ['Warner Bros', 'DVD', 'cinema-documentaire'],
            ['Warner Bros', 'Blu-ray', 'cinema-documentaire'],
            ['Warner Bros', 'DVD', 'cinema-film-d-action'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-d-action'],
            ['Warner Bros', 'DVD', 'cinema-film-d-animation'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-d-animation'],
            ['Warner Bros', 'DVD', 'cinema-film-d-aventures'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-d-aventures'],
            ['Warner Bros', 'DVD', 'cinema-film-catastrophe'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-catastrophe'],
            ['Warner Bros', 'DVD', 'cinema-film-d-espionnage'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-d-espionnage'],
            ['Warner Bros', 'DVD', 'cinema-film-de-guerre'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-de-guerre'],
            ['Warner Bros', 'DVD', 'cinema-film-fantastique'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-fantastique'],
            ['Warner Bros', 'DVD', 'cinema-film-historique'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-historique'],
            ['Warner Bros', 'DVD', 'cinema-film-d-horreur'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-d-horreur'],
            ['Warner Bros', 'DVD', 'cinema-film-policier'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-policier'],
            ['Warner Bros', 'DVD', 'cinema-film-de-science-fiction'],
            ['Warner Bros', 'Blu-ray', 'cinema-film-de-science-fiction'],
            ['Warner Bros', 'DVD', 'cinema-peplum'],
            ['Warner Bros', 'Blu-ray', 'cinema-peplum'],
            ['Warner Bros', 'DVD', 'cinema-serie'],
            ['Warner Bros', 'Blu-ray', 'cinema-serie'],
            ['Warner Bros', 'DVD', 'cinema-western'],
            ['Warner Bros', 'Blu-ray', 'cinema-western'],
            ['Warner Bros', 'DVD', 'spectacle-concert'],
            ['Warner Bros', 'Blu-ray', 'spectacle-concert'],
            ['Warner Bros', 'DVD', 'spectacle-danse'],
            ['Warner Bros', 'Blu-ray', 'spectacle-danse'],
            ['Warner Bros', 'DVD', 'spectacle-humour'],
            ['Warner Bros', 'Blu-ray', 'spectacle-humour'],
            ['Warner Bros', 'DVD', 'spectacle-theatre'],
            ['Warner Bros', 'Blu-ray', 'spectacle-theatre'],
        ];
    }

    /**
     * @dataProvider providesDataForGetCategoriesOeuvresTest1
     *
     * @param string $nomEditeur
     * @param string $nomNatureSupport
     * @param string $categorie
     */
    public function testGetCategoriesOeuvres1($nomEditeur, $nomNatureSupport, $categorie)
    {
        $this->logger->debug('Exécution de ' . __METHOD__);
        $editeurSupport = $this->entityManager
            ->getRepository(EditeurNatureSupport::class)
            ->getEditeurNatureSupportsWhereEditeurAndNatureSupport($nomEditeur, $nomNatureSupport);
        $categorieOeuvre = $this->entityManager
            ->getRepository(CategorieOeuvre::class)
            ->findOneByIdentifiant($categorie);
        $this->assertTrue(
            $editeurSupport->getCategoriesOeuvres()->contains($categorieOeuvre)
        );
    }

    /**
     * @return array
     */
    public function providesDataForGetCategoriesOeuvresTest2()
    {
        return [
            ['Dupuis', 'livre', 'litterature-architecture'],
            ['Dupuis', 'livre', 'litterature-biographie-journal-memoires'],
            ['Dupuis', 'livre', 'litterature-bricolage'],
            ['Dupuis', 'livre', 'litterature-cinema'],
            ['Dupuis', 'livre', 'litterature-conte'],
            ['Dupuis', 'livre', 'litterature-cuisine-et-dietetique'],
            ['Dupuis', 'livre', 'litterature-droit'],
            ['Dupuis', 'livre', 'litterature-economie'],
            ['Dupuis', 'livre', 'litterature-fable'],
            ['Dupuis', 'livre', 'litterature-geographie-et-voyages'],
            ['Dupuis', 'livre', 'litterature-histoire'],
            ['Dupuis', 'livre', 'litterature-horticulture-et-jardinage'],
            ['Dupuis', 'livre', 'litterature-humour'],
            ['Dupuis', 'livre', 'litterature-informatique'],
            ['Dupuis', 'livre', 'litterature-mathematiques'],
            ['Dupuis', 'livre', 'litterature-musique'],
            ['Dupuis', 'livre', 'litterature-nouvelle'],
            ['Dupuis', 'livre', 'litterature-parascolaire'],
            ['Dupuis', 'livre', 'litterature-peinture'],
            ['Dupuis', 'livre', 'litterature-philosophie'],
            ['Dupuis', 'livre', 'litterature-photographie'],
            ['Dupuis', 'livre', 'litterature-piece-de-theatre'],
            ['Dupuis', 'livre', 'litterature-poeme'],
            ['Dupuis', 'livre', 'litterature-politique'],
            ['Dupuis', 'livre', 'litterature-recit-reportage-temoignage'],
            ['Dupuis', 'livre', 'litterature-recueil-d-interviews'],
            ['Dupuis', 'livre', 'litterature-religion'],
            ['Dupuis', 'livre', 'litterature-roman'],
            ['Dupuis', 'livre', 'litterature-sciences-de-la-nature'],
            ['Dupuis', 'livre', 'litterature-scolaire'],
            ['Dupuis', 'livre', 'litterature-sport'],
            ['Dupuis', 'livre', 'cinema-comedie'],
            ['Dupuis', 'livre', 'cinema-comedie-burlesque'],
            ['Dupuis', 'livre', 'cinema-comedie-dramatique'],
            ['Dupuis', 'livre', 'cinema-comedie-musicale'],
            ['Dupuis', 'livre', 'cinema-comedie-noire'],
            ['Dupuis', 'livre', 'cinema-documentaire'],
            ['Dupuis', 'livre', 'cinema-film-d-action'],
            ['Dupuis', 'livre', 'cinema-film-d-animation'],
            ['Dupuis', 'livre', 'cinema-film-d-aventures'],
            ['Dupuis', 'livre', 'cinema-film-catastrophe'],
            ['Dupuis', 'livre', 'cinema-film-d-espionnage'],
            ['Dupuis', 'livre', 'cinema-film-de-guerre'],
            ['Dupuis', 'livre', 'cinema-film-fantastique'],
            ['Dupuis', 'livre', 'cinema-film-historique'],
            ['Dupuis', 'livre', 'cinema-film-d-horreur'],
            ['Dupuis', 'livre', 'cinema-film-policier'],
            ['Dupuis', 'livre', 'cinema-film-de-science-fiction'],
            ['Dupuis', 'livre', 'cinema-peplum'],
            ['Dupuis', 'livre', 'cinema-serie'],
            ['Dupuis', 'livre', 'cinema-western'],
            ['Dupuis', 'livre', 'musique-blues'],
            ['Dupuis', 'livre', 'musique-chanson-francophone'],
            ['Dupuis', 'livre', 'musique-dance'],
            ['Dupuis', 'livre', 'musique-disco'],
            ['Dupuis', 'livre', 'musique-electronica'],
            ['Dupuis', 'livre', 'musique-french-touch'],
            ['Dupuis', 'livre', 'musique-folk'],
            ['Dupuis', 'livre', 'musique-funk-soul'],
            ['Dupuis', 'livre', 'musique-hard-rock'],
            ['Dupuis', 'livre', 'musique-house'],
            ['Dupuis', 'livre', 'musique-jazz'],
            ['Dupuis', 'livre', 'musique-musique-de-film'],
            ['Dupuis', 'livre', 'musique-musique-classique'],
            ['Dupuis', 'livre', 'musique-negro-spiritual-gospel'],
            ['Dupuis', 'livre', 'musique-rap'],
            ['Dupuis', 'livre', 'musique-reggae'],
            ['Dupuis', 'livre', 'musique-rock'],
            ['Dupuis', 'livre', 'musique-techno'],
            ['Dupuis', 'livre', 'spectacle-concert'],
            ['Dupuis', 'livre', 'spectacle-danse'],
            ['Dupuis', 'livre', 'spectacle-humour'],
            ['Dupuis', 'livre', 'spectacle-theatre'],
            ['Warner Bros', 'DVD', 'bande-dessinee'],
            ['Warner Bros', 'Blu-ray', 'bande-dessinee'],
            ['Warner Bros', 'DVD', 'litterature-architecture'],
            ['Warner Bros', 'Blu-ray', 'litterature-architecture'],
            ['Warner Bros', 'DVD', 'litterature-biographie-journal-memoires'],
            ['Warner Bros', 'Blu-ray', 'litterature-biographie-journal-memoires'],
            ['Warner Bros', 'DVD', 'litterature-bricolage'],
            ['Warner Bros', 'Blu-ray', 'litterature-bricolage'],
            ['Warner Bros', 'DVD', 'litterature-cinema'],
            ['Warner Bros', 'Blu-ray', 'litterature-cinema'],
            ['Warner Bros', 'DVD', 'litterature-conte'],
            ['Warner Bros', 'Blu-ray', 'litterature-conte'],
            ['Warner Bros', 'DVD', 'litterature-cuisine-et-dietetique'],
            ['Warner Bros', 'Blu-ray', 'litterature-cuisine-et-dietetique'],
            ['Warner Bros', 'DVD', 'litterature-droit'],
            ['Warner Bros', 'Blu-ray', 'litterature-droit'],
            ['Warner Bros', 'DVD', 'litterature-economie'],
            ['Warner Bros', 'Blu-ray', 'litterature-economie'],
            ['Warner Bros', 'DVD', 'litterature-fable'],
            ['Warner Bros', 'Blu-ray', 'litterature-fable'],
            ['Warner Bros', 'DVD', 'litterature-geographie-et-voyages'],
            ['Warner Bros', 'Blu-ray', 'litterature-geographie-et-voyages'],
            ['Warner Bros', 'DVD', 'litterature-histoire'],
            ['Warner Bros', 'Blu-ray', 'litterature-histoire'],
            ['Warner Bros', 'DVD', 'litterature-horticulture-et-jardinage'],
            ['Warner Bros', 'Blu-ray', 'litterature-horticulture-et-jardinage'],
            ['Warner Bros', 'DVD', 'litterature-humour'],
            ['Warner Bros', 'Blu-ray', 'litterature-humour'],
            ['Warner Bros', 'DVD', 'litterature-informatique'],
            ['Warner Bros', 'Blu-ray', 'litterature-informatique'],
            ['Warner Bros', 'DVD', 'litterature-mathematiques'],
            ['Warner Bros', 'Blu-ray', 'litterature-mathematiques'],
            ['Warner Bros', 'DVD', 'litterature-musique'],
            ['Warner Bros', 'Blu-ray', 'litterature-musique'],
            ['Warner Bros', 'DVD', 'litterature-nouvelle'],
            ['Warner Bros', 'Blu-ray', 'litterature-nouvelle'],
            ['Warner Bros', 'DVD', 'litterature-parascolaire'],
            ['Warner Bros', 'Blu-ray', 'litterature-parascolaire'],
            ['Warner Bros', 'DVD', 'litterature-peinture'],
            ['Warner Bros', 'Blu-ray', 'litterature-peinture'],
            ['Warner Bros', 'DVD', 'litterature-philosophie'],
            ['Warner Bros', 'Blu-ray', 'litterature-philosophie'],
            ['Warner Bros', 'DVD', 'litterature-photographie'],
            ['Warner Bros', 'Blu-ray', 'litterature-photographie'],
            ['Warner Bros', 'DVD', 'litterature-piece-de-theatre'],
            ['Warner Bros', 'Blu-ray', 'litterature-piece-de-theatre'],
            ['Warner Bros', 'DVD', 'litterature-poeme'],
            ['Warner Bros', 'Blu-ray', 'litterature-poeme'],
            ['Warner Bros', 'DVD', 'litterature-politique'],
            ['Warner Bros', 'Blu-ray', 'litterature-politique'],
            ['Warner Bros', 'DVD', 'litterature-recit-reportage-temoignage'],
            ['Warner Bros', 'Blu-ray', 'litterature-recit-reportage-temoignage'],
            ['Warner Bros', 'DVD', 'litterature-recueil-d-interviews'],
            ['Warner Bros', 'Blu-ray', 'litterature-recueil-d-interviews'],
            ['Warner Bros', 'DVD', 'litterature-religion'],
            ['Warner Bros', 'Blu-ray', 'litterature-religion'],
            ['Warner Bros', 'DVD', 'litterature-roman'],
            ['Warner Bros', 'Blu-ray', 'litterature-roman'],
            ['Warner Bros', 'DVD', 'litterature-sciences-de-la-nature'],
            ['Warner Bros', 'Blu-ray', 'litterature-sciences-de-la-nature'],
            ['Warner Bros', 'DVD', 'litterature-scolaire'],
            ['Warner Bros', 'Blu-ray', 'litterature-scolaire'],
            ['Warner Bros', 'DVD', 'litterature-sport'],
            ['Warner Bros', 'Blu-ray', 'litterature-sport'],
            ['Warner Bros', 'DVD', 'musique-blues'],
            ['Warner Bros', 'Blu-ray', 'musique-blues'],
            ['Warner Bros', 'DVD', 'musique-chanson-francophone'],
            ['Warner Bros', 'Blu-ray', 'musique-chanson-francophone'],
            ['Warner Bros', 'DVD', 'musique-dance'],
            ['Warner Bros', 'Blu-ray', 'musique-dance'],
            ['Warner Bros', 'DVD', 'musique-disco'],
            ['Warner Bros', 'Blu-ray', 'musique-disco'],
            ['Warner Bros', 'DVD', 'musique-electronica'],
            ['Warner Bros', 'Blu-ray', 'musique-electronica'],
            ['Warner Bros', 'DVD', 'musique-french-touch'],
            ['Warner Bros', 'Blu-ray', 'musique-french-touch'],
            ['Warner Bros', 'DVD', 'musique-folk'],
            ['Warner Bros', 'Blu-ray', 'musique-folk'],
            ['Warner Bros', 'DVD', 'musique-funk-soul'],
            ['Warner Bros', 'Blu-ray', 'musique-funk-soul'],
            ['Warner Bros', 'DVD', 'musique-hard-rock'],
            ['Warner Bros', 'Blu-ray', 'musique-hard-rock'],
            ['Warner Bros', 'DVD', 'musique-house'],
            ['Warner Bros', 'Blu-ray', 'musique-house'],
            ['Warner Bros', 'DVD', 'musique-jazz'],
            ['Warner Bros', 'Blu-ray', 'musique-jazz'],
            ['Warner Bros', 'DVD', 'musique-musique-de-film'],
            ['Warner Bros', 'Blu-ray', 'musique-musique-de-film'],
            ['Warner Bros', 'DVD', 'musique-musique-classique'],
            ['Warner Bros', 'Blu-ray', 'musique-musique-classique'],
            ['Warner Bros', 'DVD', 'musique-negro-spiritual-gospel'],
            ['Warner Bros', 'Blu-ray', 'musique-negro-spiritual-gospel'],
            ['Warner Bros', 'DVD', 'musique-rap'],
            ['Warner Bros', 'Blu-ray', 'musique-rap'],
            ['Warner Bros', 'DVD', 'musique-reggae'],
            ['Warner Bros', 'Blu-ray', 'musique-reggae'],
            ['Warner Bros', 'DVD', 'musique-rock'],
            ['Warner Bros', 'Blu-ray', 'musique-rock'],
            ['Warner Bros', 'DVD', 'musique-techno'],
            ['Warner Bros', 'Blu-ray', 'musique-techno'],
        ];
    }

    /**
     * @dataProvider providesDataForGetCategoriesOeuvresTest2
     *
     * @param string $nomEditeur
     * @param string $nomNatureSupport
     * @param string $categorie
     */
    public function testGetCategoriesOeuvres2($nomEditeur, $nomNatureSupport, $categorie)
    {
        $this->logger->debug('Exécution de ' . __METHOD__);
        $editeurSupport = $this->entityManager
            ->getRepository(EditeurNatureSupport::class)
            ->getEditeurNatureSupportsWhereEditeurAndNatureSupport($nomEditeur, $nomNatureSupport);
        $categorieOeuvre = $this->entityManager
            ->getRepository(CategorieOeuvre::class)
            ->findOneByIdentifiant($categorie);
        $this->assertFalse(
            $editeurSupport->getCategoriesOeuvres()->contains($categorieOeuvre)
        );
    }
}


text:
/* Slide Social Buttons are a fun way to display your social media buttons
 *
 * @author Christopher Yee
 * @author Blue Husky Studios
 *
 * @see https://github.com/christophery/slide-social-buttons
 */

.slide-social{
    display: inline-block;
    overflow: hidden;
    margin: 0 1em 1em 0;
    width: 9em;
    height: 3em;
    background: #F1F1F1;
    background: rgba(0,0,0,.05);
    position: relative; /* So social buttons don't align with positioned ancestor */
}

.slide-social .ss-button{
    position: absolute;
    top: 1em;
    left: 35%;
}

.ss-icon{
    padding-top: 1em; /* .slide-social{height} - .ss-icon i{height}*/
    width: 25%;
    height: 100%;
    text-align: center;
}

.ss-icon i{
    border-right: 1px solid #FFF; /* IE < 9 Fallback Colour */
    border-right-color: rgba(255,255,255,.3);
    color: #FFF;
    display: block;
    font-size: 1.2em;
    height: 1em;
}

.ss-slide{
    position: absolute;
    top: 0;
    right: 0;
    width: 75%;
    height: 100%;
    color: #FFF;
    text-align: center;
    font-weight: 600;
    line-height: 3em; /* .slide-social{height} */
    cursor: pointer;
}

/* Brand Colours */

.facebook-bg{
    background: #3b5998;
}

.twitter-bg{
    background: #00acee;
}

.linkedin-bg{
    background: #0e76a8;
}

.pinterest-bg{
    background: #c8232c;
}

.tumblr-bg{
    background: #35465c;
}

/* Slide Animation */

.slide-social:hover .ss-slide,
.slide-social .ss-slide:hover{
    -webkit-transform: translate(101%, 0);
    -moz-transform: translate(101%, 0);
    -ms-transform: translate(101%, 0);
    -o-transform: translate(101%, 0);
    transform: translate(101%, 0);
}

.slide-social:hover .ss-icon i{
    border-right-color: transparent;
}

/* Transition */

.ss-slide{
    -webkit-transition: all .2s ease-in-out;
    -moz-transition: all .2s ease-in-out;
    -ms-transition: all .2s ease-in-out 2s;
    -o-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

.slide-social:hover .ss-slide{
    -ms-transition-delay: 0s;
}

/* Example Media Queries */

@media only screen and (max-width : 30em) { /* 480px/16px = 30em */

    .slide-social{
        width: 100%;
    }

    .slide-social .ss-button{
        left: 50%;
    }
}

redpajama_set_name: RedPajamaGithub


text:
@interface ImActorModelDroidkitJsonJSONTokener () {
 @public
  jlong character_;
  jboolean eof_;
  jlong index_;
  jlong line_;
  jchar previous_;
  BSDataInput *reader_;
  jboolean usePrevious_;
}

@end

J2OBJC_FIELD_SETTER(ImActorModelDroidkitJsonJSONTokener, reader_, BSDataInput *)

static NSString *ImActorModelDroidkitJsonJSONTokener_END_VALUES_ = @",:]}/\\\"[{;=#";
J2OBJC_STATIC_FIELD_GETTER(ImActorModelDroidkitJsonJSONTokener, END_VALUES_, NSString *)

@implementation ImActorModelDroidkitJsonJSONTokener

- (instancetype)initWithBSDataInput:(BSDataInput *)reader {
  ImActorModelDroidkitJsonJSONTokener_initWithBSDataInput_(self, reader);
  return self;
}

- (instancetype)initWithNSString:(NSString *)s {
  ImActorModelDroidkitJsonJSONTokener_initWithNSString_(self, s);
  return self;
}

- (void)back {
  if (self->usePrevious_ || self->index_ <= 0) {
    @throw new_ImActorModelDroidkitJsonJSONException_initWithNSString_(@"Stepping back two steps is not supported");
  }
  self->index_ -= 1;
  self->character_ -= 1;
  self->usePrevious_ = YES;
  self->eof_ = NO;
}

+ (jint)dehexcharWithChar:(jchar)c {
  return ImActorModelDroidkitJsonJSONTokener_dehexcharWithChar_(c);
}

- (jboolean)end {
  return self->eof_ && !self->usePrevious_;
}

- (jboolean)more {
  [self next];
  if ([self end]) {
    return NO;
  }
  [self back];
  return YES;
}

- (jchar)next {
  jint c;
  if (self->usePrevious_) {
    self->usePrevious_ = NO;
    c = self->previous_;
  }
  else {
    @try {
      c = [((BSDataInput *) nil_chk(self->reader_)) readByte];
    }
    @catch (JavaIoIOException *exception) {
      @throw new_ImActorModelDroidkitJsonJSONException_initWithJavaLangThrowable_(exception);
    }
    if (c <= 0) {
      self->eof_ = YES;
      c = 0;
    }
  }
  self->index_ += 1;
  if (self->previous_ == 0x000d) {
    self->line_ += 1;
    self->character_ = c == 0x000a ? 0 : 1;
  }
  else if (c == 0x000a) {
    self->line_ += 1;
    self->character_ = 0;
  }
  else {
    self->character_ += 1;
  }
  self->previous_ = (jchar) c;
  return self->previous_;
}

- (jchar)nextWithChar:(jchar)c {
  jchar n = [self next];
  if (n != c) {
    @throw [self syntaxErrorWithNSString:JreStrcat("$C$CC", @"Expected '", c, @"' and instead saw '", n, '\'')];
  }
  return n;
}

- (NSString *)nextWithInt:(jint)n {
  if (n == 0) {
    return @"";
  }
  IOSCharArray *chars = [IOSCharArray newArrayWithLength:n];
  jint pos = 0;
  while (pos < n) {
    *IOSCharArray_GetRef(chars, pos) = [self next];
    if ([self end]) {
      @throw [self syntaxErrorWithNSString:@"Substring bounds error"];
    }
    pos += 1;
  }
  return [NSString stringWithCharacters:chars];
}

- (jchar)nextClean {
  for (; ; ) {
    jchar c = [self next];
    if (c == 0 || c > ' ') {
      return c;
    }
  }
}

- (NSString *)nextStringWithChar:(jchar)quote {
  jchar c;
  JavaLangStringBuilder *sb = new_JavaLangStringBuilder_init();
  for (; ; ) {
    c = [self next];
    switch (c) {
      case 0:
      case 0x000a:
      case 0x000d:
      @throw [self syntaxErrorWithNSString:@"Unterminated string"];
      case '\\':
      c = [self next];
      switch (c) {
        case 'b':
        (void) [sb appendWithChar:0x0008];
        break;
        case 't':
        (void) [sb appendWithChar:0x0009];
        break;
        case 'n':
        (void) [sb appendWithChar:0x000a];
        break;
        case 'f':
        (void) [sb appendWithChar:0x000c];
        break;
        case 'r':
        (void) [sb appendWithChar:0x000d];
        break;
        case 'u':
        (void) [sb appendWithChar:(jchar) JavaLangInteger_parseIntWithNSString_withInt_([self nextWithInt:4], 16)];
        break;
        case '"':
        case '\'':
        case '\\':
        case '/':
        (void) [sb appendWithChar:c];
        break;
        default:
        @throw [self syntaxErrorWithNSString:@"Illegal escape."];
      }
      break;
      default:
      if (c == quote) {
        return [sb description];
      }
      (void) [sb appendWithChar:c];
    }
  }
}

- (NSString *)nextToWithChar:(jchar)delimiter {
  JavaLangStringBuilder *sb = new_JavaLangStringBuilder_init();
  for (; ; ) {
    jchar c = [self next];
    if (c == delimiter || c == 0 || c == 0x000a || c == 0x000d) {
      if (c != 0) {
        [self back];
      }
      return [((NSString *) nil_chk([sb description])) trim];
    }
    (void) [sb appendWithChar:c];
  }
}

- (NSString *)nextToWithNSString:(NSString *)delimiters {
  jchar c;
  JavaLangStringBuilder *sb = new_JavaLangStringBuilder_init();
  for (; ; ) {
    c = [self next];
    if ([((NSString *) nil_chk(delimiters)) contains:JreStrcat("C", c)] || c == 0 || c == 0x000a || c == 0x000d) {
      if (c != 0) {
        [self back];
      }
      return [((NSString *) nil_chk([sb description])) trim];
    }
    (void) [sb appendWithChar:c];
  }
}

- (id)nextValue {
  jchar c = [self nextClean];
  NSString *string;
  switch (c) {
    case '"':
    case '\'':
    return [self nextStringWithChar:c];
    case '{':
    [self back];
    return new_ImActorModelDroidkitJsonJSONObject_initWithImActorModelDroidkitJsonJSONTokener_(self);
    case '[':
    [self back];
    return new_ImActorModelDroidkitJsonJSONArray_initWithImActorModelDroidkitJsonJSONTokener_(self);
  }
  JavaLangStringBuilder *sb = new_JavaLangStringBuilder_init();
  while (c >= ' ' && ![((NSString *) nil_chk(ImActorModelDroidkitJsonJSONTokener_END_VALUES_)) contains:JreStrcat("C", c)]) {
    (void) [sb appendWithChar:c];
    c = [self next];
  }
  [self back];
  string = [((NSString *) nil_chk([sb description])) trim];
  if ([@"" isEqual:string]) {
    @throw [self syntaxErrorWithNSString:@"Missing value"];
  }
  return ImActorModelDroidkitJsonJSONObject_stringToValueWithNSString_(string);
}

- (ImActorModelDroidkitJsonJSONException *)syntaxErrorWithNSString:(NSString *)message {
  return new_ImActorModelDroidkitJsonJSONException_initWithNSString_(JreStrcat("$$", message, [self description]));
}

- (NSString *)description {
  return JreStrcat("$J$J$JC", @" at ", self->index_, @" [character ", self->character_, @" line ", self->line_, ']');
}

@end

void ImActorModelDroidkitJsonJSONTokener_initWithBSDataInput_(ImActorModelDroidkitJsonJSONTokener *self, BSDataInput *reader) {
  (void) NSObject_init(self);
  self->reader_ = reader;
  self->eof_ = NO;
  self->usePrevious_ = NO;
  self->previous_ = 0;
  self->index_ = 0;
  self->character_ = 1;
  self->line_ = 1;
}

ImActorModelDroidkitJsonJSONTokener *new_ImActorModelDroidkitJsonJSONTokener_initWithBSDataInput_(BSDataInput *reader) {
  ImActorModelDroidkitJsonJSONTokener *self = [ImActorModelDroidkitJsonJSONTokener alloc];
  ImActorModelDroidkitJsonJSONTokener_initWithBSDataInput_(self, reader);
  return self;
}

void ImActorModelDroidkitJsonJSONTokener_initWithNSString_(ImActorModelDroidkitJsonJSONTokener *self, NSString *s) {
  (void) ImActorModelDroidkitJsonJSONTokener_initWithBSDataInput_(self, new_BSDataInput_initWithByteArray_([((NSString *) nil_chk(s)) getBytes]));
}

ImActorModelDroidkitJsonJSONTokener *new_ImActorModelDroidkitJsonJSONTokener_initWithNSString_(NSString *s) {
  ImActorModelDroidkitJsonJSONTokener *self = [ImActorModelDroidkitJsonJSONTokener alloc];
  ImActorModelDroidkitJsonJSONTokener_initWithNSString_(self, s);
  return self;
}

jint ImActorModelDroidkitJsonJSONTokener_dehexcharWithChar_(jchar c) {
  ImActorModelDroidkitJsonJSONTokener_initialize();
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  if (c >= 'A' && c <= 'F') {
    return c - ('A' - 10);
  }
  if (c >= 'a' && c <= 'f') {
    return c - ('a' - 10);
  }
  return -1;
}

J2OBJC_CLASS_TYPE_LITERAL_SOURCE(ImActorModelDroidkitJsonJSONTokener)


text:
package petablox.android.util;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public abstract class LazyMap<K,V> {
	private final Map<K,V> realMap = new HashMap<K,V>();

	public abstract V lazyFill(K key);

	public V get(K key) {
		if (!realMap.containsKey(key)) {
			realMap.put(key, lazyFill(key));
		}
		return realMap.get(key);
	}

	public void clear() {
		realMap.clear();
	}

	public Collection<V> values() {
		return realMap.values();
	}
}


text:
function Popup()
{
	this.cell = null;
	this.items = [];

	// create the element and add it to body
	ul = new Element('ul');
	ul.addClassName('popup');
	$$('body')[0].appendChild(ul);
	this.ul = ul;
}

Popup.prototype.setCell = function(cell)
{
	this.cell = cell;
}

Popup.prototype.getCell = function()
{
	return this.cell;
}

Popup.prototype.show = function()
{
	// show popup just below the active input
	var input = this.cell.getInput();
	var offset = input.cumulativeOffset();

	var left = offset.left;
	var top = offset.top + input.getHeight();

	this.ul.setStyle({ left: left + 'px', top: top + 'px', display: 'inherit' });
}

Popup.prototype.hide = function()
{
	this.ul.setStyle({ display: 'none' });
}

Popup.prototype.linkToCell = function(cell)
{
	this.cell = cell;

	if (cell.getText() == '') {
		this.hide();
	} else {
		this.cell.lineEditor.loadPopupSuggests(cell);
	}
}

Popup.prototype.populate = function(values, selectedText)
{
	var popup = this;
	var count = 0;

	this.clear();

	for (var name in values) {
		var html = values[name];

		count++;

		var item = new Element('li');
		var link = new Element('a');

		link.href = '';

		link.onclick = function(e) { popup.onClick(e); return false; }
		link.onkeydown = function(e) { popup.onKeyDown(e); }

		link.insert(html);
		link.setAttribute('data-text', name);

		item.appendChild(link);
		this.ul.appendChild(item);
	}

	if (count > 0) {
		this.show();
	} else {
		this.hide();
	}
}

Popup.prototype.clear = function()
{
	var items = this.ul.childElements();

	for (var i = 0; i < items.length; i++) {
		items[i].remove();
	}
}

Popup.prototype.onClick = function(event)
{
	var anchor = event.findElement('a');
	var text = anchor.getAttribute('data-text');

	if (text != '') {
		this.selectValue(text);
	} else {
		this.cell.setFocus();
	}
}

Popup.prototype.onKeyDown = function(event)
{
	var cell = this.cell;

	if (event.keyCode == Event.KEY_UP) {

		var item = event.findElement('li');
		var prevItem = item.previous('li');
		if (prevItem) {
			prevItem.down('a').focus();
		} else {
			cell.input.focus();
		}
		event.preventDefault();

	} else if (event.keyCode == Event.KEY_DOWN) {

		var item = event.findElement('li');
		var nextItem = item.next('li');
		if (!nextItem) {
			nextItem = this.getFirstElement();
		}

		nextItem.down('a').focus();
		event.preventDefault();

	} else if (event.keyCode == Event.KEY_RETURN) {

		var anchor = event.findElement('a');
		var text = anchor.getAttribute('data-text');

		this.selectValue(text);
		event.preventDefault();
	}

}

Popup.prototype.selectValue = function(text)
{
	var cell = this.cell;

	cell.setText(text);
	cell.lineEditor.updateInputValue();
	cell.lineEditor.focusNextCell(cell);
}

Popup.prototype.getFirstElement = function()
{
	var items = this.ul.childElements();

	return (items.length == 0 ? null : items[0]);
}

Popup.prototype.getValues = function()
{
	var suggests = [];
	var anchors = this.ul.select('a');

	for (var i = 0; i < anchors.length; i++) {
		suggests.push(anchors[i].getAttribute('data-text'));
	}

	return suggests;
}


text:
// This file was generated by jmlunit on Tue May 20 17:42:45 EDT 2008.

package org.jmlspecs.samples.list.list2;

import org.jmlspecs.samples.list.node.OneWayNode;

/** Automatically-generated test driver for JML and JUnit based
 * testing of OneWayList. The superclass of this class should be edited
 * to supply test data. However it's best not to edit this class
 * directly; instead use the command
 * <pre>
 *  jmlunit OneWayList.java
 * </pre>
 * to regenerate this class whenever OneWayList.java changes.
 */
public class OneWayList_JML_Test
     extends OneWayList_JML_TestData
{
    /** Initialize this class. */
    public OneWayList_JML_Test(java.lang.String name) {
        super(name);
    }

    /** Run the tests. */
    public static void main(java.lang.String[] args) {
        org.jmlspecs.jmlunit.JMLTestRunner.run(suite());
        // You can also use a JUnit test runner such as:
        // junit.textui.TestRunner.run(suite());
    }

    /** Test to see if the code for class OneWayList
     * has been compiled with runtime assertion checking (i.e., by jmlc).
     * Code that is not compiled with jmlc would not make an effective test,
     * since no assertion checking would be done. */
    public void test$IsRACCompiled() {
        junit.framework.Assert.assertTrue("code for class OneWayList"
                + " was not compiled with jmlc"
                + " so no assertions will be checked!",
            org.jmlspecs.jmlrac.runtime.JMLChecker.isRACCompiled(OneWayList.class)
            );
    }

    /** Return the test suite for this test class.  This will have
    * added to it at least test$IsRACCompiled(), and any test methods
    * written explicitly by the user in the superclass.  It will also
    * have added test suites for each testing each method and
    * constructor.
    */
    //@ ensures \result != null;
    public static junit.framework.Test suite() {
        OneWayList_JML_Test testobj
            = new OneWayList_JML_Test("OneWayList_JML_Test");
        junit.framework.TestSuite testsuite = testobj.overallTestSuite();
        // Add instances of Test found by the reflection mechanism.
        testsuite.addTestSuite(OneWayList_JML_Test.class);
        testobj.addTestSuiteForEachMethod(testsuite);
        return testsuite;
    }

    /** A JUnit test object that can run a single test method.  This
     * is defined as a nested class solely for convenience; it can't
     * be defined once and for all because it must subclass its
     * enclosing class.
     */
    protected static abstract class OneTest extends OneWayList_JML_Test {

        /** Initialize this test object. */
        public OneTest(String name) {
            super(name);
        }

        /** The result object that holds information about testing. */
        protected junit.framework.TestResult result;

        //@ also
        //@ requires result != null;
        public void run(junit.framework.TestResult result) {
            this.result = result;
            super.run(result);
        }

        /* Run a single test and decide whether the test was
         * successful, meaningless, or a failure.  This is the
         * Template Method pattern abstraction of the inner loop in a
         * JML/JUnit test. */
        public void runTest() throws java.lang.Throwable {
            try {
                // The call being tested!
                doCall();
            }
            catch (org.jmlspecs.jmlrac.runtime.JMLEntryPreconditionError e) {
                // meaningless test input
                addMeaningless();
            } catch (org.jmlspecs.jmlrac.runtime.JMLAssertionError e) {
                // test failure
                int l = org.jmlspecs.jmlrac.runtime.JMLChecker.getLevel();
                org.jmlspecs.jmlrac.runtime.JMLChecker.setLevel
                    (org.jmlspecs.jmlrac.runtime.JMLOption.NONE);
                try {
                    java.lang.String failmsg = this.failMessage(e);
                    junit.framework.AssertionFailedError err
                        = new junit.framework.AssertionFailedError(failmsg);
                    err.setStackTrace(new java.lang.StackTraceElement[]{});
                    err.initCause(e);
                    result.addFailure(this, err);
                } finally {
                    org.jmlspecs.jmlrac.runtime.JMLChecker.setLevel(l);
                }
            } catch (java.lang.Throwable e) {
                // test success
            }
        }

        /** Call the method to be tested with the appropriate arguments. */
        protected abstract void doCall() throws java.lang.Throwable;

        /** Format the error message for a test failure, based on the
         * method's arguments. */
        protected abstract java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e);

        /** Inform listeners that a meaningless test was run. */
        private void addMeaningless() {
            if (result instanceof org.jmlspecs.jmlunit.JMLTestResult) {
                ((org.jmlspecs.jmlunit.JMLTestResult)result)
                    .addMeaningless(this);
            }
        }
    }

    /** Create the tests that are to be run for testing the class
     * OneWayList.  The framework will then run them.
     * @param overallTestSuite$ The suite accumulating all of the tests
     * for this driver class.
     */
    //@ requires overallTestSuite$ != null;
    public void addTestSuiteForEachMethod
        (junit.framework.TestSuite overallTestSuite$)
    {
        try {
            this.addTestSuiteFor$TestOneWayList(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestFirstEntry(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestIncrementCursor(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestIsOffEnd(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestIsOffFront(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestGetEntry(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestRemoveEntry(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestReplaceEntry(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestInsertAfterCursor(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestInsertBeforeCursor(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestClone(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
        try {
            this.addTestSuiteFor$TestToString(overallTestSuite$);
        } catch (java.lang.Throwable ex) {
            overallTestSuite$.addTest
                (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex));
        }
    }

    /** Add tests for the OneWayList contructor
     * to the overall test suite. */
    private void addTestSuiteFor$TestOneWayList
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("OneWayList");
        try {
            methodTests$.addTest
                (new TestOneWayList());
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the OneWayList contructor. */
    protected static class TestOneWayList extends OneTest {

        /** Initialize this instance. */
        public TestOneWayList() {
            super("OneWayList");
        }

        protected void doCall() throws java.lang.Throwable {
            new OneWayList();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tContructor 'OneWayList'";
            return msg;
        }
    }

    /** Add tests for the firstEntry method
     * to the overall test suite. */
    private void addTestSuiteFor$TestFirstEntry
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("firstEntry");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("firstEntry", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"firstEntry\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestFirstEntry(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the firstEntry method. */
    protected static class TestFirstEntry extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestFirstEntry(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("firstEntry");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.firstEntry();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'firstEntry' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the incrementCursor method
     * to the overall test suite. */
    private void addTestSuiteFor$TestIncrementCursor
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("incrementCursor");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("incrementCursor", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"incrementCursor\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestIncrementCursor(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the incrementCursor method. */
    protected static class TestIncrementCursor extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestIncrementCursor(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("incrementCursor");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.incrementCursor();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'incrementCursor' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the isOffEnd method
     * to the overall test suite. */
    private void addTestSuiteFor$TestIsOffEnd
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("isOffEnd");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("isOffEnd", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"isOffEnd\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestIsOffEnd(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the isOffEnd method. */
    protected static class TestIsOffEnd extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestIsOffEnd(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("isOffEnd");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.isOffEnd();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'isOffEnd' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the isOffFront method
     * to the overall test suite. */
    private void addTestSuiteFor$TestIsOffFront
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("isOffFront");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("isOffFront", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"isOffFront\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestIsOffFront(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the isOffFront method. */
    protected static class TestIsOffFront extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestIsOffFront(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("isOffFront");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.isOffFront();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'isOffFront' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the getEntry method
     * to the overall test suite. */
    private void addTestSuiteFor$TestGetEntry
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("getEntry");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("getEntry", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"getEntry\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestGetEntry(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the getEntry method. */
    protected static class TestGetEntry extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestGetEntry(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("getEntry");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.getEntry();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'getEntry' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the removeEntry method
     * to the overall test suite. */
    private void addTestSuiteFor$TestRemoveEntry
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("removeEntry");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("removeEntry", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"removeEntry\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestRemoveEntry(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the removeEntry method. */
    protected static class TestRemoveEntry extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestRemoveEntry(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("removeEntry");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.removeEntry();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'removeEntry' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the replaceEntry method
     * to the overall test suite. */
    private void addTestSuiteFor$TestReplaceEntry
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("replaceEntry");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("replaceEntry", 1));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"replaceEntry\", 1))");
            while (!receivers$iter.atEnd()) {
                org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                    vjava_lang_Object$1$iter
                    = this.vjava_lang_ObjectIter("replaceEntry", 0);
                this.check_has_data
                    (vjava_lang_Object$1$iter,
                     "this.vjava_lang_ObjectIter(\"replaceEntry\", 0)");
                while (!vjava_lang_Object$1$iter.atEnd()) {
                    final org.jmlspecs.samples.list.list2.OneWayList receiver$
                        = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                    final java.lang.Object newEntry
                        = (java.lang.Object) vjava_lang_Object$1$iter.get();
                    methodTests$.addTest
                        (new TestReplaceEntry(receiver$, newEntry));
                    vjava_lang_Object$1$iter.advance();
                }
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the replaceEntry method. */
    protected static class TestReplaceEntry extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;
        /** Argument newEntry */
        private java.lang.Object newEntry;

        /** Initialize this instance. */
        public TestReplaceEntry(org.jmlspecs.samples.list.list2.OneWayList receiver$, java.lang.Object newEntry) {
            super("replaceEntry"+ ":" + (newEntry==null? "null" :"{java.lang.Object}"));
            this.receiver$ = receiver$;
            this.newEntry = newEntry;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.replaceEntry(newEntry);
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'replaceEntry' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            msg += "\n\tArgument newEntry: " + this.newEntry;
            return msg;
        }
    }

    /** Add tests for the insertAfterCursor method
     * to the overall test suite. */
    private void addTestSuiteFor$TestInsertAfterCursor
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("insertAfterCursor");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("insertAfterCursor", 1));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"insertAfterCursor\", 1))");
            while (!receivers$iter.atEnd()) {
                org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                    vjava_lang_Object$1$iter
                    = this.vjava_lang_ObjectIter("insertAfterCursor", 0);
                this.check_has_data
                    (vjava_lang_Object$1$iter,
                     "this.vjava_lang_ObjectIter(\"insertAfterCursor\", 0)");
                while (!vjava_lang_Object$1$iter.atEnd()) {
                    final org.jmlspecs.samples.list.list2.OneWayList receiver$
                        = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                    final java.lang.Object newEntry
                        = (java.lang.Object) vjava_lang_Object$1$iter.get();
                    methodTests$.addTest
                        (new TestInsertAfterCursor(receiver$, newEntry));
                    vjava_lang_Object$1$iter.advance();
                }
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the insertAfterCursor method. */
    protected static class TestInsertAfterCursor extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;
        /** Argument newEntry */
        private java.lang.Object newEntry;

        /** Initialize this instance. */
        public TestInsertAfterCursor(org.jmlspecs.samples.list.list2.OneWayList receiver$, java.lang.Object newEntry) {
            super("insertAfterCursor"+ ":" + (newEntry==null? "null" :"{java.lang.Object}"));
            this.receiver$ = receiver$;
            this.newEntry = newEntry;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.insertAfterCursor(newEntry);
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'insertAfterCursor' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            msg += "\n\tArgument newEntry: " + this.newEntry;
            return msg;
        }
    }

    /** Add tests for the insertBeforeCursor method
     * to the overall test suite. */
    private void addTestSuiteFor$TestInsertBeforeCursor
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("insertBeforeCursor");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("insertBeforeCursor", 1));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"insertBeforeCursor\", 1))");
            while (!receivers$iter.atEnd()) {
                org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                    vjava_lang_Object$1$iter
                    = this.vjava_lang_ObjectIter("insertBeforeCursor", 0);
                this.check_has_data
                    (vjava_lang_Object$1$iter,
                     "this.vjava_lang_ObjectIter(\"insertBeforeCursor\", 0)");
                while (!vjava_lang_Object$1$iter.atEnd()) {
                    final org.jmlspecs.samples.list.list2.OneWayList receiver$
                        = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                    final java.lang.Object newEntry
                        = (java.lang.Object) vjava_lang_Object$1$iter.get();
                    methodTests$.addTest
                        (new TestInsertBeforeCursor(receiver$, newEntry));
                    vjava_lang_Object$1$iter.advance();
                }
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the insertBeforeCursor method. */
    protected static class TestInsertBeforeCursor extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;
        /** Argument newEntry */
        private java.lang.Object newEntry;

        /** Initialize this instance. */
        public TestInsertBeforeCursor(org.jmlspecs.samples.list.list2.OneWayList receiver$, java.lang.Object newEntry) {
            super("insertBeforeCursor"+ ":" + (newEntry==null? "null" :"{java.lang.Object}"));
            this.receiver$ = receiver$;
            this.newEntry = newEntry;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.insertBeforeCursor(newEntry);
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'insertBeforeCursor' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            msg += "\n\tArgument newEntry: " + this.newEntry;
            return msg;
        }
    }

    /** Add tests for the clone method
     * to the overall test suite. */
    private void addTestSuiteFor$TestClone
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("clone");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("clone", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"clone\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestClone(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the clone method. */
    protected static class TestClone extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestClone(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("clone");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.clone();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'clone' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Add tests for the toString method
     * to the overall test suite. */
    private void addTestSuiteFor$TestToString
        (junit.framework.TestSuite overallTestSuite$)
    {
        junit.framework.TestSuite methodTests$
            = this.emptyTestSuiteFor("toString");
        try {
            org.jmlspecs.jmlunit.strategies.IndefiniteIterator
                receivers$iter
                = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator
                    (this.vorg_jmlspecs_samples_list_list2_OneWayListIter("toString", 0));
            this.check_has_data
                (receivers$iter,
                 "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_OneWayListIter(\"toString\", 0))");
            while (!receivers$iter.atEnd()) {
                final org.jmlspecs.samples.list.list2.OneWayList receiver$
                    = (org.jmlspecs.samples.list.list2.OneWayList) receivers$iter.get();
                methodTests$.addTest
                    (new TestToString(receiver$));
                receivers$iter.advance();
            }
        } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
            // methodTests$ doesn't want more tests
        }
        overallTestSuite$.addTest(methodTests$);
    }

    /** Test for the toString method. */
    protected static class TestToString extends OneTest {
        /** The receiver */
        private org.jmlspecs.samples.list.list2.OneWayList receiver$;

        /** Initialize this instance. */
        public TestToString(org.jmlspecs.samples.list.list2.OneWayList receiver$) {
            super("toString");
            this.receiver$ = receiver$;
        }

        protected void doCall() throws java.lang.Throwable {
            receiver$.toString();
        }

        protected java.lang.String failMessage
            (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$)
        {
            java.lang.String msg = "\n\tMethod 'toString' applied to";
            msg += "\n\tReceiver: " + this.receiver$;
            return msg;
        }
    }

    /** Check that the iterator is non-null and not empty. */
    private void
    check_has_data(org.jmlspecs.jmlunit.strategies.IndefiniteIterator iter,
                   String call)
    {
        if (iter == null) {
            junit.framework.Assert.fail(call + " returned null");
        }
        if (iter.atEnd()) {
            junit.framework.Assert.fail(call + " returned an empty iterator");
        }
    }

    /** Converts a char to a printable String for display */
    public static String charToString(char c) {
        if (c == '\n') {
            return "NL";
        } else if (c == '\r') {
            return "CR";
        } else if (c == '\t') {
            return "TAB";
        } else if (Character.isISOControl(c)) {
            int i = (int)c;
            return "\\u"
                    + Character.forDigit((i/2048)%16,16)
                    + Character.forDigit((i/256)%16,16)
                    + Character.forDigit((i/16)%16,16)
                    + Character.forDigit((i)%16,16);
        }
        return Character.toString(c);
    }
}


text:
@implementation SHTestsSuper

-(void)setUp; {
  self.vc        = UIViewController.new;
  [UIApplication sharedApplication].keyWindow.rootViewController = self.vc;
  [[UIApplication sharedApplication].keyWindow makeKeyAndVisible];

  self.vc.view.backgroundColor = [UIColor redColor];
  self.textField = UITextField.new;
  self.textField.accessibilityLabel = @"Damn place holder";
  [self.vc.view addSubview:self.textField];
  self.textField.frame = CGRectMake(50, 50, 200, 50);

}

@end


text:
#pragma once

#include "Element.h"
#include "ElementIteratorAssertions.h"
#include "Text.h"
#include <wtf/Vector.h>

namespace WebCore {

class ElementAndTextDescendantIterator {
public:
    ElementAndTextDescendantIterator();
    enum FirstChildTag { FirstChild };
    ElementAndTextDescendantIterator(ContainerNode& root, FirstChildTag);
    ElementAndTextDescendantIterator(ContainerNode& root, Node* current);

    ElementAndTextDescendantIterator& operator++() { return traverseNext(); }

    Node& operator*();
    Node* operator->();
    const Node& operator*() const;
    const Node* operator->() const;

    bool operator==(const ElementAndTextDescendantIterator& other) const;
    bool operator!=(const ElementAndTextDescendantIterator& other) const;

    bool operator!() const { return !m_depth; }
    explicit operator bool() const { return m_depth; }

    void dropAssertions();

    ElementAndTextDescendantIterator& traverseNext();
    ElementAndTextDescendantIterator& traverseNextSkippingChildren();
    ElementAndTextDescendantIterator& traverseNextSibling();
    ElementAndTextDescendantIterator& traversePreviousSibling();

    unsigned depth() const { return m_depth; }

private:
    static bool isElementOrText(const Node& node) { return is<Element>(node) || is<Text>(node); }
    static Node* firstChild(Node&);
    static Node* nextSibling(Node&);
    static Node* previousSibling(Node&);

    void popAncestorSiblingStack();

    Node* m_current;
    struct AncestorSibling {
        Node* node;
        unsigned depth;
    };
    Vector<AncestorSibling, 16> m_ancestorSiblingStack;
    unsigned m_depth { 0 };

#if !ASSERT_DISABLED
    ElementIteratorAssertions m_assertions;
#endif
};

class ElementAndTextDescendantIteratorAdapter {
public:
    explicit ElementAndTextDescendantIteratorAdapter(ContainerNode& root);
    ElementAndTextDescendantIterator begin();
    ElementAndTextDescendantIterator end();

private:
    ContainerNode& m_root;
};

ElementAndTextDescendantIteratorAdapter elementAndTextDescendants(ContainerNode&);

// ElementAndTextDescendantIterator

inline ElementAndTextDescendantIterator::ElementAndTextDescendantIterator()
    : m_current(nullptr)
{
}

inline ElementAndTextDescendantIterator::ElementAndTextDescendantIterator(ContainerNode& root, FirstChildTag)
    : m_current(firstChild(root))
#if !ASSERT_DISABLED
    , m_assertions(m_current)
#endif
{
    if (!m_current)
        return;
    m_ancestorSiblingStack.uncheckedAppend({ nullptr, 0 });
    m_depth = 1;
}

inline ElementAndTextDescendantIterator::ElementAndTextDescendantIterator(ContainerNode& root, Node* current)
    : m_current(current)
#if !ASSERT_DISABLED
    , m_assertions(m_current)
#endif
{
    if (!m_current)
        return;
    ASSERT(isElementOrText(*m_current));
    if (m_current == &root)
        return;

    Vector<Node*, 20> ancestorStack;
    auto* ancestor = m_current->parentNode();
    while (ancestor != &root) {
        ancestorStack.append(ancestor);
        ancestor = ancestor->parentNode();
    }

    m_ancestorSiblingStack.uncheckedAppend({ nullptr, 0 });
    for (unsigned i = ancestorStack.size(); i; --i) {
        if (auto* sibling = nextSibling(*ancestorStack[i - 1]))
            m_ancestorSiblingStack.append({ sibling, i });
    }

    m_depth = ancestorStack.size() + 1;
}

inline void ElementAndTextDescendantIterator::dropAssertions()
{
#if !ASSERT_DISABLED
    m_assertions.clear();
#endif
}

inline Node* ElementAndTextDescendantIterator::firstChild(Node& current)
{
    auto* node = current.firstChild();
    while (node && !isElementOrText(*node))
        node = node->nextSibling();
    return node;
}

inline Node* ElementAndTextDescendantIterator::nextSibling(Node& current)
{
    auto* node = current.nextSibling();
    while (node && !isElementOrText(*node))
        node = node->nextSibling();
    return node;
}

inline Node* ElementAndTextDescendantIterator::previousSibling(Node& current)
{
    auto* node = current.previousSibling();
    while (node && !isElementOrText(*node))
        node = node->previousSibling();
    return node;
}

inline void ElementAndTextDescendantIterator::popAncestorSiblingStack()
{
    m_current = m_ancestorSiblingStack.last().node;
    m_depth = m_ancestorSiblingStack.last().depth;
    m_ancestorSiblingStack.removeLast();

#if !ASSERT_DISABLED
    // Drop the assertion when the iterator reaches the end.
    if (!m_current)
        m_assertions.dropEventDispatchAssertion();
#endif
}

inline ElementAndTextDescendantIterator& ElementAndTextDescendantIterator::traverseNext()
{
    ASSERT(m_current);
    ASSERT(!m_assertions.domTreeHasMutated());

    auto* firstChild = ElementAndTextDescendantIterator::firstChild(*m_current);
    auto* nextSibling = ElementAndTextDescendantIterator::nextSibling(*m_current);
    if (firstChild) {
        if (nextSibling)
            m_ancestorSiblingStack.append({ nextSibling, m_depth });
        ++m_depth;
        m_current = firstChild;
        return *this;
    }
    if (!nextSibling) {
        popAncestorSiblingStack();
        return *this;
    }

    m_current = nextSibling;
    return *this;
}

inline ElementAndTextDescendantIterator& ElementAndTextDescendantIterator::traverseNextSkippingChildren()
{
    ASSERT(m_current);
    ASSERT(!m_assertions.domTreeHasMutated());

    auto* nextSibling = ElementAndTextDescendantIterator::nextSibling(*m_current);
    if (!nextSibling) {
        popAncestorSiblingStack();
        return *this;
    }

    m_current = nextSibling;
    return *this;
}

inline ElementAndTextDescendantIterator& ElementAndTextDescendantIterator::traverseNextSibling()
{
    ASSERT(m_current);
    ASSERT(!m_assertions.domTreeHasMutated());

    m_current = nextSibling(*m_current);

#if !ASSERT_DISABLED
    if (!m_current)
        m_assertions.dropEventDispatchAssertion();
#endif
    return *this;
}

inline ElementAndTextDescendantIterator& ElementAndTextDescendantIterator::traversePreviousSibling()
{
    ASSERT(m_current);
    ASSERT(!m_assertions.domTreeHasMutated());

    m_current = previousSibling(*m_current);

#if !ASSERT_DISABLED
    if (!m_current)
        m_assertions.dropEventDispatchAssertion();
#endif
    return *this;
}

inline Node& ElementAndTextDescendantIterator::operator*()
{
    ASSERT(m_current);
    ASSERT(isElementOrText(*m_current));
    ASSERT(!m_assertions.domTreeHasMutated());
    return *m_current;
}

inline Node* ElementAndTextDescendantIterator::operator->()
{
    ASSERT(m_current);
    ASSERT(isElementOrText(*m_current));
    ASSERT(!m_assertions.domTreeHasMutated());
    return m_current;
}

inline const Node& ElementAndTextDescendantIterator::operator*() const
{
    ASSERT(m_current);
    ASSERT(isElementOrText(*m_current));
    ASSERT(!m_assertions.domTreeHasMutated());
    return *m_current;
}

inline const Node* ElementAndTextDescendantIterator::operator->() const
{
    ASSERT(m_current);
    ASSERT(isElementOrText(*m_current));
    ASSERT(!m_assertions.domTreeHasMutated());
    return m_current;
}

inline bool ElementAndTextDescendantIterator::operator==(const ElementAndTextDescendantIterator& other) const
{
    ASSERT(!m_assertions.domTreeHasMutated());
    return m_current == other.m_current || (!m_depth && !other.m_depth);
}

inline bool ElementAndTextDescendantIterator::operator!=(const ElementAndTextDescendantIterator& other) const
{
    return !(*this == other);
}

// ElementAndTextDescendantIteratorAdapter

inline ElementAndTextDescendantIteratorAdapter::ElementAndTextDescendantIteratorAdapter(ContainerNode& root)
    : m_root(root)
{
}

inline ElementAndTextDescendantIterator ElementAndTextDescendantIteratorAdapter::begin()
{
    return ElementAndTextDescendantIterator(m_root, ElementAndTextDescendantIterator::FirstChild);
}

inline ElementAndTextDescendantIterator ElementAndTextDescendantIteratorAdapter::end()
{
    return { };
}

// Standalone functions

inline ElementAndTextDescendantIteratorAdapter elementAndTextDescendants(ContainerNode& root)
{
    return ElementAndTextDescendantIteratorAdapter(root);
}

} // namespace WebCore


text:
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!

#include "config.h"
#include "MediaKeyMessageEventInit.h"

namespace blink {

MediaKeyMessageEventInit::MediaKeyMessageEventInit()
{
    setMessageType(String("license-request"));
}

DEFINE_TRACE(MediaKeyMessageEventInit)
{
    EventInit::trace(visitor);
}

} // namespace blink


text:
@start('header')

    {{ $app->assets(['assets:vendor/uikit/js/addons/sortable.min.js'], $app['cockpit/version']) }}
    {{ $app->assets(['collections:assets/collections.js','collections:assets/js/index.js'], $app['cockpit/version']) }}

@end('header')

        @lang('Collections')

            <form class="uk-form uk-margin-remove uk-display-inline-block">

                    <input type="text" placeholder="@lang('Filter by name...')" data-ng-model="filter">

            </form>

        @hasaccess?("Collections", 'manage.collections')

        @end

                    <button class="uk-button" data-ng-class="mode=='list' ? 'uk-button-primary':''" data-ng-click="setListMode('list')" title="@lang('List mode')" data-uk-tooltip="{pos:'bottom'}"></button>
                    <button class="uk-button" data-ng-class="mode=='table' ? 'uk-button-primary':''" data-ng-click="setListMode('table')" title="@lang('Table mode')" data-uk-tooltip="{pos:'bottom'}"></button>

@lang("Groups")

@lang("All collections")

                         @@ group @@
                        @hasaccess?("Collections", 'manage.collections')

                        @end

                    @lang('Create groups to organize your collections.')

                @hasaccess?("Collections", 'manage.collections')

                    <button class="uk-button uk-button-success" title="@lang('Create new group')" data-uk-tooltip="{pos:'right'}" ng-click="addGroup()"></button>

                @end

                @@ (activegroup=='-all' ? '@lang("All collections")' : activegroup) @@

                        @@ collection.name @@

                            @@ collection.count @@ @lang('Entries')

 @lang('Show entries')

 @lang('Create new entry')

                                        @hasaccess?("Collections", 'manage.collections')

 @lang('Edit collection')

 @lang('Duplicate collection')

 @lang('Delete collection')

                                        @end

                            <input class="js-select-all" type="checkbox">
                            @lang('Collection')
                            @lang('Entries')

                            <input class="js-select" type="checkbox">

                                @@ collection.name @@

                            @@ collection.count @@

 @lang('Show entries')

 @lang('Create new entry')

                                            @hasaccess?("Collections", 'manage.collections')

 @lang('Edit collection')

 @lang('Duplicate collection')

 @lang('Delete collection')

                                            @end

                    <button class="uk-button uk-button-danger" data-ng-click="removeSelected()" data-ng-show="selected"> @lang('Delete')</button>

            @lang('You don\'t have any collections created.')

        @hasaccess?("Collections", 'manage.collections')
        @lang('Create a collection')
        @end


text:
using ComputerAlgebra;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Circuit
{
    public class UnitCastException : InvalidCastException
    {
        public UnitCastException(Units From, Units To)
            : base("Cannot convert quantity from '" + From.ToString() + "' to '" + To.ToString() + "'")
        { }
    }

    [TypeConverter("Circuit.QuantityConverter")]
    public class Quantity : IEquatable<Quantity>, IFormattable
    {
        private Expression x = 0;

        private Units units;
        public Units Units { get { return units; } set { units = value; } }

        public Quantity(Expression x, Units Units)
        {
            this.x = x;
            this.units = Units;
        }
        public Quantity() { units = null; }

        // Set the value of this quantity from another quantity, validating the units.
        public bool Set(Quantity Value)
        {
            if (Value.Units != units && Value.Units != Units.None)
                throw new UnitCastException(Value.Units, units);
            if (!Equals(x, Value.x))
            {
                x = Value.x;
                return true;
            }
            else
            {
                return false;
            }
        }

        private static Expression ParsePrefix(ref string s)
        {
            s = s.TrimEnd();
            if (s.Length < 2)
                return 1;

            if (Prefixes.TryGetValue(DeAliasPrefix(s[s.Length - 1].ToString()), out int prefix))
            {
                // Make sure this isn't just part of the word before the prefix.
                if (char.IsDigit(s[s.Length - 2]) || char.IsWhiteSpace(s[s.Length - 2]))
                {
                    s = s.Substring(0, s.Length - 1);
                    return ((Real)10) ^ prefix;
                }
            }
            return 1;
        }

        public static Quantity Parse(string s, CultureInfo culture)
        {
            Expression prefix = ParsePrefix(ref s);
            Units units = Units.None;
            if (prefix.EqualsOne())
            {
                units = Units.Parse(ref s);
                s = s.TrimEnd();
                prefix = ParsePrefix(ref s);
            }
            return new Quantity(prefix * Expression.Parse(s, culture), units);
        }

        public static Quantity Parse(string s, Units ExpectedUnits)
        {
            Quantity m = Parse(s);
            if (m.Units == Units.None)
                m.Units = ExpectedUnits;
            else if (m.Units != ExpectedUnits)
                throw new UnitCastException(m.Units, ExpectedUnits);
            return m;
        }

        public static Quantity Parse(string s) { return Parse(s, CultureInfo.InstalledUICulture); }

        public static implicit operator Expression(Quantity x) { return x.x; }
        public static implicit operator LazyExpression(Quantity x) { return new LazyExpression(x.x); }
        public static explicit operator Real(Quantity x) { return (Real)x.x; }
        public static explicit operator double(Quantity x) { return (double)x.x; }

        // IEquatable interface.
        public bool Equals(Quantity obj) { return this == obj; }

        // object interface.
        public override bool Equals(object obj) { return obj is Quantity quantity ? Equals(quantity) : base.Equals(obj); }
        public override int GetHashCode() { return x.GetHashCode() ^ units.GetHashCode(); }
        public override string ToString() { return ToString("G3", null); }

        // IFormattable interface.
        private static Dictionary<string, int> Prefixes = new Dictionary<string, int>()
        {
            { "f", -15 },
            { "p", -12 },
            { "n", -9 },
            { "\u03BC", -6 },
            { "m", -3 },
            { "", 0 },
            { "k", 3 },
            { "M", 6 },
            { "G", 9 },
            { "T", 12 },
        };
        private static int MinPrefix = Prefixes.Values.Min();
        private static int MaxPrefix = Prefixes.Values.Max();
        private static string DeAliasPrefix(string Prefix)
        {
            switch (Prefix)
            {
                case "u": return "\u03BC";
                default: return Prefix;
            }
        }

        public string ToString(string format, IFormatProvider formatProvider) { return ToString(x, units, format, formatProvider); }

        public static string ToString(Expression Value, Units Units, string format, IFormatProvider formatProvider)
        {
            StringBuilder SB = new StringBuilder();

            Constant constant = Value as Constant;
            if (constant != null)
            {
                if (format != null && format.StartsWith("+"))
                {
                    if (constant.Value >= 0)
                        SB.Append("+");
                    format = format.Remove(0, 1);
                }

                // Find out how many digits the format has.
                double round = 1.0;
                for (int significant = 12; significant > 0; --significant)
                {
                    round = 1.0 + 5 * Math.Pow(10.0, -significant);

                    if (double.Parse(round.ToString(format)) != 1.0)
                        break;
                }

                // Find the order of magnitude of the value.
                Real order = Real.Log10(Real.Abs(constant.Value.IsNaN() ? 0 : constant.Value) * round);
                if (order < -20) order = 0;
                else if (order == Real.Infinity) order = 0;

                int prefix = Math.Max(Math.Min((int)Real.Floor(order / 3) * 3, MaxPrefix), MinPrefix);

                Value /= (((Real)10) ^ prefix);
                SB.Append(Value.ToString(format, formatProvider));
                SB.Append(" ");
                SB.Append(Prefixes.Single(i => i.Value == prefix).Key);
            }
            else if (Value != null)
            {
                SB.Append(Convert.ToString((object)Value, formatProvider));
                SB.Append(" ");
            }
            else
            {
                SB.Append("0");
                SB.Append(" ");
            }
            SB.Append(Units);

            return SB.ToString().Trim();
        }

        public static string ToString(Expression Value, Units Units, string Format) { return ToString(Value, Units, Format, null); }
        public static string ToString(Expression Value, Units Units) { return ToString(Value, Units, "G3", null); }
    }
}