SimpleName:IDENTIFIER 84 testEncryptBytesAssociated testEncryptBytesAssociated

SimpleName:IDENTIFIER 84 GeneralSecurityException GeneralSecurityException

SimpleName:IDENTIFIER 84 MissingParameterException MissingParameterException

SimpleName:IDENTIFIER 86 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 86 getProvider getProvider

SimpleName:IDENTIFIER 88 assertNotNull assertNotNull

SimpleName:IDENTIFIER 88 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 90 RandomStringUtils RandomStringUtils

SimpleName:IDENTIFIER 90 randomAlphabetic randomAlphabetic

SimpleName:IDENTIFIER 90 getBytes getBytes

SimpleName:IDENTIFIER 91 RandomStringUtils RandomStringUtils

SimpleName:IDENTIFIER 91 randomAlphabetic randomAlphabetic

SimpleName:IDENTIFIER 91 getBytes getBytes

SimpleName:IDENTIFIER 95 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 95 encrypt encrypt

SimpleName:IDENTIFIER 96 badCipher badCipher

SimpleName:IDENTIFIER 96 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 96 encrypt encrypt

SimpleName:IDENTIFIER 98 assertFalse assertFalse

SimpleName:IDENTIFIER 98 badCipher badCipher

SimpleName:IDENTIFIER 99 assertFalse assertFalse

SimpleName:IDENTIFIER 104 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 104 encrypt encrypt

SimpleName:IDENTIFIER 104 getBytes getBytes

@Test
public void testEncryptBytesAssociated() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    byte[] clear = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] assoc = RandomStringUtils.randomAlphabetic(20).getBytes();
    for (int i = 1; i < 10; i++) {
        byte[] cipher = aesEncryptionProvider.encrypt(clear, assoc);
        byte[] badCipher = aesEncryptionProvider.encrypt(clear);
        assertFalse(Arrays.equals(cipher, badCipher));
        assertFalse(Arrays.equals(cipher, clear));
    }
    aesEncryptionProvider.encrypt("".getBytes());
}

@Test(expected = MissingParameterException.class)
public void testEncryptBytesAssociated() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    byte[] clear = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] assoc = RandomStringUtils.randomAlphabetic(20).getBytes();
    for (int i = 1; i < 10; i++) {
        byte[] cipher = aesEncryptionProvider.encrypt(clear, assoc);
        byte[] badCipher = aesEncryptionProvider.encrypt(clear);
        assertFalse(Arrays.equals(cipher, badCipher));
        assertFalse(Arrays.equals(cipher, clear));
    }
    aesEncryptionProvider.encrypt("".getBytes());
}

package net.theblackchamber.crypto.providers;

import java.io.File;
import java.security.GeneralSecurityException;
import java.util.Arrays;
import java.util.Base64;
import java.util.Base64.Encoder;
import java.util.HashSet;
import java.util.Set;
import javax.crypto.SecretKey;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import com.google.crypto.tink.KeysetHandle;
import static org.junit.Assert.*;
import net.theblackchamber.crypto.constants.SupportedKeyGenAlgorithms;
import net.theblackchamber.crypto.exceptions.MissingParameterException;
import net.theblackchamber.crypto.exceptions.UnsupportedAlgorithmException;
import net.theblackchamber.crypto.exceptions.UnsupportedKeySizeException;
import net.theblackchamber.crypto.model.KeyConfig;
import net.theblackchamber.crypto.model.KeyConfig2;
import net.theblackchamber.crypto.providers.symmetric.AESEncryptionProvider;
import net.theblackchamber.crypto.providers.symmetric.AESEncryptionProvider2;
import net.theblackchamber.crypto.util.KeystoreUtils;
import net.theblackchamber.crypto.util.KeystoreUtils2;

public class adhoc_AESEncryptionProviderTest2 {

    KeysetHandle key;

    @Rule
    public TemporaryFolder tempFolder = new TemporaryFolder();

    @Before
    public void init() {
        try {
            File keyFile = tempFolder.newFile("keystore.keys");
            KeyConfig2 config = new KeyConfig2(keyFile, "test");
            KeystoreUtils2.generateSecretKey(config);
            key = KeystoreUtils2.getSecretKey(config);
            assertNotNull(key);
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 113 testEncryptBytes testEncryptBytes

SimpleName:IDENTIFIER 113 GeneralSecurityException GeneralSecurityException

SimpleName:IDENTIFIER 113 MissingParameterException MissingParameterException

SimpleName:IDENTIFIER 115 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 115 getProvider getProvider

SimpleName:IDENTIFIER 117 assertNotNull assertNotNull

SimpleName:IDENTIFIER 117 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 119 RandomStringUtils RandomStringUtils

SimpleName:IDENTIFIER 119 randomAlphabetic randomAlphabetic

SimpleName:IDENTIFIER 123 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 123 encrypt encrypt

SimpleName:IDENTIFIER 123 getBytes getBytes

SimpleName:IDENTIFIER 125 assertFalse assertFalse

SimpleName:IDENTIFIER 125 getBytes getBytes

SimpleName:IDENTIFIER 130 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 130 encrypt encrypt

SimpleName:IDENTIFIER 130 getBytes getBytes

@Test
public void testEncryptBytes() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    String clear = RandomStringUtils.randomAlphabetic(20);
    for (int i = 1; i < 10; i++) {
        byte[] cipher = aesEncryptionProvider.encrypt(clear.getBytes());
        assertFalse(Arrays.equals(cipher, clear.getBytes()));
    }
    aesEncryptionProvider.encrypt("".getBytes());
}

@Test(expected = MissingParameterException.class)
public void testEncryptBytes() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    String clear = RandomStringUtils.randomAlphabetic(20);
    for (int i = 1; i < 10; i++) {
        byte[] cipher = aesEncryptionProvider.encrypt(clear.getBytes());
        assertFalse(Arrays.equals(cipher, clear.getBytes()));
    }
    aesEncryptionProvider.encrypt("".getBytes());
}


SimpleName:IDENTIFIER 203 testDecryptBytes testDecryptBytes

SimpleName:IDENTIFIER 203 GeneralSecurityException GeneralSecurityException

SimpleName:IDENTIFIER 203 MissingParameterException MissingParameterException

SimpleName:IDENTIFIER 206 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 206 getProvider getProvider

SimpleName:IDENTIFIER 208 assertNotNull assertNotNull

SimpleName:IDENTIFIER 208 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 210 RandomStringUtils RandomStringUtils

SimpleName:IDENTIFIER 210 randomAlphabetic randomAlphabetic

SimpleName:IDENTIFIER 210 getBytes getBytes

SimpleName:IDENTIFIER 212 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 212 encrypt encrypt

SimpleName:IDENTIFIER 214 decrypted decrypted

SimpleName:IDENTIFIER 214 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 214 decrypt decrypt

SimpleName:IDENTIFIER 216 assertTrue assertTrue

SimpleName:IDENTIFIER 216 decrypted decrypted

SimpleName:IDENTIFIER 219 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 219 decrypt decrypt

SimpleName:IDENTIFIER 219 getBytes getBytes

@Test
public void testDecryptBytes() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    byte[] clear = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] cipher = aesEncryptionProvider.encrypt(clear);
    byte[] decrypted = aesEncryptionProvider.decrypt(cipher);
    assertTrue(Arrays.equals(clear, decrypted));
    aesEncryptionProvider.decrypt("".getBytes());
}

@Test(expected = MissingParameterException.class)
public void testDecryptBytes() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    byte[] clear = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] cipher = aesEncryptionProvider.encrypt(clear);
    byte[] decrypted = aesEncryptionProvider.decrypt(cipher);
    assertTrue(Arrays.equals(clear, decrypted));
    aesEncryptionProvider.decrypt("".getBytes());
}

SimpleName:IDENTIFIER 228 testDecryptBytesAssociated testDecryptBytesAssociated

SimpleName:IDENTIFIER 228 GeneralSecurityException GeneralSecurityException

SimpleName:IDENTIFIER 228 MissingParameterException MissingParameterException

SimpleName:IDENTIFIER 231 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 231 getProvider getProvider

SimpleName:IDENTIFIER 233 assertNotNull assertNotNull

SimpleName:IDENTIFIER 233 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 235 RandomStringUtils RandomStringUtils

SimpleName:IDENTIFIER 235 randomAlphabetic randomAlphabetic

SimpleName:IDENTIFIER 235 getBytes getBytes

SimpleName:IDENTIFIER 236 associated associated

SimpleName:IDENTIFIER 236 RandomStringUtils RandomStringUtils

SimpleName:IDENTIFIER 236 randomAlphabetic randomAlphabetic

SimpleName:IDENTIFIER 236 getBytes getBytes

SimpleName:IDENTIFIER 238 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 238 encrypt encrypt

SimpleName:IDENTIFIER 238 associated associated

SimpleName:IDENTIFIER 240 decrypted decrypted

SimpleName:IDENTIFIER 240 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 240 decrypt decrypt

SimpleName:IDENTIFIER 240 associated associated

SimpleName:IDENTIFIER 242 assertTrue assertTrue

SimpleName:IDENTIFIER 242 decrypted decrypted

SimpleName:IDENTIFIER 245 aesEncryptionProvider aesEncryptionProvider

SimpleName:IDENTIFIER 245 decrypt decrypt

SimpleName:IDENTIFIER 245 getBytes getBytes

@Test
public void testDecryptBytesAssociated() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    byte[] clear = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] associated = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] cipher = aesEncryptionProvider.encrypt(clear, associated);
    byte[] decrypted = aesEncryptionProvider.decrypt(cipher, associated);
    assertTrue(Arrays.equals(clear, decrypted));
    aesEncryptionProvider.decrypt("".getBytes());
}

@Test(expected = MissingParameterException.class)
public void testDecryptBytesAssociated() throws GeneralSecurityException, MissingParameterException {
    EncryptionProvider2 aesEncryptionProvider = EncryptionProviderFactory2.getProvider(key);
    assertNotNull(aesEncryptionProvider.getKey());
    byte[] clear = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] associated = RandomStringUtils.randomAlphabetic(20).getBytes();
    byte[] cipher = aesEncryptionProvider.encrypt(clear, associated);
    byte[] decrypted = aesEncryptionProvider.decrypt(cipher, associated);
    assertTrue(Arrays.equals(clear, decrypted));
    aesEncryptionProvider.decrypt("".getBytes());
}


SimpleName:IDENTIFIER 587 testValueOf testValueOf

SimpleName:IDENTIFIER 588 operatingSystem operatingSystem

SimpleName:IDENTIFIER 588 OperatingSystem OperatingSystem

SimpleName:IDENTIFIER 588 parseUserAgentString parseUserAgentString

SimpleName:IDENTIFIER 589 assertEquals assertEquals

SimpleName:IDENTIFIER 589 OperatingSystem OperatingSystem

SimpleName:IDENTIFIER 589 valueOf valueOf

SimpleName:IDENTIFIER 589 operatingSystem operatingSystem

SimpleName:IDENTIFIER 592 operatingSystem operatingSystem

SimpleName:IDENTIFIER 592 OperatingSystem OperatingSystem

SimpleName:IDENTIFIER 592 valueOf valueOf

"Should have thrown IllegalArgumentException"

@Test
public void testValueOf() {
    OperatingSystem operatingSystem = OperatingSystem.parseUserAgentString(symbian9phones[0]);
    assertEquals(OperatingSystem.valueOf(operatingSystem.getId()), operatingSystem);
    operatingSystem = OperatingSystem.valueOf((short) 0);
}

@Test(expected = IllegalArgumentException.class)
public void testValueOf() {
    OperatingSystem operatingSystem = OperatingSystem.parseUserAgentString(symbian9phones[0]);
    assertEquals(OperatingSystem.valueOf(operatingSystem.getId()), operatingSystem);
    operatingSystem = OperatingSystem.valueOf((short) 0);
}

package eu.bitwalker.useragentutils;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import eu.bitwalker.useragentutils.DeviceType;
import eu.bitwalker.useragentutils.OperatingSystem;

public class adhoc_OperatingSystemTest {

    String[] tablets = { "Mozilla/5.0 (Linux; U; Android 2.2; es-es; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "Mozilla/5.0 (Linux; U; Android 2.2; en-us; SCH-I800 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11", "Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)", "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)", "Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800; rotate)", "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ like Gecko) Version/0.0.1 Safari/534.8+", "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Transformer TF101 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; Android 5.0; Nexus 9 Build/LRX21L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Safari/537.36" };

    String[] genericMobile = { "Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0" };

    String[] genericTablet = { "Mozilla/5.0 (Tablet; rv:22.0) Gecko/22.0 Firefox/22.0" };

    String[] googleTV = { "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/161242", "Mozilla/5.0 (X11; U: Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/162671", "Mozilla/5.0 (X11; U: Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Large Screen Safari/533.4 GoogleTV/b39389" };

    String[] gameconsoles = { "Mozilla/5.0 (PLAYSTATION 3; 1.00)", "Opera/9.30 (Nintendo Wii; U; ; 2071; Wii Shop Channel/1.0; en)" };

    String[] windowsCEdivices = { "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2mini; PPC; 240x320)", "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; MDA Compact/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1", "HPiPAQhw6900/1.0/Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x240)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.8) PPC; 240x320; HTC_P3300/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1", "PPC; 240x320; HTC_P3450/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12)", "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; MDA compact/3.0 Profile/MIDP-2.0 Configuration/CLDC-1.1)", "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; MDA Vario/1.2 Profile/MIDP-2.0 Configuration/CLDC-1.1)", "HTC_S620 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12)", "HTCS620-Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 320x240)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; PPC)", "SAMSUNG-SGH-i600/1.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.8)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; Smartphone)", "HTC_TouchDual Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.6)", "Palm750/v0005 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.6) UP.Link/6.3.0.0.0" };

    String[] palmOsDevices = { "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-TunX; Blazer/4.3) 16;320x320", "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/Palm-D050; Blazer/4.3) 16;320x320)", "Mozilla/4.76 (compatible; MSIE 6.0; U; Windows 95; PalmSource; PalmOS; WebPro; Tungsten Proxyless 1.1 320x320x16)" };

    String[] webOS = { "Mozilla/5.0 (webOS/1.3; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Desktop/1.0", "Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0" };

    String[] symbian9phones = { "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/10.0.018; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413", "Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413", "NokiaN80-3/1.0552.0.7Series60/3.0Profile/MIDP-2.0Configuration/CLDC-1.1", "NokiaN73-1/3.0638.0.0.1 Series60/3.0 Profile/MIDP-2.0 Configuration/CLDC-1.1", "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE90-1/07.40.1.2; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413" };

    String[] symbian8phones = { "NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1" };

    String[] symbian7phones = { "Nokia3230/2.0 (5.0614.0) SymbianOS/7.0s Series60/2.1 Profile/MIDP-2.0Configuration/CLDC-1.0" };

    String[] symbianPhones = { "SonyEricssonP1i/R100 Mozilla/4.0 (compatible; MSIE 6.0; Symbian OS; 661) Opera 8.65 [nl]" };

    String[] meeGo = { "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13" };

    String[] sonyEricssonPhones = { "SonyEricssonK550i/R1JD Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1", "SonyEricssonK610i/R1CB Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1" };

    String[] iPhones = { "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; nl-nl) AppleWebKit/420.1 (KHTML, like Gecko)", "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko)", "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3", "Opera/9.80 (iPhone; Opera Mini/7.0.5/37.6116; U; en) Presto/2.12.423 Version/12.16" };

    String[] iPhone4 = { "Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7", "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7", "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)" };

    String[] iPhone5 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3", "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3" };

    String[] iPhone6 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25" };

    String[] iPhone7 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" };

    String[] iPhone8 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/538.34.9 (KHTML, like Gecko) Mobile/12A4265u" };

    String[] iPhone8_1 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B401 Safari/600.1.4" };

    String[] iPhone8_3 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4" };

    String[] iPhoneIos9 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1" };

    String[] iPhoneIos10 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1" };

    String[] iPhoneIos11 = { "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.21 (KHTML, like Gecko) Version/10.0 Mobile/15A5278f Safari/602.1" };

    String[] iPods = { "Mozilla/5.0 (iPod; U; CPU like Mac OS X; nl-nl) AppleWebKit/420.1 (KHTML, like Gecko)", "Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko)", "Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3" };

    String[] iPad = { "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10", "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10", "Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5", "Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3" };

    String[] iPadIos6 = { "Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25", "Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25" };

    String[] iPadIos7 = { "Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" };

    String[] iPadIos8 = { "Mozilla/5.0 (iPad; CPU OS 8_0 like Mac OS X) AppleWebKit/538.34.9 (KHTML, like Gecko) Mobile/12A4265u" };

    String[] iPadIos8_4 = { "Mozilla/5.0 (iPad; CPU OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H143 Safari/600.1.4" };

    String[] iPadIos9 = { "Mozilla/5.0 (iPad; CPU OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13D15 Safari/601.1" };

    String[] iPadIos10 = { "Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1" };

    String[] blackberries = { "BlackBerry8700/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/150", "BlackBerry8707/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/139", "BlackBerry7290/4.0.2 Profile/MIDP-2.0 Configuration/CLDC-1.1", "BlackBerry8310/4.2.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/120", "BlackBerry8100/4.2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/150" };

    String[] blackberry6 = { "Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-US) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.141 Mobile Safari/534.1+" };

    String[] blackberry7 = { "Mozilla/5.0 (BlackBerry; U; BlackBerry 9850; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.115 Mobile Safari/534.11+" };

    String[] android1g = { "Mozilla/5.0 (Linux; U; Android 1.6; nl-nl; T-Mobile G1 Build/DRC92) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1", "Mozilla/5.0 (Linux; U; Android 1.5; nl-nl; HTC Hero Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1" };

    String[] android2g = { "Mozilla/5.0 (Linux; U; Android 2.1; en-gb; Nexus One Build/ERD79) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17", "Mozilla/5.0 (Linux; U; Android 2.0; en-gb; Milestone Build/SHOLS_U2_01.03.1) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17" };

    String[] android4g = { "Mozilla/5.0 (Linux; U; Android 4.0.1; en-us; Galaxy Nexus Build/ICL41) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", "Mozilla/5.0 (Linux; Android 4.4; Nexus 4 Build/KRT16E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari" };

    String[] android5g = { "Mozilla/5.0 (Linux; Android 5.0; Nexus 4 Build/LRX21L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36" };

    String[] android6g = { "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 6.0; Nexus 5X Build/MDB08L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36" };

    String[] android8 = { "Mozilla/5.0 (Linux; Android 8.0.0; Pixel XL Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 8.0; SAMSUNG Pixel Build/OPR6.170623.012) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36" };

    String[] android2_tablet = { "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Kindle Fire Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" };

    String[] android3_tablet = { "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; Xoom Build/HRI66) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "Mozilla/5.0 (Linux; U; Android 3.1; en-us; GT-P7510 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13" };

    String[] android4_tablet = { "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Transformer TF101 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Xoom Build/IML77) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Safari/535.7", "Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-P7500 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.0; xx-xx; GT-P5100 Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; ASUS Transformer Pad TF700T Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; Android 4.4; Nexus 7 Build/KOT24) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Safari/537.36", "Mozilla/5.0 (Linux; U; Android 4.2; en-us; Nexus 10 Build/JOP12D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.2.2; nl-nl; SM-T310 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30", "Mozilla/5.0 (Linux; U; Android 4.1; xx-xx; ME301T Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30" };

    String[] android4_wearable = { "Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; Glass 1 Build/IMM76L; XE7) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30" };

    String[] android5_tablet = { "Mozilla/5.0 (Linux; Android 5.0; Nexus 9 Build/LRX21L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Safari/537.36" };

    String[] android6_tablet = { "Mozilla/5.0 (Linux; Android 6.0; Nexus 9 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Safari/537.36" };

    String[] androidMobile = { "Mozilla/5.0 (Android; Mobile; rv:23.0) Gecko/23.0 Firefox/23.0" };

    String[] androidTablet = { "Mozilla/5.0 (Android; Tablet; rv:23.0) Gecko/23.0 Firefox/23.0" };

    String[] chromeOS = { "Mozilla/5.0 (X11; CrOS armv7l 5500.100.6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.120 Safari/537.36", "Mozilla/5.0 (X11; CrOS x86_64 5841.73.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.126 Safari/537.36" };

    String[] windows98 = { "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Rogers Hi-Speed Internet; (R1 1.3))", "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b3) Gecko/20050713 SeaMonkey/1.0a" };

    String[] windowsXP = { "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)", "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727)" };

    String[] windowsVista = { "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)" };

    String[] windows7 = { "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; MSOffice 12)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Media Center PC 5.0; SLCC1; InfoPath.2)" };

    String[] windows8 = { "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)" };

    String[] windows81 = { "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko" };

    String[] windows10 = { "Mozilla/5.0 (Windows NT 6.4; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0 Build ID: 20141001101141", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0" };

    String[] windowsMobile7 = { "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0) Asus;Galaxy6", "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)" };

    String[] windowsMobile8 = { "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 820)" };

    String[] windowsMobile8_1 = { "Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; HTC; HTC6990LVW) like Gecko" };

    String[] windows10mobile = { "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; NOKIA; Lumia 735) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Mobile Safari/537.36 Edge/12.0" };

    String[] bada = { "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/S8500NEJE5; U; Bada/1.0; fr-fr) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WVGA SMM-MMS/1.2.0 NexPlayer/3.0 profile/MIDP-2.1 configuration/CLDC-1.1 OPN-B", "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/S8500XXJL2; U; Bada/1.2; de-de) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.2 Mobile WVGA SMM-MMS/1.2.0 OPN-B" };

    String[] maemo = { "Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2a1pre) Gecko/20091127 Firefox/3.5 Maemo Browser 1.5.6 RX-51 N900" };

    String[] ubuntu_touch = { "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4) AppleWebKit/537.36 Chromium/35.0.1870.2 Mobile Safari/537.36" };

    String[] linuxSmartTV = { "Opera/9.80 (Linux mips; ) Presto/2.12.407 Version/12.51 MB97/0.0.39.18 (DIGIHOME, Mxl661L32, wireless) VSTVB_MB97 SmartTvA/3.0.0", "Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV+2015; Maple2012) AppleWebKit/537.42+ (KHTML, like Gecko) SmartTV Safari/537.42+" };

    String[] ubuntu = { "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0" };

    String[] kindle2 = { "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.0 (screen 600x800)" };

    String[] kindle3 = { "Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800; rotate)" };

    String[] kindle_fire = { "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Kindle Fire Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true" };

    String[] tizen2_tv = { "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1", "Mozilla/5.0 (Linux; Tizen 2.3; SmartHub; SMART-TV; SmartTV; U; Maple2012) AppleWebKit/538.1+ (KHTML, like Gecko) TV Safari/538.1+" };

    String[] tizen2_mobile = { "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) SamsungBrowser/1.0 Mobile Safari/537.3", "Mozilla/5.0 (Linux; U; Tizen 2.0; en-us) AppleWebKit/537.1 (KHTML, like Gecko) Mobile TizenBrowser/2.0" };

    String[] tizen3_mobile = { "Mozilla/5.0 (Linux; Tizen 3.0; SAMSUNG SM-Z400Y) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.0 Chrome/47.0.2526.69 Mobile Safari/537.36" };

    String[] tizen3_tv = { "Mozilla/5.0 (SMART-TV; Linux; Tizen 3.0) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.0 Chrome/47.0.2526.69 TV safari/537.36" };

    String[] tizen = { "Opera/9.80 (Tizen; Opera Mini/7.6.9/36.2084; U; en) Presto/2.12.423 Version/12.16" };

    String[] roku = { "Roku/DVP-4.1 (024.01E01250A)", "Roku/DVP-3.0 (013.00E02227A)" };

    String[] proxy = { "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (via ggpht.com)" };

    String[] unknown = { null };

    public void testGroupRecursion() {
        assertEquals(OperatingSystem.ANDROID2_TABLET.getGroup(), OperatingSystem.ANDROID);
        assertEquals(OperatingSystem.BLACKBERRY6.getGroup(), OperatingSystem.BLACKBERRY);
        assertEquals(OperatingSystem.MAC_OS.getGroup(), OperatingSystem.MAC_OS);
    }

    private void testDeviceTypes(String[] agentStrings, DeviceType expectedDeviceType) {
        for (String agentString : agentStrings) {
            assertEquals(expectedDeviceType, OperatingSystem.parseUserAgentString(agentString).getDeviceType());
        }
    }

    private void testAgents(String[] agentStrings, OperatingSystem expectedOperatingSystem) {
        for (String agentString : agentStrings) {
            assertEquals(expectedOperatingSystem, OperatingSystem.parseUserAgentString(agentString));
        }
    }
    /*TEST PLACEHOLDER*/
}

Test method for {@link eu.bitwalker.useragentutils.OperatingSystem#valueOf(short)}

SimpleName:IDENTIFIER 605 testValueOfString testValueOfString

SimpleName:IDENTIFIER 606 operatingSystem operatingSystem

SimpleName:IDENTIFIER 606 OperatingSystem OperatingSystem

SimpleName:IDENTIFIER 606 parseUserAgentString parseUserAgentString

SimpleName:IDENTIFIER 607 assertEquals assertEquals

SimpleName:IDENTIFIER 607 OperatingSystem OperatingSystem

SimpleName:IDENTIFIER 607 valueOf valueOf

SimpleName:IDENTIFIER 607 operatingSystem operatingSystem

SimpleName:IDENTIFIER 607 toString toString

SimpleName:IDENTIFIER 610 operatingSystem operatingSystem

SimpleName:IDENTIFIER 610 OperatingSystem OperatingSystem

SimpleName:IDENTIFIER 610 valueOf valueOf

StringLiteralExpr:LITERAL 610 "illegal" "illegal"

@Test
public void testValueOfString() {
    OperatingSystem operatingSystem = OperatingSystem.parseUserAgentString(symbian9phones[0]);
    assertEquals(OperatingSystem.valueOf(operatingSystem.toString()), operatingSystem);
    operatingSystem = OperatingSystem.valueOf("illegal");
}

@Test(expected = IllegalArgumentException.class)
public void testValueOfString() {
    OperatingSystem operatingSystem = OperatingSystem.parseUserAgentString(symbian9phones[0]);
    assertEquals(OperatingSystem.valueOf(operatingSystem.toString()), operatingSystem);
    operatingSystem = OperatingSystem.valueOf("illegal");
}

Test method for {@link eu.bitwalker.useragentutils.OperatingSystem#valueOf(String)}


SimpleName:IDENTIFIER 54 expected expected

SimpleName:IDENTIFIER 54 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 55 testConstructor testConstructor

SimpleName:IDENTIFIER 56 println println

StringLiteralExpr:LITERAL
56
" - test constructor"
" - test constructor"

SimpleName:IDENTIFIER 57 ReverseSubsequenceMove ReverseSubsequenceMove

@Test(expected = IllegalArgumentException.class)
public void testConstructor() {
    System.out.println(" - test constructor");
    new ReverseSubsequenceMove(2, 2);
}

package org.jamesframework.ext.permutation.neigh.moves;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import org.jamesframework.ext.permutation.PermutationSolution;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

public class adhoc_ReverseSubsequenceMoveTest {

    private static final Random RG = new Random();

    @BeforeClass
    public static void setUpClass() {
        System.out.println("# Testing ReverseSubsequenceMove ...");
    }

    @AfterClass
    public static void tearDownClass() {
        System.out.println("# Done testing ReverseSubsequenceMove!");
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 30 expected expected

SimpleName:IDENTIFIER 30 RuntimeException RuntimeException

SimpleName:IDENTIFIER 31 testDataNull testDataNull

SimpleName:IDENTIFIER 32 checkLength checkLength

@Test(expected = RuntimeException.class)
public void testDataNull() {
    Util.checkLength(null, 3);
}

package org.abstractj.kalium.crypto;

import org.junit.Assert;
import org.junit.Test;

public class adhoc_UtilTest {
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 73 expected expected

SimpleName:IDENTIFIER 73 RuntimeException RuntimeException

SimpleName:IDENTIFIER 74 testDecryptFailsWithNull testDecryptFailsWithNull

SimpleName:IDENTIFIER 74 Exception Exception

SimpleName:IDENTIFIER 75 SecureRandom SecureRandom

SimpleName:IDENTIFIER 78 nextInt nextInt

SimpleName:IDENTIFIER 80 SealedBox SealedBox

SimpleName:IDENTIFIER 81 encrypt encrypt

SimpleName:IDENTIFIER 82 SealedBox SealedBox

SimpleName:IDENTIFIER 83 decrypt decrypt

@Test(expected = RuntimeException.class)
public void testDecryptFailsWithNull() throws Exception {
    SecureRandom r = new SecureRandom();
    byte[] pk = null;
    byte[] sk = null;
    byte[] m = new byte[r.nextInt(1000)];
    SealedBox sb = new SealedBox(pk);
    byte[] c = sb.encrypt(m);
    SealedBox sb2 = new SealedBox(sk, pk);
    sb2.decrypt(c);
}

package org.abstractj.kalium.crypto;

import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES;
import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES;
import static org.abstractj.kalium.NaCl.sodium;
import static org.junit.Assert.assertArrayEquals;
import java.security.SecureRandom;
import org.abstractj.kalium.keys.KeyPair;
import org.junit.Test;

public class adhoc_SealedBoxTest {
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 116 expected expected

SimpleName:IDENTIFIER 116 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 117 Exception Exception

StringLiteralExpr:LITERAL
118
"k\"ey\" = 1"
"k\"ey\" = 1"

@Test(expected = IllegalStateException.class)
public void should_fail_on_malformed_quoted_key() throws Exception {
    new Toml().read("k\"ey\" = 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_malformed_quoted_key() throws Exception {
    new Toml().read("k\"ey\" = 1");
}

package com.moandjiezana.toml;

import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import java.util.Map;
import org.junit.Test;

public class adhoc_QuotedKeysTest {

    private static class Quoted {

        String ʎǝʞ;

        Map<String, Object> map;
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 121 expected expected

SimpleName:IDENTIFIER 121 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 122 Exception Exception

StringLiteralExpr:LITERAL 123 "[a\"bc\"]" "[a\"bc\"]"

@Test(expected = IllegalStateException.class)
public void should_fail_on_malformed_quoted_table() throws Exception {
    new Toml().read("[a\"bc\"]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_malformed_quoted_table() throws Exception {
    new Toml().read("[a\"bc\"]");
}

SimpleName:IDENTIFIER 126 expected expected

SimpleName:IDENTIFIER 126 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 127 Exception Exception

@Test(expected = IllegalStateException.class)
public void should_fail_on_malformed_quoted_nested_table() throws Exception {
    new Toml().read("[a.a\"bc\"]");
}

SimpleName:IDENTIFIER 90 expected expected

SimpleName:IDENTIFIER 90 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 91 Exception Exception

StringLiteralExpr:LITERAL
92
"a = 200-"
"a = 200-"

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_number() throws Exception {
    new Toml().read("a = 200-");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_number() throws Exception {
    new Toml().read("a = 200-");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertEquals;
import org.junit.Test;

public class adhoc_NumberTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 95 expected expected

SimpleName:IDENTIFIER 95 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 96 Exception Exception

StringLiteralExpr:LITERAL
97
"number = 3.14  pi"
"number = 3.14  pi"

{
    new Toml().read("number = 3.14  pi");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_illegal_characters_after_float() throws Exception {
    new Toml().read("number = 3.14  pi");
}

{
    new Toml().read("number = 3.14  pi");
}

SimpleName:IDENTIFIER 100 expected expected

SimpleName:IDENTIFIER 100 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 101 Exception Exception

StringLiteralExpr:LITERAL
102
"number = 314  pi"
"number = 314  pi"

{
    new Toml().read("number = 314  pi");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_illegal_characters_after_integer() throws Exception {
    new Toml().read("number = 314  pi");
}

{
    new Toml().read("number = 314  pi");
}

SimpleName:IDENTIFIER 105 expected expected

SimpleName:IDENTIFIER 105 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
107
"answer = .12345"
"answer = .12345"

{
    new Toml().read("answer = .12345");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_without_leading_0() {
    new Toml().read("answer = .12345");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_without_leading_0() {
    new Toml().read("answer = .12345");
}

{
    new Toml().read("answer = .12345");
}

SimpleName:IDENTIFIER 110 expected expected

SimpleName:IDENTIFIER 110 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
112
"answer = -.12345"
"answer = -.12345"

@Test(expected = IllegalStateException.class)
public void should_fail_on_negative_float_without_leading_0() {
    new Toml().read("answer = -.12345");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_negative_float_without_leading_0() {
    new Toml().read("answer = -.12345");
}

SimpleName:IDENTIFIER 115 expected expected

SimpleName:IDENTIFIER 115 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
117
"answer = 1.-1"
"answer = 1.-1"

StringLiteralExpr:LITERAL
118
"answer = 1.+1"
"answer = 1.+1"

{
    new Toml().read("answer = 1.-1");
    new Toml().read("answer = 1.+1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_with_sign_after_dot() {
    new Toml().read("answer = 1.-1");
    new Toml().read("answer = 1.+1");
}

{
    new Toml().read("answer = 1.-1");
    new Toml().read("answer = 1.+1");
}

SimpleName:IDENTIFIER 121 expected expected

SimpleName:IDENTIFIER 121 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
123
"answer = 1."
"answer = 1."

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_without_digits_after_dot() {
    new Toml().read("answer = 1.");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_without_digits_after_dot() {
    new Toml().read("answer = 1.");
}

SimpleName:IDENTIFIER 126 expected expected

SimpleName:IDENTIFIER 126 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
128
"answer = -1."
"answer = -1."

{
    new Toml().read("answer = -1.");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_negative_float_without_digits_after_dot() {
    new Toml().read("answer = -1.");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_negative_float_without_digits_after_dot() {
    new Toml().read("answer = -1.");
}

{
    new Toml().read("answer = -1.");
}

SimpleName:IDENTIFIER 131 expected expected

SimpleName:IDENTIFIER 131 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
133
"answer = 1.E1"
"answer = 1.E1"

{
    new Toml().read("answer = 1.E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_without_digits_after_dot() {
    new Toml().read("answer = 1.E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_without_digits_after_dot() {
    new Toml().read("answer = 1.E1");
}

{
    new Toml().read("answer = 1.E1");
}

SimpleName:IDENTIFIER 136 expected expected

SimpleName:IDENTIFIER 136 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
138
"answer = -1.E1"
"answer = -1.E1"

{
    new Toml().read("answer = -1.E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_negative_exponent_without_digits_after_dot() {
    new Toml().read("answer = -1.E1");
}

{
    new Toml().read("answer = -1.E1");
}

SimpleName:IDENTIFIER 141 expected expected

SimpleName:IDENTIFIER 141 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
143
"answer = -1E1.0"
"answer = -1E1.0"

{
    new Toml().read("answer = -1E1.0");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_with_dot_in_exponent_part() {
    new Toml().read("answer = -1E1.0");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_with_dot_in_exponent_part() {
    new Toml().read("answer = -1E1.0");
}

{
    new Toml().read("answer = -1E1.0");
}

SimpleName:IDENTIFIER 146 expected expected

SimpleName:IDENTIFIER 146 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
148
"answer = -1E"
"answer = -1E"

{
    new Toml().read("answer = -1E");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_without_numbers_after_E() {
    new Toml().read("answer = -1E");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_without_numbers_after_E() {
    new Toml().read("answer = -1E");
}

{
    new Toml().read("answer = -1E");
}

SimpleName:IDENTIFIER 151 expected expected

SimpleName:IDENTIFIER 151 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
153
"answer = -1E1E1"
"answer = -1E1E1"

{
    new Toml().read("answer = -1E1E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_with_two_E() {
    new Toml().read("answer = -1E1E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_exponent_with_two_E() {
    new Toml().read("answer = -1E1E1");
}

{
    new Toml().read("answer = -1E1E1");
}

SimpleName:IDENTIFIER 156 expected expected

SimpleName:IDENTIFIER 156 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
158
"answer = 1.1.1"
"answer = 1.1.1"

{
    new Toml().read("answer = 1.1.1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_with_two_dots() {
    new Toml().read("answer = 1.1.1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_float_with_two_dots() {
    new Toml().read("answer = 1.1.1");
}

{
    new Toml().read("answer = 1.1.1");
}

SimpleName:IDENTIFIER 161 expected expected

SimpleName:IDENTIFIER 161 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
163
"answer = _1"
"answer = _1"

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_at_beginning() {
    new Toml().read("answer = _1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_at_beginning() {
    new Toml().read("answer = _1");
}

SimpleName:IDENTIFIER 166 expected expected

SimpleName:IDENTIFIER 166 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
168
"answer = 1_"
"answer = 1_"

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_at_end() {
    new Toml().read("answer = 1_");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_at_end() {
    new Toml().read("answer = 1_");
}

SimpleName:IDENTIFIER 171 expected expected

SimpleName:IDENTIFIER 171 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
173
"answer = 1__1"
"answer = 1__1"

{
    new Toml().read("answer = 1__1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_two_underscores_in_a_row() {
    new Toml().read("answer = 1__1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_two_underscores_in_a_row() {
    new Toml().read("answer = 1__1");
}

{
    new Toml().read("answer = 1__1");
}

SimpleName:IDENTIFIER 176 expected expected

SimpleName:IDENTIFIER 176 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
178
"answer = -_1"
"answer = -_1"

{
    new Toml().read("answer = -_1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_minus_sign() {
    new Toml().read("answer = -_1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_minus_sign() {
    new Toml().read("answer = -_1");
}

{
    new Toml().read("answer = -_1");
}

SimpleName:IDENTIFIER 181 expected expected

SimpleName:IDENTIFIER 181 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
183
"answer = +_1"
"answer = +_1"

{
    new Toml().read("answer = +_1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_plus_sign() {
    new Toml().read("answer = +_1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_plus_sign() {
    new Toml().read("answer = +_1");
}

{
    new Toml().read("answer = +_1");
}

SimpleName:IDENTIFIER 186 expected expected

SimpleName:IDENTIFIER 186 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
188
"answer = 1_.1"
"answer = 1_.1"

{
    new Toml().read("answer = 1_.1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_before_dot() {
    new Toml().read("answer = 1_.1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_before_dot() {
    new Toml().read("answer = 1_.1");
}

{
    new Toml().read("answer = 1_.1");
}

SimpleName:IDENTIFIER 191 expected expected

SimpleName:IDENTIFIER 191 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
193
"answer = 1._1"
"answer = 1._1"

{
    new Toml().read("answer = 1._1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_dot() {
    new Toml().read("answer = 1._1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_dot() {
    new Toml().read("answer = 1._1");
}

{
    new Toml().read("answer = 1._1");
}

SimpleName:IDENTIFIER 196 expected expected

SimpleName:IDENTIFIER 196 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
198
"answer = 1_E1"
"answer = 1_E1"

{
    new Toml().read("answer = 1_E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_before_E() {
    new Toml().read("answer = 1_E1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_before_E() {
    new Toml().read("answer = 1_E1");
}

{
    new Toml().read("answer = 1_E1");
}

SimpleName:IDENTIFIER 201 expected expected

SimpleName:IDENTIFIER 201 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
203
"answer = 1E_1"
"answer = 1E_1"

{
    new Toml().read("answer = 1E_1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_E() {
    new Toml().read("answer = 1E_1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_after_E() {
    new Toml().read("answer = 1E_1");
}

{
    new Toml().read("answer = 1E_1");
}

SimpleName:IDENTIFIER 206 expected expected

SimpleName:IDENTIFIER 206 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
208
"answer = _ 1"
"answer = _ 1"

{
    new Toml().read("answer = _ 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_followed_by_whitespace() {
    new Toml().read("answer = _ 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_underscore_followed_by_whitespace() {
    new Toml().read("answer = _ 1");
}

{
    new Toml().read("answer = _ 1");
}

SimpleName:IDENTIFIER 18 expected expected

SimpleName:IDENTIFIER 18 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
20
"answer = true abc"
"answer = true abc"

{
    new Toml().read("answer = true abc");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_boolean_true() {
    new Toml().read("answer = true abc");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_boolean_true() {
    new Toml().read("answer = true abc");
}

{
    new Toml().read("answer = true abc");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;

public class adhoc_BooleanTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 23 expected expected

SimpleName:IDENTIFIER 23 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
25
"answer = false abc"
"answer = false abc"

{
    new Toml().read("answer = false abc");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_boolean_false() {
    new Toml().read("answer = false abc");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_boolean_false() {
    new Toml().read("answer = false abc");
}

{
    new Toml().read("answer = false abc");
}

SimpleName:IDENTIFIER 44 expected expected

SimpleName:IDENTIFIER 44 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 45 Exception Exception

StringLiteralExpr:LITERAL 46 "[~]" "[~]"

@Test(expected = IllegalStateException.class)
public void should_fail_when_characters_outside_accept_range_are_used_in_table_name() throws Exception {
    new Toml().read("[~]");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertEquals;
import org.junit.Test;

public class adhoc_BareKeysTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 49 expected expected

SimpleName:IDENTIFIER 49 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 50 Exception Exception

StringLiteralExpr:LITERAL 51 "[[~]]" "[[~]]"

@Test(expected = IllegalStateException.class)
public void should_fail_when_characters_outside_accept_range_are_used_in_table_array_name() throws Exception {
    new Toml().read("[[~]]");
}

SimpleName:IDENTIFIER 54 expected expected

SimpleName:IDENTIFIER 54 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 55 Exception Exception

StringLiteralExpr:LITERAL
56
"a.b = 1"
"a.b = 1"

@Test(expected = IllegalStateException.class)
public void should_fail_when_dots_in_key_name() throws Exception {
    new Toml().read("a.b = 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_dots_in_key_name() throws Exception {
    new Toml().read("a.b = 1");
}

SimpleName:IDENTIFIER 59 expected expected

SimpleName:IDENTIFIER 59 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 60 Exception Exception

StringLiteralExpr:LITERAL
61
"~ = 1"
"~ = 1"

@Test(expected = IllegalStateException.class)
public void should_fail_when_characters_outside_accept_range_are_used_in_key_name() throws Exception {
    new Toml().read("~ = 1");
}

SimpleName:IDENTIFIER 64 expected expected

SimpleName:IDENTIFIER 64 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 65 Exception Exception

{
    new Toml().read("[group#]\nkey=1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_sharp_sign_in_table_name() throws Exception {
    new Toml().read("[group#]\nkey=1");
}

{
    new Toml().read("[group#]\nkey=1");
}

SimpleName:IDENTIFIER 69 expected expected

SimpleName:IDENTIFIER 69 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 70 Exception Exception

StringLiteralExpr:LITERAL
71
"[valid  key]"
"[valid  key]"

{
    new Toml().read("[valid  key]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_spaces_in_table_name() throws Exception {
    new Toml().read("[valid  key]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_spaces_in_table_name() throws Exception {
    new Toml().read("[valid  key]");
}

{
    new Toml().read("[valid  key]");
}

SimpleName:IDENTIFIER 74 expected expected

SimpleName:IDENTIFIER 74 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 75 Exception Exception

{
    new Toml().read("[[group#]]\nkey=1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_sharp_sign_in_table_array_name() throws Exception {
    new Toml().read("[[group#]]\nkey=1");
}

{
    new Toml().read("[[group#]]\nkey=1");
}

SimpleName:IDENTIFIER 79 expected expected

SimpleName:IDENTIFIER 79 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 80 Exception Exception

StringLiteralExpr:LITERAL
81
"[[valid  key]]"
"[[valid  key]]"

{
    new Toml().read("[[valid  key]]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_spaces_in_table_array_name() throws Exception {
    new Toml().read("[[valid  key]]");
}

{
    new Toml().read("[[valid  key]]");
}

SimpleName:IDENTIFIER 84 expected expected

SimpleName:IDENTIFIER 84 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 85 Exception Exception

StringLiteralExpr:LITERAL 86 "key?=true" "key?=true"

@Test(expected = IllegalStateException.class)
public void should_fail_on_question_marks_in_key_name() throws Exception {
    new Toml().read("key?=true");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_question_marks_in_key_name() throws Exception {
    new Toml().read("key?=true");
}

SimpleName:IDENTIFIER 89 expected expected

SimpleName:IDENTIFIER 89 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_empty_table_name() {
    new Toml().read("[]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_empty_table_name() {
    new Toml().read("[]");
}

SimpleName:IDENTIFIER 94 expected expected

SimpleName:IDENTIFIER 94 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_name_ending_with_empty_table_name() {
    new Toml().read("[a.]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_name_ending_with_empty_table_name() {
    new Toml().read("[a.]");
}

SimpleName:IDENTIFIER 99 expected expected

SimpleName:IDENTIFIER 99 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_name_containing_empty_table_name() {
    new Toml().read("[a..b]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_name_containing_empty_table_name() {
    new Toml().read("[a..b]");
}

SimpleName:IDENTIFIER 104 expected expected

SimpleName:IDENTIFIER 104 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_name_starting_with_empty_table_name() {
    new Toml().read("[.b]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_name_starting_with_empty_table_name() {
    new Toml().read("[.b]");
}

SimpleName:IDENTIFIER 109 expected expected

SimpleName:IDENTIFIER 109 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_array_name_ending_with_empty_table_name() {
    new Toml().read("[[a.]]");
}

SimpleName:IDENTIFIER 114 expected expected

SimpleName:IDENTIFIER 114 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_array_name_containing_empty_table_name() {
    new Toml().read("[[a..b]]");
}

SimpleName:IDENTIFIER 119 expected expected

SimpleName:IDENTIFIER 119 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_on_nested_table_array_name_starting_with_empty_table_name() {
    new Toml().read("[[.b]]");
}

SimpleName:IDENTIFIER 125 expected expected

SimpleName:IDENTIFIER 125 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 126 Exception Exception

@Test(expected = IllegalStateException.class)
public void should_fail_when_table_defined_twice() throws Exception {
    new Toml().read("[a]\nb=1\n[a]\nc=2");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_table_defined_twice() throws Exception {
    new Toml().read("[a]\nb=1\n[a]\nc=2");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;

public class adhoc_TableTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 130 expected expected

SimpleName:IDENTIFIER 130 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 131 Exception Exception

"[error]   if you didn't catch this, your parser is broken"

new Toml().read("[error]   if you didn't catch this, your parser is broken")

new Toml().read("[error]   if you didn't catch this, your parser is broken");

{
    new Toml().read("[error]   if you didn't catch this, your parser is broken");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_illegal_characters_after_table() throws Exception {
    new Toml().read("[error]   if you didn't catch this, your parser is broken");
}

{
    new Toml().read("[error]   if you didn't catch this, your parser is broken");
}

SimpleName:IDENTIFIER 166 expected expected

SimpleName:IDENTIFIER 166 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 167 Exception Exception

StringLiteralExpr:LITERAL
168
"tbl = { a. = 1 }"
"tbl = { a. = 1 }"

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_key() throws Exception {
    new Toml().read("tbl = { a. = 1 }");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_key() throws Exception {
    new Toml().read("tbl = { a. = 1 }");
}

package com.moandjiezana.toml;

import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class adhoc_InlineTableTest {

    private static final TimeZone UTC = TimeZone.getTimeZone("UTC");

    @Rule
    public ExpectedException e = ExpectedException.none();
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 171 expected expected

SimpleName:IDENTIFIER 171 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 172 Exception Exception

StringLiteralExpr:LITERAL
173
"tbl = { a = 1 "
"tbl = { a = 1 "

{
    new Toml().read("tbl = { a = 1 ");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_unterminated() throws Exception {
    new Toml().read("tbl = { a = 1 ");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_unterminated() throws Exception {
    new Toml().read("tbl = { a = 1 ");
}

{
    new Toml().read("tbl = { a = 1 ");
}

SimpleName:IDENTIFIER 176 expected expected

SimpleName:IDENTIFIER 176 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 177 Exception Exception

StringLiteralExpr:LITERAL
178
"tbl = { a = abc }"
"tbl = { a = abc }"

{
    new Toml().read("tbl = { a = abc }");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_value() throws Exception {
    new Toml().read("tbl = { a = abc }");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_invalid_value() throws Exception {
    new Toml().read("tbl = { a = abc }");
}

{
    new Toml().read("tbl = { a = abc }");
}

SimpleName:IDENTIFIER 182 Exception Exception

@Test
public void should_fail_when_key_duplicated_inside_inline_table() throws Exception {
    new Toml().read("tbl = { a = 1, a = 2 }");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_key_duplicated_inside_inline_table() throws Exception {
    new Toml().read("tbl = { a = 1, a = 2 }");
}

SimpleName:IDENTIFIER 190 Exception Exception

"Table already exists for key defined on line 2: tbl"

@Test
public void should_fail_when_duplicated_by_other_key() throws Exception {
    new Toml().read("tbl = { a = 1 }\n tbl = 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_duplicated_by_other_key() throws Exception {
    new Toml().read("tbl = { a = 1 }\n tbl = 1");
}

{
    new Toml().read("tbl = { a = 1 }\n tbl = 1");
}

SimpleName:IDENTIFIER 198 Exception Exception

"Duplicate table definition on line 2: [tbl]"

@Test
public void should_fail_when_duplicated_by_other_inline_table() throws Exception {
    new Toml().read("tbl = { a = 1 }\n tbl = {}");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_duplicated_by_other_inline_table() throws Exception {
    new Toml().read("tbl = { a = 1 }\n tbl = {}");
}

{
    new Toml().read("tbl = { a = 1 }\n tbl = {}");
}

SimpleName:IDENTIFIER 206 Exception Exception

@Test
public void should_fail_when_duplicated_by_top_level_table() throws Exception {
    new Toml().read("tbl = {}\n [tbl]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_duplicated_by_top_level_table() throws Exception {
    new Toml().read("tbl = {}\n [tbl]");
}

{
    new Toml().read("tbl = {}\n [tbl]");
}

SimpleName:IDENTIFIER 214 Exception Exception

"Duplicate table definition on line 3: [a.b]"

@Test
public void should_fail_when_duplicates_second_level_table() throws Exception {
    new Toml().read("[a.b]\n  [a]\n b = {}");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_duplicates_second_level_table() throws Exception {
    new Toml().read("[a.b]\n  [a]\n b = {}");
}

SimpleName:IDENTIFIER 222 Exception Exception

@Test
public void should_fail_when_inline_table_duplicates_table() throws Exception {
    new Toml().read("[a.b]\n [a]\n b = {}");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_inline_table_duplicates_table() throws Exception {
    new Toml().read("[a.b]\n [a]\n b = {}");
}

SimpleName:IDENTIFIER 230 Exception Exception

@Test
public void should_fail_when_second_level_table_duplicates_inline_table() throws Exception {
    new Toml().read("[a]\n b = {}\n  [a.b]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_second_level_table_duplicates_inline_table() throws Exception {
    new Toml().read("[a]\n b = {}\n  [a.b]");
}

SimpleName:IDENTIFIER 70 expected expected

SimpleName:IDENTIFIER 70 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 71 Exception Exception

StringLiteralExpr:LITERAL
72
" = 1"
" = 1"

@Test(expected = IllegalStateException.class)
public void should_fail_on_empty_key_name() throws Exception {
    new Toml().read(" = 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_empty_key_name() throws Exception {
    new Toml().read(" = 1");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.Calendar;
import java.util.TimeZone;
import org.hamcrest.Matchers;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class adhoc_TomlTest {

    @Rule
    public final ExpectedException expectedException = ExpectedException.none();
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 75 expected expected

SimpleName:IDENTIFIER 75 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 76 Exception Exception

StringLiteralExpr:LITERAL
77
"a# = 1"
"a# = 1"

@Test(expected = IllegalStateException.class)
public void should_fail_on_key_name_with_hash() throws Exception {
    new Toml().read("a# = 1");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_key_name_with_hash() throws Exception {
    new Toml().read("a# = 1");
}

SimpleName:IDENTIFIER 80 expected expected

SimpleName:IDENTIFIER 80 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 81 Exception Exception

StringLiteralExpr:LITERAL
82
"[a = 1"
"[a = 1"

@Test(expected = IllegalStateException.class)
public void should_fail_on_key_name_starting_with_square_bracket() throws Exception {
    new Toml().read("[a = 1");
}

SimpleName:IDENTIFIER 85 expected expected

SimpleName:IDENTIFIER 85 IllegalStateException IllegalStateException

@Test(expected = IllegalStateException.class)
public void should_fail_when_key_is_overwritten_by_table() {
    new Toml().read("[a]\nb=1\n[a.b]\nc=2");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_key_is_overwritten_by_table() {
    new Toml().read("[a]\nb=1\n[a.b]\nc=2");
}

SimpleName:IDENTIFIER 91 Exception Exception

@Test
public void should_fail_when_key_in_root_is_overwritten_by_table() throws Exception {
    new Toml().read("a=1\n  [a]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_key_in_root_is_overwritten_by_table() throws Exception {
    new Toml().read("a=1\n  [a]");
}

SimpleName:IDENTIFIER 96 expected expected

SimpleName:IDENTIFIER 96 IllegalStateException IllegalStateException

{
    new Toml().read("[fruit]\ntype=\"apple\"\ntype=\"orange\"");
}

@Test(expected = IllegalStateException.class)
public void should_fail_when_key_is_overwritten_by_another_key() {
    new Toml().read("[fruit]\ntype=\"apple\"\ntype=\"orange\"");
}

{
    new Toml().read("[fruit]\ntype=\"apple\"\ntype=\"orange\"");
}

SimpleName:IDENTIFIER 118 expected expected

SimpleName:IDENTIFIER 118 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL 120 "[[]]" "[[]]"

@Test(expected = IllegalStateException.class)
public void should_fail_on_empty_table_array_name() {
    new Toml().read("[[]]");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_empty_table_array_name() {
    new Toml().read("[[]]");
}

package com.moandjiezana.toml;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import java.io.File;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;

public class adhoc_TableArrayTest {

    private File file(String fileName) {
        return new File(getClass().getResource(fileName + ".toml").getFile());
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 69 expected expected

SimpleName:IDENTIFIER 69 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 70 Exception Exception

@Test(expected = IllegalStateException.class)
public void should_fail_on_non_existant_date() throws Exception {
    new Toml().read("d = 2012-13-01T15:00:00Z");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertEquals;
import java.util.Calendar;
import java.util.TimeZone;
import org.junit.Test;

public class adhoc_DateTest {

    private static final TimeZone UTC = TimeZone.getTimeZone("UTC");
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 83 expected expected

SimpleName:IDENTIFIER 83 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 84 Exception Exception

StringLiteralExpr:LITERAL 85 "key=\"\\m\"" "key=\"\\m\""

@Test(expected = IllegalStateException.class)
public void should_fail_on_reserved_special_character_in_strings() throws Exception {
    new Toml().read("key=\"\\m\"");
}

package com.moandjiezana.toml;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.File;
import org.junit.Test;
import com.moandjiezana.toml.testutils.Utils;

public class adhoc_StringTest {

    private File file(String file) {
        return Utils.file(getClass(), file);
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 88 expected expected

SimpleName:IDENTIFIER 88 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 89 Exception Exception

StringLiteralExpr:LITERAL 90 "key=\"\\/\"" "key=\"\\/\""

@Test(expected = IllegalStateException.class)
public void should_fail_on_escaped_slash() throws Exception {
    new Toml().read("key=\"\\/\"");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_escaped_slash() throws Exception {
    new Toml().read("key=\"\\/\"");
}

SimpleName:IDENTIFIER 93 expected expected

SimpleName:IDENTIFIER 93 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
95
"a = ' ' jdkf"
"a = ' ' jdkf"

{
    new Toml().read("a = ' ' jdkf");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_text_after_literal_string() {
    new Toml().read("a = ' ' jdkf");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_text_after_literal_string() {
    new Toml().read("a = ' ' jdkf");
}

{
    new Toml().read("a = ' ' jdkf");
}

SimpleName:IDENTIFIER 98 expected expected

SimpleName:IDENTIFIER 98 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 99 Exception Exception

StringLiteralExpr:LITERAL
100
"a = 'some text"
"a = 'some text"

{
    new Toml().read("a = 'some text");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_unterminated_literal_string() throws Exception {
    new Toml().read("a = 'some text");
}

{
    new Toml().read("a = 'some text");
}

SimpleName:IDENTIFIER 103 expected expected

SimpleName:IDENTIFIER 103 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 104 Exception Exception

StringLiteralExpr:LITERAL
105
"a = '''some\n text\n''\nb = '''1'''"
"a = '''some\n text\n''\nb = '''1'''"

new Toml().read("a = '''some\n text\n''\nb = '''1'''")

@Test(expected = IllegalStateException.class)
public void should_fail_on_multiline_literal_string_with_malformed_comment() throws Exception {
    new Toml().read("a = '''some\n text\n''\nb = '''1'''");
}

SimpleName:IDENTIFIER 108 expected expected

SimpleName:IDENTIFIER 108 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 109 Exception Exception

StringLiteralExpr:LITERAL
110
"a = '''some\n text\n''"
"a = '''some\n text\n''"

new Toml().read("a = '''some\n text\n''")

new Toml().read("a = '''some\n text\n''");

{
    new Toml().read("a = '''some\n text\n''");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_unterminated_multiline_literal_string() throws Exception {
    new Toml().read("a = '''some\n text\n''");
}

{
    new Toml().read("a = '''some\n text\n''");
}

SimpleName:IDENTIFIER 113 expected expected

SimpleName:IDENTIFIER 113 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 114 Exception Exception

StringLiteralExpr:LITERAL
115
"a = '''some text''"
"a = '''some text''"

{
    new Toml().read("a = '''some text''");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_unterminated_multiline_literal_string_on_single_line() throws Exception {
    new Toml().read("a = '''some text''");
}

{
    new Toml().read("a = '''some text''");
}

SimpleName:IDENTIFIER 118 expected expected

SimpleName:IDENTIFIER 118 IllegalStateException IllegalStateException

StringLiteralExpr:LITERAL
120
"a = \"\"\" \"\"\" jdkf"
"a = \"\"\" \"\"\" jdkf"

@Test(expected = IllegalStateException.class)
public void should_fail_on_text_outside_multiline_string() {
    new Toml().read("a = \"\"\" \"\"\" jdkf");
}

@Test(expected = IllegalStateException.class)
public void should_fail_on_text_outside_multiline_string() {
    new Toml().read("a = \"\"\" \"\"\" jdkf");
}

SimpleName:IDENTIFIER 123 expected expected

SimpleName:IDENTIFIER 123 IllegalStateException IllegalStateException

SimpleName:IDENTIFIER 124 Exception Exception

StringLiteralExpr:LITERAL
125
"a = \"\"\"some text\"\""
"a = \"\"\"some text\"\""

new Toml().read("a = \"\"\"some text\"\"")

new Toml().read("a = \"\"\"some text\"\"");

@Test(expected = IllegalStateException.class)
public void should_fail_on_unterminated_multiline_string() throws Exception {
    new Toml().read("a = \"\"\"some text\"\"");
}


SimpleName:IDENTIFIER 98 Exception Exception

@Test
public void should_not_support_setValue_method() throws Exception {
    Map.Entry<String, Object> entry = new Toml().read("a = 1").entrySet().iterator().next();
    entry.setValue(2L);
}

@Test(expected = UnsupportedOperationException.class)
public void should_not_support_setValue_method() throws Exception {
    Map.Entry<String, Object> entry = new Toml().read("a = 1").entrySet().iterator().next();
    entry.setValue(2L);
}

package com.moandjiezana.toml;

import static java.util.Arrays.asList;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import com.moandjiezana.toml.testutils.Utils;

public class adhoc_IterationTest {

    @Rule
    public final ExpectedException expectedException = ExpectedException.none();

    private File file(String name) {
        return Utils.file(getClass(), "/IteratorTest/" + name);
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 25 requiredMissing requiredMissing

"Missing required value for key \"foo\"."

@Test
public void requiredMissing() {
    Map<String, String> map = new HashMap<>();
    Get.required(map, "foo");
}

@Test(expected = NoSuchElementException.class)
public void requiredMissing() {
    Map<String, String> map = new HashMap<>();
    Get.required(map, "foo");
}

package fun.mike.map.alpha;

import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.junit.Assert.assertEquals;

public class adhoc_GetStringStringTest {

    @Rule
    public final ExpectedException thrown = ExpectedException.none();
    /*TEST PLACEHOLDER*/
}

@Test
public void requiredMissing() {
    Map<String, Object> map = new HashMap<>();
    Get.required(map, "foo");
}

@Test(expected = NoSuchElementException.class)
public void requiredMissing() {
    Map<String, Object> map = new HashMap<>();
    Get.required(map, "foo");
}

package fun.mike.map.alpha;

import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.junit.Assert.assertEquals;

public class adhoc_GetStringObjectTest {

    @Rule
    public final ExpectedException thrown = ExpectedException.none();
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 628 expected expected

SimpleName:IDENTIFIER 628 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 631 userClient userClient

SimpleName:IDENTIFIER 631 getUserList getUserList

SimpleName:IDENTIFIER 632 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 634 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
636
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 636 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
637
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 637 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetUserList_StartNegative() {
    try {
        userClient.getUserList(-1, 3);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

package cn.jmessage.api.user;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import cn.jmessage.api.common.model.*;
import cn.jmessage.api.common.model.friend.FriendNote;
import cn.jmessage.api.common.model.group.GroupShieldPayload;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import cn.jiguang.common.resp.APIConnectionException;
import cn.jiguang.common.resp.APIRequestException;
import cn.jiguang.common.resp.ResponseWrapper;
import cn.jmessage.api.BaseTest;
import cn.jmessage.api.SlowTests;

@Category(SlowTests.class)
public class adhoc_UserClientTest extends BaseTest {

    private static Logger LOG = LoggerFactory.getLogger(adhoc_UserClientTest.class);

    private UserClient userClient = null;

    @Before
    public void before() throws Exception {
        userClient = new UserClient(APP_KEY, MASTER_SECRET);
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 641 expected expected

SimpleName:IDENTIFIER 641 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 644 userClient userClient

SimpleName:IDENTIFIER 644 getUserList getUserList

SimpleName:IDENTIFIER 645 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 647 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
649
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 649 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
650
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 650 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetUserList_CountNegative() {
    try {
        userClient.getUserList(0, -1);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

SimpleName:IDENTIFIER 654 expected expected

SimpleName:IDENTIFIER 654 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 657 userClient userClient

SimpleName:IDENTIFIER 657 getUserList getUserList

SimpleName:IDENTIFIER 658 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 660 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
662
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 662 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
663
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 663 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetUserList_CountMoreThan500() {
    try {
        userClient.getUserList(0, 501);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}


SimpleName:IDENTIFIER 681 expected expected

SimpleName:IDENTIFIER 681 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 684 userClient userClient

SimpleName:IDENTIFIER 684 getAdminListByAppkey getAdminListByAppkey

{
    userClient.getAdminListByAppkey(-1, 3);
}

SimpleName:IDENTIFIER 685 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 687 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
689
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 689 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
690
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 690 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetAdminListByAppkey_StartNegative() {
    try {
        userClient.getAdminListByAppkey(-1, 3);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

SimpleName:IDENTIFIER 694 expected expected

SimpleName:IDENTIFIER 694 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 697 userClient userClient

SimpleName:IDENTIFIER 697 getAdminListByAppkey getAdminListByAppkey

{
    userClient.getAdminListByAppkey(0, -1);
}

SimpleName:IDENTIFIER 698 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 700 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
702
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 702 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
703
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 703 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetAdminListByAppkey_CountNegative() {
    try {
        userClient.getAdminListByAppkey(0, -1);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

SimpleName:IDENTIFIER 707 expected expected

SimpleName:IDENTIFIER 707 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 710 userClient userClient

SimpleName:IDENTIFIER 710 getAdminListByAppkey getAdminListByAppkey

{
    userClient.getAdminListByAppkey(0, 501);
}

SimpleName:IDENTIFIER 711 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 713 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
715
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 715 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
716
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 716 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetAdminListByAppkey_CountMoreThan500() {
    try {
        userClient.getAdminListByAppkey(0, 501);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}


SimpleName:IDENTIFIER 404 expected expected

SimpleName:IDENTIFIER 404 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 407 messageClient messageClient

SimpleName:IDENTIFIER 407 getMessageList getMessageList

SimpleName:IDENTIFIER 408 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 410 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
412
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 412 getStatus getStatus

StringLiteralExpr:LITERAL
413
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 413 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testGetMessageList_invalidCount() {
    try {
        MessageListResult result = messageClient.getMessageList(1001, null, null);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

package cn.jmessage.api.message;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import cn.jiguang.common.resp.ResponseWrapper;
import cn.jmessage.api.JMessageClient;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonObject;
import cn.jiguang.common.resp.APIConnectionException;
import cn.jiguang.common.resp.APIRequestException;
import cn.jmessage.api.BaseTest;
import cn.jmessage.api.SlowTests;
import cn.jmessage.api.common.model.message.MessageBody;
import cn.jmessage.api.common.model.message.MessagePayload;

@Category(SlowTests.class)
public class adhoc_MessageClientTest extends BaseTest {

    private static Logger LOG = LoggerFactory.getLogger(adhoc_MessageClientTest.class);

    private MessageClient messageClient = null;

    private static String cursor;

    @Before
    public void before() throws Exception {
        messageClient = new MessageClient(APP_KEY, MASTER_SECRET);
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 113 expected expected

SimpleName:IDENTIFIER 113 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 116 groupClient groupClient

SimpleName:IDENTIFIER 116 getGroupListByAppkey getGroupListByAppkey

{
    groupClient.getGroupListByAppkey(-1, 3);
}

SimpleName:IDENTIFIER 117 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 119 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
121
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 121 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
122
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 122 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetGroupListByAppkey_StartNegative() {
    try {
        groupClient.getGroupListByAppkey(-1, 3);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

package cn.jmessage.api.group;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import cn.jiguang.common.resp.APIConnectionException;
import cn.jiguang.common.resp.APIRequestException;
import cn.jiguang.common.resp.ResponseWrapper;
import cn.jmessage.api.BaseTest;
import cn.jmessage.api.SlowTests;
import cn.jmessage.api.common.model.group.GroupPayload;
import cn.jmessage.api.common.model.Members;

@Category(SlowTests.class)
public class adhoc_GroupClientTest extends BaseTest {

    private static Logger LOG = LoggerFactory.getLogger(adhoc_GroupClientTest.class);

    private GroupClient groupClient = null;

    @Before
    public void before() throws Exception {
        groupClient = new GroupClient(APP_KEY, MASTER_SECRET);
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 126 expected expected

SimpleName:IDENTIFIER 126 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 129 groupClient groupClient

SimpleName:IDENTIFIER 129 getGroupListByAppkey getGroupListByAppkey

{
    groupClient.getGroupListByAppkey(0, -1);
}

SimpleName:IDENTIFIER 130 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 132 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
134
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 134 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
135
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 135 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetGroupListByAppkey_CountNegative() {
    try {
        groupClient.getGroupListByAppkey(0, -1);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}

SimpleName:IDENTIFIER 139 expected expected

SimpleName:IDENTIFIER 139 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 142 groupClient groupClient

SimpleName:IDENTIFIER 142 getGroupListByAppkey getGroupListByAppkey

{
    groupClient.getGroupListByAppkey(0, 501);
}

SimpleName:IDENTIFIER 143 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

SimpleName:IDENTIFIER 145 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
147
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 147 getStatus getStatus

LOG.info("HTTP Status: " + e.getStatus())

LOG.info("HTTP Status: " + e.getStatus());

StringLiteralExpr:LITERAL
148
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 148 getMessage getMessage

LOG.info("Error Message: " + e.getMessage())

LOG.info("Error Message: " + e.getMessage());

@Test(expected = IllegalArgumentException.class)
public void testGetGroupListByAppkey_CountMoreThan500() {
    try {
        groupClient.getGroupListByAppkey(0, 501);
    } catch (APIConnectionException e) {
        LOG.error("Connection error. Should retry later. ", e);
    } catch (APIRequestException e) {
        LOG.error("Error response from JPush server. Should review and fix it. ", e);
        LOG.info("HTTP Status: " + e.getStatus());
        LOG.info("Error Message: " + e.getMessage());
    }
}