package org.ovirt.engine.core.utils;

import junit.framework.TestCase;

public class TicketingTest extends TestCase {
    public void testNoRepeats() {
        String sample = Ticketing.GenerateOTP();
        for (int x = 0; x < 1000; x++) {
            String other = Ticketing.GenerateOTP();
            assertNotSame(sample, other);
        }
    }
}

package org.ovirt.engine.core.utils;

import static org.junit.Assert.assertNotSame;

import org.junit.Test;

public class TicketingTest {
    @Test
    public void testNoRepeats() {
        String sample = Ticketing.GenerateOTP();
        for (int x = 0; x < 1000; x++) {
            String other = Ticketing.GenerateOTP();
            assertNotSame(sample, other);
        }
    }
}

Convert TicketingTest to JUnit4 syntax