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 33 Exception Exception

StringLiteralExpr:LITERAL 35 "missing" "missing"

@Test
public void should_fail_on_missing_file() throws Exception {
    new Toml().read(new File("missing"));
}

@Test(expected = RuntimeException.class)
public void should_fail_on_missing_file() throws Exception {
    new Toml().read(new File("missing"));
}

package com.moandjiezana.toml;

import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import org.junit.Test;

public class adhoc_TomlReadTest {
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 43 Exception Exception

SimpleName:IDENTIFIER 44 readerThatThrows readerThatThrows

SimpleName:IDENTIFIER 47 IOException IOException

SimpleName:IDENTIFIER 48 IOException IOException

SimpleName:IDENTIFIER 52 IOException IOException

SimpleName:IDENTIFIER 56 readerThatThrows readerThatThrows

@Test
public void should_fail_on_io_error() throws Exception {
    Reader readerThatThrows = new Reader() {

        @Override
        public int read(char[] cbuf, int off, int len) throws IOException {
            throw new IOException();
        }

        @Override
        public void close() throws IOException {
        }
    };
    new Toml().read(readerThatThrows);
}

@Test(expected = RuntimeException.class)
public void should_fail_on_io_error() throws Exception {
    Reader readerThatThrows = new Reader() {

        @Override
        public int read(char[] cbuf, int off, int len) throws IOException {
            throw new IOException();
        }

        @Override
        public void close() throws IOException {
        }
    };
    new Toml().read(readerThatThrows);
}


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 95 invalidUrl invalidUrl

"Invalid URL value \"hewa:/ea90mS-fwa\" for key \"foo\": Scheme \"hewa\" not allowed. Allowed schemes: http, https"

@Test
public void invalidUrl() {
    Map<String, Object> map = new HashMap<>();
    map.put("foo", "hewa:/ea90mS-fwa");
    Get.populatedUrl(map, "foo");
}

@Test(expected = IllegalArgumentException.class)
public void invalidUrl() {
    Map<String, Object> map = new HashMap<>();
    map.put("foo", "hewa:/ea90mS-fwa");
    Get.populatedUrl(map, "foo");
}


SimpleName:IDENTIFIER 290 expected expected

SimpleName:IDENTIFIER 290 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 291 testRegisterUserNull testRegisterUserNull

SimpleName:IDENTIFIER 293 userClient userClient

SimpleName:IDENTIFIER 293 registerUsers registerUsers

SimpleName:IDENTIFIER 294 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 296 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
298
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 298 getStatus getStatus

StringLiteralExpr:LITERAL
299
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 299 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testRegisterUserNull() {
    try {
        userClient.registerUsers(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.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 332 expected expected

SimpleName:IDENTIFIER 332 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 333 testRegisterAdminNull testRegisterAdminNull

SimpleName:IDENTIFIER 335 userClient userClient

SimpleName:IDENTIFIER 335 registerAdmins registerAdmins

{
    userClient.registerAdmins(null);
}

SimpleName:IDENTIFIER 336 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 338 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
340
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 340 getStatus getStatus

StringLiteralExpr:LITERAL
341
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 341 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testRegisterAdminNull() {
    try {
        userClient.registerAdmins(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());
    }
}


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());
    }
}

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 56 expected expected

SimpleName:IDENTIFIER 56 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 59 groupClient groupClient

SimpleName:IDENTIFIER 59 getGroupInfo getGroupInfo

SimpleName:IDENTIFIER 60 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 62 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
64
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 64 getStatus getStatus

StringLiteralExpr:LITERAL
65
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 65 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testGetGroupInfo_GidNegative() {
    try {
        groupClient.getGroupInfo(-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());
    }
}

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 83 expected expected

SimpleName:IDENTIFIER 83 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 86 groupClient groupClient

SimpleName:IDENTIFIER 86 getGroupMembers getGroupMembers

{
    groupClient.getGroupMembers(-1);
}

SimpleName:IDENTIFIER 87 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 89 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
91
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 91 getStatus getStatus

StringLiteralExpr:LITERAL
92
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 92 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testGetGroupMembers_GidNegative() {
    try {
        groupClient.getGroupMembers(-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 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());
    }
}

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());
    }
}


SimpleName:IDENTIFIER 193 expected expected

SimpleName:IDENTIFIER 193 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 194 testCreateGroupNull testCreateGroupNull

SimpleName:IDENTIFIER 196 groupClient groupClient

SimpleName:IDENTIFIER 196 createGroup createGroup

SimpleName:IDENTIFIER 197 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 199 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
201
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 201 getStatus getStatus

StringLiteralExpr:LITERAL
202
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 202 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testCreateGroupNull() {
    try {
        groupClient.createGroup(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());
    }
}


SimpleName:IDENTIFIER 206 expected expected

SimpleName:IDENTIFIER 206 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 208 payload payload

SimpleName:IDENTIFIER 208 GroupPayload GroupPayload

SimpleName:IDENTIFIER 208 newBuilder newBuilder

SimpleName:IDENTIFIER 209 setName setName

SimpleName:IDENTIFIER 210 setDesc setDesc

StringLiteralExpr:LITERAL
210
"for junit test"
"for junit test"

@Test(expected = IllegalArgumentException.class)
public void testCreateGroup_GroupOwnerNull() {
    GroupPayload payload = GroupPayload.newBuilder().setName("junit_test_group").setDesc("for junit test").build();
}

SimpleName:IDENTIFIER 214 expected expected

SimpleName:IDENTIFIER 214 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 216 payload payload

SimpleName:IDENTIFIER 216 GroupPayload GroupPayload

SimpleName:IDENTIFIER 216 newBuilder newBuilder

SimpleName:IDENTIFIER 217 setOwner setOwner

SimpleName:IDENTIFIER 218 setDesc setDesc

StringLiteralExpr:LITERAL
218
"for junit test"
"for junit test"

@Test(expected = IllegalArgumentException.class)
public void testCreateGroup_GroupNameNull() {
    GroupPayload payload = GroupPayload.newBuilder().setOwner(JUNIT_USER).setDesc("for junit test").build();
}

SimpleName:IDENTIFIER 222 expected expected

SimpleName:IDENTIFIER 222 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 224 payload payload

SimpleName:IDENTIFIER 224 GroupPayload GroupPayload

SimpleName:IDENTIFIER 224 newBuilder newBuilder

SimpleName:IDENTIFIER 225 setOwner setOwner

SimpleName:IDENTIFIER 226 setName setName

SimpleName:IDENTIFIER 227 setDesc setDesc

StringLiteralExpr:LITERAL
227
"for junit test"
"for junit test"

@Test(expected = IllegalArgumentException.class)
public void testCreateGroup_GroupNameOverLength() {
    GroupPayload payload = GroupPayload.newBuilder().setOwner(JUNIT_USER).setName(MORE_THAN_64).setDesc("for junit test").build();
}

SimpleName:IDENTIFIER 231 expected expected

SimpleName:IDENTIFIER 231 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 233 payload payload

SimpleName:IDENTIFIER 233 GroupPayload GroupPayload

SimpleName:IDENTIFIER 233 newBuilder newBuilder

SimpleName:IDENTIFIER 234 setOwner setOwner

SimpleName:IDENTIFIER 235 setName setName

StringLiteralExpr:LITERAL
235
"junit \n test"
"junit \n test"

SimpleName:IDENTIFIER 236 setDesc setDesc

StringLiteralExpr:LITERAL
236
"for junit test"
"for junit test"

@Test(expected = IllegalArgumentException.class)
public void testCreateGroup_GroupNameInvalid() {
    GroupPayload payload = GroupPayload.newBuilder().setOwner(JUNIT_USER).setName("junit \n test").setDesc("for junit test").build();
}

SimpleName:IDENTIFIER 240 expected expected

SimpleName:IDENTIFIER 240 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 242 payload payload

SimpleName:IDENTIFIER 242 GroupPayload GroupPayload

SimpleName:IDENTIFIER 242 newBuilder newBuilder

SimpleName:IDENTIFIER 243 setOwner setOwner

StringLiteralExpr:LITERAL
243
"junit_user \n test"
"junit_user \n test"

SimpleName:IDENTIFIER 244 setName setName

StringLiteralExpr:LITERAL
244
"junit test group"
"junit test group"

SimpleName:IDENTIFIER 245 setDesc setDesc

StringLiteralExpr:LITERAL
245
"for junit test"
"for junit test"

@Test(expected = IllegalArgumentException.class)
public void testCreateGroup_GroupOwnerNameInvalid() {
    GroupPayload payload = GroupPayload.newBuilder().setOwner("junit_user \n test").setName("junit test group").setDesc("for junit test").build();
}

SimpleName:IDENTIFIER 249 expected expected

SimpleName:IDENTIFIER 249 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 251 payload payload

SimpleName:IDENTIFIER 251 GroupPayload GroupPayload

SimpleName:IDENTIFIER 251 newBuilder newBuilder

SimpleName:IDENTIFIER 252 setOwner setOwner

SimpleName:IDENTIFIER 253 setName setName

SimpleName:IDENTIFIER 254 setDesc setDesc

@Test(expected = IllegalArgumentException.class)
public void testCreateGroup_GroupDescOverLength() {
    GroupPayload payload = GroupPayload.newBuilder().setOwner(JUNIT_USER).setName("junit_test_group").setDesc(MORE_THAN_250).build();
}


SimpleName:IDENTIFIER 288 expected expected

SimpleName:IDENTIFIER 288 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 291 groupClient groupClient

SimpleName:IDENTIFIER 291 addOrRemoveMembers addOrRemoveMembers

SimpleName:IDENTIFIER 291 Members Members

SimpleName:IDENTIFIER 291 newBuilder newBuilder

SimpleName:IDENTIFIER 292 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 294 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
296
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 296 getStatus getStatus

StringLiteralExpr:LITERAL
297
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 297 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testAddOrRemoveMembers_GidNegative() {
    try {
        groupClient.addOrRemoveMembers(-1, Members.newBuilder().build(), Members.newBuilder().build());
    } 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 301 expected expected

SimpleName:IDENTIFIER 301 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 304 groupClient groupClient

SimpleName:IDENTIFIER 304 addOrRemoveMembers addOrRemoveMembers

SimpleName:IDENTIFIER 305 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 307 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
309
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 309 getStatus getStatus

StringLiteralExpr:LITERAL
310
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 310 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testAddOrRemoveMembers_AddRemoveBothNull() {
    try {
        groupClient.addOrRemoveMembers(10010, 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());
    }
}


SimpleName:IDENTIFIER 321 expected expected

SimpleName:IDENTIFIER 321 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 324 groupClient groupClient

SimpleName:IDENTIFIER 324 deleteGroup deleteGroup

SimpleName:IDENTIFIER 325 APIConnectionException APIConnectionException

SimpleName:IDENTIFIER 327 APIRequestException APIRequestException

StringLiteralExpr:LITERAL
329
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 329 getStatus getStatus

StringLiteralExpr:LITERAL
330
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 330 getMessage getMessage

@Test(expected = IllegalArgumentException.class)
public void testDeleteGroup_GidNegative() {
    try {
        groupClient.deleteGroup(-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 354 expected expected

SimpleName:IDENTIFIER 354 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 357 groupClient groupClient

SimpleName:IDENTIFIER 357 updateGroupInfo updateGroupInfo

StringLiteralExpr:LITERAL
357
"group desc"
"group desc"

StringLiteralExpr:LITERAL
357
"media id"
"media id"

SimpleName:IDENTIFIER 358 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

LOG.error("Connection error. Should retry later. ", e)

LOG.error("Connection error. Should retry later. ", e);

{
    LOG.error("Connection error. Should retry later. ", e);
}

SimpleName:IDENTIFIER 360 APIRequestException APIRequestException

"Error response from JPush server. Should review and fix it. "

StringLiteralExpr:LITERAL
362
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 362 getStatus getStatus

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

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

StringLiteralExpr:LITERAL
363
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 363 getMessage getMessage

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

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

@Test(expected = IllegalArgumentException.class)
public void testUpdateGroupInfo_GidNegative() {
    try {
        groupClient.updateGroupInfo(-1, "test_group", "group desc", "media id");
    } 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 367 expected expected

SimpleName:IDENTIFIER 367 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 370 groupClient groupClient

SimpleName:IDENTIFIER 370 updateGroupInfo updateGroupInfo

groupClient.updateGroupInfo(10010, null, null, null)

groupClient.updateGroupInfo(10010, null, null, null);

{
    groupClient.updateGroupInfo(10010, null, null, null);
}

SimpleName:IDENTIFIER 371 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

LOG.error("Connection error. Should retry later. ", e)

LOG.error("Connection error. Should retry later. ", e);

{
    LOG.error("Connection error. Should retry later. ", e);
}

SimpleName:IDENTIFIER 373 APIRequestException APIRequestException

"Error response from JPush server. Should review and fix it. "

StringLiteralExpr:LITERAL
375
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 375 getStatus getStatus

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

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

StringLiteralExpr:LITERAL
376
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 376 getMessage getMessage

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

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

@Test(expected = IllegalArgumentException.class)
public void testUpdateGroupInfo_NameDescBothNull() {
    try {
        groupClient.updateGroupInfo(10010, null, 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());
    }
}

SimpleName:IDENTIFIER 380 expected expected

SimpleName:IDENTIFIER 380 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 383 groupClient groupClient

SimpleName:IDENTIFIER 383 updateGroupInfo updateGroupInfo

StringLiteralExpr:LITERAL
383
"test desc"
"test desc"

StringLiteralExpr:LITERAL
383
"media id"
"media id"

SimpleName:IDENTIFIER 384 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

LOG.error("Connection error. Should retry later. ", e)

LOG.error("Connection error. Should retry later. ", e);

{
    LOG.error("Connection error. Should retry later. ", e);
}

SimpleName:IDENTIFIER 386 APIRequestException APIRequestException

"Error response from JPush server. Should review and fix it. "

StringLiteralExpr:LITERAL
388
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 388 getStatus getStatus

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

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

StringLiteralExpr:LITERAL
389
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 389 getMessage getMessage

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

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

@Test(expected = IllegalArgumentException.class)
public void testUpdateGroupInfo_NameOverLength() {
    try {
        groupClient.updateGroupInfo(10010, MORE_THAN_64, "test desc", "media id");
    } 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 393 expected expected

SimpleName:IDENTIFIER 393 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 396 groupClient groupClient

SimpleName:IDENTIFIER 396 updateGroupInfo updateGroupInfo

StringLiteralExpr:LITERAL
396
"media id"
"media id"

SimpleName:IDENTIFIER 397 APIConnectionException APIConnectionException

"Connection error. Should retry later. "

LOG.error("Connection error. Should retry later. ", e)

LOG.error("Connection error. Should retry later. ", e);

{
    LOG.error("Connection error. Should retry later. ", e);
}

SimpleName:IDENTIFIER 399 APIRequestException APIRequestException

"Error response from JPush server. Should review and fix it. "

StringLiteralExpr:LITERAL
401
"HTTP Status: "
"HTTP Status: "

SimpleName:IDENTIFIER 401 getStatus getStatus

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

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

StringLiteralExpr:LITERAL
402
"Error Message: "
"Error Message: "

SimpleName:IDENTIFIER 402 getMessage getMessage

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

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

@Test(expected = IllegalArgumentException.class)
public void testUpdateGroupInfo_DescOverLength() {
    try {
        groupClient.updateGroupInfo(10010, "test_name", MORE_THAN_250, "media id");
    } 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 11 expected expected

SimpleName:IDENTIFIER 11 NullPointerException NullPointerException

SimpleName:IDENTIFIER 12 checkNullIp checkNullIp

@Test(expected = NullPointerException.class)
public void checkNullIp() {
    client.get(null);
}

package com.github.sypexgeo;

import com.github.sypexgeo.model.SxGeoResult;
import org.junit.Test;

public class adhoc_ErrorsTest extends BaseSxText {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 17 expected expected

SimpleName:IDENTIFIER 17 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 18 checkEmptyIp checkEmptyIp

@Test(expected = IllegalArgumentException.class)
public void checkEmptyIp() {
    client.get("");
}

SimpleName:IDENTIFIER 22 expected expected

SimpleName:IDENTIFIER 22 IllegalArgumentException IllegalArgumentException

@Test(expected = IllegalArgumentException.class)
public void checkMalformedIp1() {
    client.get("555.555.555.555");
}

SimpleName:IDENTIFIER 27 expected expected

SimpleName:IDENTIFIER 27 IllegalArgumentException IllegalArgumentException

@Test(expected = IllegalArgumentException.class)
public void checkMalformedIp2() {
    client.get("100.100.100");
}

SimpleName:IDENTIFIER 32 expected expected

SimpleName:IDENTIFIER 32 IllegalArgumentException IllegalArgumentException

@Test(expected = IllegalArgumentException.class)
public void checkMalformedIp3() {
    client.get("yandex.ru");
}


SimpleName:IDENTIFIER 90 expected expected

SimpleName:IDENTIFIER 90 PluginRuntimeException PluginRuntimeException

SimpleName:IDENTIFIER 91 unsupportedProtocol unsupportedProtocol

SimpleName:IDENTIFIER 91 Exception Exception

SimpleName:IDENTIFIER 92 downloader downloader

SimpleName:IDENTIFIER 92 downloadFile downloadFile

@Test(expected = PluginRuntimeException.class)
public void unsupportedProtocol() throws Exception {
    downloader.downloadFile(new URL("jar:file:!/myfile.jar"));
}

package org.pf4j.update;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.pf4j.PluginRuntimeException;
import java.io.BufferedWriter;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

public class adhoc_FileDownloadTest {

    private SimpleFileDownloader downloader;

    private WebServer webserver;

    private Path updateRepoDir;

    private Path repoFile;

    private Path emptyFile;

    @Before
    public void setup() throws IOException {
        downloader = new SimpleFileDownloader();
        webserver = new WebServer();
        updateRepoDir = Files.createTempDirectory("repo");
        updateRepoDir.toFile().deleteOnExit();
        repoFile = Files.createFile(updateRepoDir.resolve("myfile"));
        BufferedWriter writer = new BufferedWriter(Files.newBufferedWriter(repoFile, Charset.forName("utf-8"), StandardOpenOption.APPEND));
        writer.write("test");
        writer.close();
        emptyFile = Files.createFile(updateRepoDir.resolve("emptyFile"));
    }

    @After
    public void tearDown() {
        webserver.shutdown();
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 50 expected expected

SimpleName:IDENTIFIER 50 VerifyException VerifyException

SimpleName:IDENTIFIER 51 testBasicVerifierEmpty testBasicVerifierEmpty

SimpleName:IDENTIFIER 51 IOException IOException

SimpleName:IDENTIFIER 51 VerifyException VerifyException

SimpleName:IDENTIFIER 52 fileVerifier fileVerifier

SimpleName:IDENTIFIER 52 BasicVerifier BasicVerifier

SimpleName:IDENTIFIER 53 testFile testFile

SimpleName:IDENTIFIER 53 createTempFile createTempFile

StringLiteralExpr:LITERAL 53 "test" "test"

SimpleName:IDENTIFIER 54 fileVerifier fileVerifier

SimpleName:IDENTIFIER 54 FileVerifier FileVerifier

SimpleName:IDENTIFIER 54 Context Context

StringLiteralExpr:LITERAL 54 "foo" "foo"

SimpleName:IDENTIFIER 55 testFile testFile

SimpleName:IDENTIFIER 56 testFile testFile

@Test(expected = VerifyException.class)
public void testBasicVerifierEmpty() throws IOException, VerifyException {
    FileVerifier fileVerifier = new BasicVerifier();
    Path testFile = Files.createTempFile("test", ".tmp");
    fileVerifier.verify(new FileVerifier.Context("foo", new Date(), "1.2.3", null, "http://example.com/repo/foo-1.2.3.zip", null), testFile);
    Files.delete(testFile);
}

package org.pf4j.update;

import org.junit.Test;
import org.pf4j.update.verifier.BasicVerifier;
import org.pf4j.update.verifier.Sha512SumVerifier;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Date;

public class adhoc_FileVerifiersTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 59 expected expected

SimpleName:IDENTIFIER 59 VerifyException VerifyException

SimpleName:IDENTIFIER 60 testBasicVerifierNotExists testBasicVerifierNotExists

SimpleName:IDENTIFIER 60 IOException IOException

SimpleName:IDENTIFIER 60 VerifyException VerifyException

SimpleName:IDENTIFIER 61 fileVerifier fileVerifier

SimpleName:IDENTIFIER 61 BasicVerifier BasicVerifier

SimpleName:IDENTIFIER 62 testFile testFile

StringLiteralExpr:LITERAL 62 "/tmp/foo/bar" "/tmp/foo/bar"

SimpleName:IDENTIFIER 63 fileVerifier fileVerifier

SimpleName:IDENTIFIER 63 FileVerifier FileVerifier

SimpleName:IDENTIFIER 63 Context Context

StringLiteralExpr:LITERAL 63 "foo" "foo"

SimpleName:IDENTIFIER 64 testFile testFile

SimpleName:IDENTIFIER 65 testFile testFile

@Test(expected = VerifyException.class)
public void testBasicVerifierNotExists() throws IOException, VerifyException {
    FileVerifier fileVerifier = new BasicVerifier();
    Path testFile = Paths.get("/tmp/foo/bar");
    fileVerifier.verify(new FileVerifier.Context("foo", new Date(), "1.2.3", null, "http://example.com/repo/foo-1.2.3.zip", null), testFile);
    Files.delete(testFile);
}


SimpleName:IDENTIFIER 169 expected expected

SimpleName:IDENTIFIER 169 PluginNotFoundException PluginNotFoundException

SimpleName:IDENTIFIER 170 uninstallNonExisting uninstallNonExisting

SimpleName:IDENTIFIER 171 updateManager updateManager

SimpleName:IDENTIFIER 171 uninstallPlugin uninstallPlugin

StringLiteralExpr:LITERAL 171 "other" "other"

@Test(expected = PluginNotFoundException.class)
public void uninstallNonExisting() {
    updateManager.uninstallPlugin("other");
}

package org.pf4j.update;

import com.google.gson.GsonBuilder;
import org.apache.commons.codec.digest.DigestUtils;
import org.junit.Before;
import org.junit.Test;
import org.pf4j.PluginManager;
import org.pf4j.PluginNotFoundException;
import org.pf4j.PluginRuntimeException;
import org.pf4j.PluginWrapper;
import org.pf4j.TestPluginDescriptor;
import org.pf4j.VersionManager;
import org.pf4j.update.util.NopPlugin;
import org.pf4j.update.util.PropertiesPluginManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class adhoc_InstallAndDownloadTest {

    private static final Logger log = LoggerFactory.getLogger(adhoc_InstallAndDownloadTest.class);

    private Path downloadRepoDir;

    private Path pluginFolderDir;

    private MockZipPlugin p1;

    private MockZipPlugin p2;

    private MockZipPlugin p3;

    private MockZipPlugin p4;

    private MockZipPlugin p5;

    private PluginManager pluginManager;

    private UpdateManager updateManager;

    private VersionManager versionManager;

    private String systemVersion;

    private URL repoUrl;

    private List<PluginWrapper> installed;

    @Before
    public void setup() throws IOException {
        downloadRepoDir = Files.createTempDirectory("pf4j-repo");
        downloadRepoDir.toFile().deleteOnExit();
        pluginFolderDir = Files.createTempDirectory("pf4j-plugins");
        p1 = new MockZipPlugin("myPlugin", "1.2.3", "my-plugin-1.2.3", "my-plugin-1.2.3.zip", "Mar 22, 2017 9:00:35 PM");
        p2 = new MockZipPlugin("myPlugin", "2.0.0", "my-plugin-2.0.0", "my-plugin-2.0.0.ZIP");
        p3 = new MockZipPlugin("other", "3.0.0", "other-3.0.0", "other-3.0.0.Zip");
        p4 = new MockZipPlugin("other", "3.0.1", "other-3.0.1", "other-3.0.1.Zip", "2017-01-31T12:34:56Z");
        p5 = new MockZipPlugin("wrongDate", "4.0.1", "wrong-4.0.1", "wrong-4.0.1.Zip", "wrong");
        pluginManager = new PropertiesPluginManager(pluginFolderDir);
        systemVersion = "1.8.0";
        pluginManager.setSystemVersion(systemVersion);
        versionManager = pluginManager.getVersionManager();
        repoUrl = new URL("file:" + downloadRepoDir.toAbsolutePath().toString() + "/");
        UpdateRepository local = new DefaultUpdateRepository("local", repoUrl);
        p1.create();
        p2.create();
        p3.create();
        p5.create();
        Path pluginsJson = downloadRepoDir.resolve("plugins.json");
        BufferedWriter writer = Files.newBufferedWriter(pluginsJson, Charset.defaultCharset(), StandardOpenOption.CREATE_NEW);
        String jsonForPlugins = getJsonForPlugins(p1, p2, p3, p4, p5);
        writer.write(jsonForPlugins);
        writer.close();
        updateManager = new UpdateManager(pluginManager, Collections.singletonList(local));
    }

    private Date dateFor(String date) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
        return sdf.parse(date);
    }

    private class MockZipPlugin {

        public final String id;

        public final String version;

        public final String filenameUnzipped;

        public final Path updateRepoZipFile;

        public final Path pluginRepoUnzippedFolder;

        private final Path propsFile;

        private final URI fileURI;

        public String zipname;

        public TestPluginDescriptor descriptor;

        public String dateStr;

        public MockZipPlugin(String id, String version, String filename, String zipname, String dateStr) {
            this.id = id;
            this.version = version;
            this.filenameUnzipped = filename;
            this.zipname = zipname;
            this.dateStr = dateStr;
            updateRepoZipFile = downloadRepoDir.resolve(zipname).toAbsolutePath();
            pluginRepoUnzippedFolder = pluginFolderDir.resolve(filename);
            propsFile = downloadRepoDir.resolve("my.properties");
            fileURI = URI.create("jar:file:" + updateRepoZipFile.toString());
            descriptor = new TestPluginDescriptor();
            descriptor.setPluginId(id);
            descriptor.setPluginVersion(version);
        }

        public MockZipPlugin(String id, String version, String filename, String zipname) {
            this(id, version, filename, zipname, "2016-12-31");
        }

        public void create() throws IOException {
            try (FileSystem zipfs = FileSystems.newFileSystem(fileURI, Collections.singletonMap("create", "true"))) {
                Path propsInZip = zipfs.getPath("/" + propsFile.getFileName().toString());
                BufferedWriter br = new BufferedWriter(new FileWriter(propsFile.toString()));
                br.write("plugin.id=" + id);
                br.newLine();
                br.write("plugin.version=" + version);
                br.newLine();
                br.write("plugin.class=" + NopPlugin.class.getName());
                br.close();
                Files.move(propsFile, propsInZip);
            }
        }

        public String getSha512() {
            try {
                String checksum = DigestUtils.sha512Hex(Files.newInputStream(updateRepoZipFile));
                log.debug("Generated SHA sum for file: {} ", checksum);
                return checksum;
            } catch (IOException e) {
                return null;
            }
        }
    }

    private String getJsonForPlugins(MockZipPlugin... plugins) {
        GsonBuilder gsonBuilder = new GsonBuilder();
        Map<String, List<MockZipPlugin>> pluginMap = new HashMap<>();
        for (MockZipPlugin p : plugins) {
            if (pluginMap.containsKey(p.id)) {
                List<MockZipPlugin> l = pluginMap.get(p.id);
                l.add(p);
            } else {
                List<MockZipPlugin> l = new ArrayList<>();
                l.add(p);
                pluginMap.put(p.id, l);
            }
        }
        List list = new ArrayList<>();
        for (List<MockZipPlugin> l : pluginMap.values()) {
            Map<String, Object> info = new HashMap<>();
            info.put("id", l.get(0).id);
            List<Object> releases = new ArrayList<>();
            for (MockZipPlugin p : l) {
                Map<String, String> releaseInfo = new HashMap<>();
                releaseInfo.put("version", p.version);
                releaseInfo.put("url", p.zipname);
                releaseInfo.put("date", p.dateStr);
                releaseInfo.put("sha512sum", p.getSha512());
                releases.add(releaseInfo);
            }
            info.put("releases", releases);
            list.add(info);
        }
        return gsonBuilder.create().toJson(list);
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 28 expected expected

SimpleName:IDENTIFIER 28 NullPointerException NullPointerException

SimpleName:IDENTIFIER 29 nullURI nullURI

SimpleName:IDENTIFIER 30 WebSocketUtil WebSocketUtil

SimpleName:IDENTIFIER 30 containsWebSocketScheme containsWebSocketScheme

@Test(expected = NullPointerException.class)
public void nullURI() {
    WebSocketUtil.containsWebSocketScheme(null);
}

package net.wessendorf.websocket;

import org.junit.Test;
import java.net.URI;
import java.net.URISyntaxException;
import static org.assertj.core.api.Assertions.assertThat;

public class adhoc_WebSocketUtilTest {
    /*TEST PLACEHOLDER*/
}