SimpleName:IDENTIFIER 27 expected expected

SimpleName:IDENTIFIER 27 CCBParseException CCBParseException

SimpleName:IDENTIFIER 28 testMalformedNoResponseEntity testMalformedNoResponseEntity

SimpleName:IDENTIFIER 28 Exception Exception

SimpleName:IDENTIFIER 29 runTest runTest

SimpleName:IDENTIFIER 29 GetCustomFieldLabelsResponse GetCustomFieldLabelsResponse

@Test(expected = CCBParseException.class)
public void testMalformedNoResponseEntity() throws Exception {
    runTest("ccb_malformed_response_no_entity.xml", GetCustomFieldLabelsResponse.class);
}

package com.p4square.ccbapi;

import com.p4square.ccbapi.exception.CCBParseException;
import com.p4square.ccbapi.model.*;
import org.junit.Before;
import org.junit.Test;
import java.io.InputStream;
import static org.junit.Assert.*;

public class adhoc_CCBXmlBinderTest {

    private CCBXmlBinder binder;

    @Before
    public void setUp() {
        binder = new CCBXmlBinder();
    }

    private <T extends CCBAPIResponse> T runTest(final String filename, final Class<T> clazz) throws Exception {
        InputStream in = getClass().getResourceAsStream(filename);
        if (in == null) {
            throw new AssertionError("Could not find file " + filename);
        }
        try {
            return binder.bindResponseXML(in, clazz);
        } finally {
            in.close();
        }
    }
    /*TEST PLACEHOLDER*/
}

Expect CCBXmlBinder to throw an exception if there is no response element.

SimpleName:IDENTIFIER 35 expected expected

SimpleName:IDENTIFIER 35 CCBParseException CCBParseException

SimpleName:IDENTIFIER 36 testMalformedXML testMalformedXML

SimpleName:IDENTIFIER 36 Exception Exception

SimpleName:IDENTIFIER 37 runTest runTest

SimpleName:IDENTIFIER 37 GetCustomFieldLabelsResponse GetCustomFieldLabelsResponse

@Test(expected = CCBParseException.class)
public void testMalformedXML() throws Exception {
    runTest("ccb_malformed_xml.xml", GetCustomFieldLabelsResponse.class);
}

Expect CCBXmlBinder to throw an exception if the XML is malformed.


SimpleName:IDENTIFIER 40 expected expected

SimpleName:IDENTIFIER 40 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 41 testNullEmail testNullEmail

@Test(expected = IllegalArgumentException.class)
public void testNullEmail() {
    g.getUrl(null);
}

package de.bripkens.gravatar;

import org.junit.Before;
import org.junit.Test;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import static org.junit.Assert.*;

public class adhoc_GravatarTest {

    private static final String EMAIL = "test@example.com";

    private static final String EMAIL_HASH = "55502f40dc8b7c769880b10874abc9d0";

    private Gravatar g;

    @Before
    public void setup() {
        g = new Gravatar();
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 78 expected expected

SimpleName:IDENTIFIER 78 RegisterBlueprintException RegisterBlueprintException

SimpleName:IDENTIFIER 79 testSetRegisterBlueprintsWithException testSetRegisterBlueprintsWithException

SimpleName:IDENTIFIER 79 RegisterBlueprintException RegisterBlueprintException

SimpleName:IDENTIFIER 80 blueprints blueprints

SimpleName:IDENTIFIER 80 ArrayList ArrayList

SimpleName:IDENTIFIER 81 blueprints blueprints

SimpleName:IDENTIFIER 81 carBlueprint carBlueprint

SimpleName:IDENTIFIER 82 blueprints blueprints

SimpleName:IDENTIFIER 84 modelFactory modelFactory

SimpleName:IDENTIFIER 84 setRegisterBlueprints setRegisterBlueprints

SimpleName:IDENTIFIER 84 blueprints blueprints

@Test(expected = RegisterBlueprintException.class)
public void testSetRegisterBlueprintsWithException() throws RegisterBlueprintException {
    List blueprints = new ArrayList();
    blueprints.add(carBlueprint);
    blueprints.add(8);
    modelFactory.setRegisterBlueprints(blueprints);
}

package com.tobedevoured.modelcitizen.modelfactory;

import com.tobedevoured.modelcitizen.ModelFactory;
import com.tobedevoured.modelcitizen.RegisterBlueprintException;
import com.tobedevoured.modelcitizen.annotation.Default;
import com.tobedevoured.modelcitizen.blueprint.*;
import org.junit.Before;
import org.junit.Test;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

public class adhoc_LoadBlueprintsTest {

    private ModelFactory modelFactory;

    private CarBlueprint carBlueprint = new CarBlueprint();

    private WheelBlueprint wheelBlueprint = new WheelBlueprint();

    private DriverBlueprint driverBlueprint = new DriverBlueprint();

    private UserBlueprint userBlueprint = new UserBlueprint();

    private OptionBlueprint optionBlueprint = new OptionBlueprint();

    @Before
    public void setUp() throws RegisterBlueprintException {
        modelFactory = new ModelFactory();
        modelFactory.registerBlueprint(carBlueprint);
        modelFactory.registerBlueprint(wheelBlueprint);
        modelFactory.registerBlueprint(driverBlueprint);
        modelFactory.registerBlueprint(userBlueprint);
        modelFactory.registerBlueprint(optionBlueprint);
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 22 expected expected

SimpleName:IDENTIFIER 22 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 23 testUri testUri

SimpleName:IDENTIFIER 24 Preconditions Preconditions

SimpleName:IDENTIFIER 24 checkNotEmpty checkNotEmpty

StringLiteralExpr:LITERAL
24
"test must throw exception"
"test must throw exception"

@Test(expected = IllegalArgumentException.class)
public void testUri() {
    Preconditions.checkNotEmpty(input, "test must throw exception");
}

package net.bramp.ffmpeg;

import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

@RunWith(Parameterized.class)
public class adhoc_PreconditionsCheckInvalidNotEmptyTest {

    @Parameterized.Parameters(name = "{0}")
    public static List<String> data() {
        return Arrays.asList(null, "", "   ", "\n", " \n ");
    }

    private final String input;

    public adhoc_PreconditionsCheckInvalidNotEmptyTest(String input) {
        this.input = input;
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 33 expected expected

SimpleName:IDENTIFIER 33 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 34 testUri testUri

SimpleName:IDENTIFIER 35 Preconditions Preconditions

SimpleName:IDENTIFIER 35 checkValidStream checkValidStream

@Test(expected = IllegalArgumentException.class)
public void testUri() {
    Preconditions.checkValidStream(uri);
}

package net.bramp.ffmpeg;

import java.net.URI;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

@RunWith(Parameterized.class)
public class adhoc_PreconditionsCheckInvalidStreamTest {

    @Parameters(name = "{0}")
    public static List<String> data() {
        return Arrays.asList("http://www.example.com/", "https://live.twitch.tv/app/live_", "ftp://236.0.0.1:2000", "udp://10.1.0.102/", "tcp://127.0.0.1/");
    }

    private final URI uri;

    public adhoc_PreconditionsCheckInvalidStreamTest(String url) {
        this.uri = URI.create(url);
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 53 expected expected

SimpleName:IDENTIFIER 53 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 54 testBadDecodeValue testBadDecodeValue

StringLiteralExpr:LITERAL 55 "test" "test"

@Test(expected = IllegalArgumentException.class)
public void testBadDecodeValue() {
    new Codec("test", "test", "X.V...");
}

package net.bramp.ffmpeg.info;

import static org.hamcrest.Matchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import org.junit.Test;
import net.bramp.ffmpeg.shared.CodecType;

public class adhoc_CodecTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 58 expected expected

SimpleName:IDENTIFIER 58 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 59 testBadEncodeValue testBadEncodeValue

StringLiteralExpr:LITERAL 60 "test" "test"

@Test(expected = IllegalArgumentException.class)
public void testBadEncodeValue() {
    new Codec("test", "test", ".XV...");
}

SimpleName:IDENTIFIER 63 expected expected

SimpleName:IDENTIFIER 63 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 64 testBadCodecValue testBadCodecValue

StringLiteralExpr:LITERAL 65 "test" "test"

@Test(expected = IllegalArgumentException.class)
public void testBadCodecValue() {
    new Codec("test", "test", "..X...");
}

SimpleName:IDENTIFIER 68 expected expected

SimpleName:IDENTIFIER 68 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 69 testBadIntraFrameOnlyValue testBadIntraFrameOnlyValue

StringLiteralExpr:LITERAL 70 "test" "test"

@Test(expected = IllegalArgumentException.class)
public void testBadIntraFrameOnlyValue() {
    new Codec("test", "test", "..VX..");
}

SimpleName:IDENTIFIER 73 expected expected

SimpleName:IDENTIFIER 73 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 74 testBadLossyValue testBadLossyValue

StringLiteralExpr:LITERAL 75 "test" "test"

@Test(expected = IllegalArgumentException.class)
public void testBadLossyValue() {
    new Codec("test", "test", "..V.X.");
}

SimpleName:IDENTIFIER 78 expected expected

SimpleName:IDENTIFIER 78 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 79 testBadLosslessValue testBadLosslessValue

StringLiteralExpr:LITERAL 80 "test" "test"

@Test(expected = IllegalArgumentException.class)
public void testBadLosslessValue() {
    new Codec("test", "test", "..V..X");
}


SimpleName:IDENTIFIER 419 expected expected

SimpleName:IDENTIFIER 419 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 420 testVbrNegativeParam testVbrNegativeParam

SimpleName:IDENTIFIER 422 FFmpegBuilder FFmpegBuilder

SimpleName:IDENTIFIER 423 setInput setInput

StringLiteralExpr:LITERAL 423 "input" "input"

SimpleName:IDENTIFIER 426 addOutput addOutput

StringLiteralExpr:LITERAL 426 "output" "output"

@Test(expected = IllegalArgumentException.class)
public void testVbrNegativeParam() {
    List<String> args = new FFmpegBuilder().setInput("input").done().setVBR(-3).addOutput("output").done().build();
}

package net.bramp.ffmpeg.builder;

import static com.nitorcreations.Matchers.reflectEquals;
import static net.bramp.ffmpeg.FFmpeg.AUDIO_FORMAT_S16;
import static net.bramp.ffmpeg.FFmpeg.AUDIO_SAMPLE_48000;
import static net.bramp.ffmpeg.FFmpeg.FPS_30;
import static net.bramp.ffmpeg.builder.MetadataSpecifier.*;
import static net.bramp.ffmpeg.builder.StreamSpecifier.tag;
import static net.bramp.ffmpeg.builder.StreamSpecifier.usable;
import static net.bramp.ffmpeg.builder.StreamSpecifierType.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import com.google.common.collect.ImmutableList;
import java.net.URI;
import java.util.List;
import java.util.concurrent.TimeUnit;
import net.bramp.ffmpeg.builder.FFmpegBuilder.Verbosity;
import net.bramp.ffmpeg.options.AudioEncodingOptions;
import net.bramp.ffmpeg.options.EncodingOptions;
import net.bramp.ffmpeg.options.MainEncodingOptions;
import net.bramp.ffmpeg.options.VideoEncodingOptions;
import org.junit.Test;

@SuppressWarnings("unused")
public class adhoc_FFmpegBuilderTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 431 expected expected

SimpleName:IDENTIFIER 431 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 432 testVbrQualityExceedsRange testVbrQualityExceedsRange

SimpleName:IDENTIFIER 434 FFmpegBuilder FFmpegBuilder

SimpleName:IDENTIFIER 435 setInput setInput

StringLiteralExpr:LITERAL 435 "input" "input"

SimpleName:IDENTIFIER 438 addOutput addOutput

StringLiteralExpr:LITERAL 438 "output" "output"

@Test(expected = IllegalArgumentException.class)
public void testVbrQualityExceedsRange() {
    List<String> args = new FFmpegBuilder().setInput("input").done().setVBR(10).addOutput("output").done().build();
}


SimpleName:IDENTIFIER 544 expected expected

SimpleName:IDENTIFIER 544 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 545 testZeroThreads testZeroThreads

SimpleName:IDENTIFIER 546 FFmpegBuilder FFmpegBuilder

SimpleName:IDENTIFIER 546 setThreads setThreads

{
    new FFmpegBuilder().setThreads(0);
}

@Test(expected = IllegalArgumentException.class)
public void testZeroThreads() {
    new FFmpegBuilder().setThreads(0);
}

{
    new FFmpegBuilder().setThreads(0);
}

SimpleName:IDENTIFIER 549 expected expected

SimpleName:IDENTIFIER 549 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 550 testNegativeNumberOfThreads testNegativeNumberOfThreads

SimpleName:IDENTIFIER 551 FFmpegBuilder FFmpegBuilder

SimpleName:IDENTIFIER 551 setThreads setThreads

{
    new FFmpegBuilder().setThreads(-1);
}

@Test(expected = IllegalArgumentException.class)
public void testNegativeNumberOfThreads() {
    new FFmpegBuilder().setThreads(-1);
}

{
    new FFmpegBuilder().setThreads(-1);
}


SimpleName:IDENTIFIER 37 expected expected

SimpleName:IDENTIFIER 37 ProcessEngineException ProcessEngineException

SimpleName:IDENTIFIER 38 getNonExistingScriptEngine getNonExistingScriptEngine

SimpleName:IDENTIFIER 38 InvalidSyntaxException InvalidSyntaxException

SimpleName:IDENTIFIER 39 context context

SimpleName:IDENTIFIER 39 BundleContext BundleContext

SimpleName:IDENTIFIER 40 context context

SimpleName:IDENTIFIER 40 getServiceReferences getServiceReferences

SimpleName:IDENTIFIER 40 anyString anyString

SimpleName:IDENTIFIER 40 thenReturn thenReturn

SimpleName:IDENTIFIER 41 bindingsFactory bindingsFactory

SimpleName:IDENTIFIER 41 ScriptBindingsFactory ScriptBindingsFactory

SimpleName:IDENTIFIER 42 scriptingEngines scriptingEngines

SimpleName:IDENTIFIER 42 TestOsgiScriptingEngines TestOsgiScriptingEngines

SimpleName:IDENTIFIER 42 bindingsFactory bindingsFactory

SimpleName:IDENTIFIER 43 scriptingEngines scriptingEngines

SimpleName:IDENTIFIER 43 context context

SimpleName:IDENTIFIER 44 scriptingEngines scriptingEngines

SimpleName:IDENTIFIER 44 getScriptEngineForLanguage getScriptEngineForLanguage

StringLiteralExpr:LITERAL 44 "Pythin" "Pythin"

SimpleName:IDENTIFIER 45 assertThat assertThat

SimpleName:IDENTIFIER 45 nullValue nullValue

@Test(expected = ProcessEngineException.class)
public void getNonExistingScriptEngine() throws InvalidSyntaxException {
    BundleContext context = mock(BundleContext.class);
    when(context.getServiceReferences(anyString(), isNull(String.class))).thenReturn(null);
    ScriptBindingsFactory bindingsFactory = mock(ScriptBindingsFactory.class);
    TestOsgiScriptingEngines scriptingEngines = new TestOsgiScriptingEngines(bindingsFactory);
    scriptingEngines.ctx = context;
    ScriptEngine engine = scriptingEngines.getScriptEngineForLanguage("Pythin");
    assertThat(engine, is(nullValue()));
}

package org.camunda.bpm.extension.osgi.scripting.impl;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.Collections;
import javax.script.Bindings;
import javax.script.ScriptEngine;
import javax.script.ScriptException;
import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.impl.scripting.engine.ScriptBindingsFactory;
import org.camunda.bpm.extension.osgi.TestScriptEngineFactory;
import org.camunda.bpm.extension.osgi.scripting.ScriptEngineResolver;
import org.junit.Test;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;

public class adhoc_OsgiScriptingEnginesTest {

    private class TestOsgiScriptingEngines extends OsgiScriptingEngines {

        public TestOsgiScriptingEngines(ScriptBindingsFactory scriptBindingsFactory) {
            super(scriptBindingsFactory);
        }

        private BundleContext ctx;

        @Override
        protected BundleContext getBundleContext() {
            return ctx;
        }
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 64 expected expected

SimpleName:IDENTIFIER 64 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 65 parseInvalidHeader parseInvalidHeader

SimpleName:IDENTIFIER 66 HeaderParser HeaderParser

SimpleName:IDENTIFIER 66 parseHeader parseHeader

@Test(expected = IllegalArgumentException.class)
public void parseInvalidHeader() {
    HeaderParser.parseHeader(";");
}

package org.camunda.bpm.extension.osgi.util;

import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import java.util.List;
import org.camunda.bpm.extension.osgi.util.HeaderParser;
import org.camunda.bpm.extension.osgi.util.HeaderParser.PathElement;
import org.junit.Test;

public class adhoc_HeaderParserTest {
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 134 expected expected

SimpleName:IDENTIFIER 134 NullPointerException NullPointerException

SimpleName:IDENTIFIER 135 unbindServiceWithNullProperties unbindServiceWithNullProperties

SimpleName:IDENTIFIER 136 resolver resolver

SimpleName:IDENTIFIER 136 unbindService unbindService

SimpleName:IDENTIFIER 136 MockDelegate MockDelegate

@Test(expected = NullPointerException.class)
public void unbindServiceWithNullProperties() {
    resolver.unbindService(new MockDelegate(), null);
}

package org.camunda.bpm.extension.osgi.blueprint;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.isA;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import java.util.HashMap;
import java.util.Map;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.DelegateTask;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.camunda.bpm.engine.delegate.TaskListener;
import org.camunda.bpm.engine.impl.juel.SimpleContext;
import org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior;
import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution;
import org.camunda.bpm.extension.osgi.blueprint.BlueprintELResolver;
import org.junit.Before;
import org.junit.Test;

public class adhoc_BlueprintELResolverTest {

    private static final String OSGI_SERVICE_BLUEPRINT_COMPNAME = "osgi.service.blueprint.compname";

    private BlueprintELResolver resolver;

    @Before
    public void setUp() {
        resolver = new BlueprintELResolver();
    }

    private class MockDelegate implements JavaDelegate {

        @Override
        public void execute(DelegateExecution execution) throws Exception {
        }
    }

    private class MockTaskListener implements TaskListener {

        @Override
        public void notify(DelegateTask delegateTask) {
        }
    }

    private class MockActivityBehaviour implements ActivityBehavior {

        @Override
        public void execute(ActivityExecution execution) throws Exception {
        }
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 53 expected expected

SimpleName:IDENTIFIER 53 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 54 parseNull parseNull

SimpleName:IDENTIFIER 54 Exception Exception

SimpleName:IDENTIFIER 55 listener listener

SimpleName:IDENTIFIER 56 assertThat assertThat

SimpleName:IDENTIFIER 56 notNullValue notNullValue

@Test(expected = IllegalArgumentException.class)
public void parseNull() throws Exception {
    Document doc = listener.parse(null);
    assertThat(doc, is(notNullValue()));
}

package org.camunda.bpm.extension.osgi.fileinstall.impl;

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.camunda.bpm.extension.osgi.fileinstall.impl.BpmnDeploymentListener;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
import org.xml.sax.SAXParseException;

public class adhoc_BpmnDeploymentListenerTest {

    private BpmnDeploymentListener listener;

    @Before
    public void setUp() {
        listener = new BpmnDeploymentListener();
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 59 expected expected

SimpleName:IDENTIFIER 59 SAXParseException SAXParseException

SimpleName:IDENTIFIER 60 parseWrongFile parseWrongFile

SimpleName:IDENTIFIER 60 Exception Exception

SimpleName:IDENTIFIER 62 deleteOnExit deleteOnExit

SimpleName:IDENTIFIER 63 FileUtils FileUtils

StringLiteralExpr:LITERAL
63
"bpmn xml process defintion task"
"bpmn xml process defintion task"

SimpleName:IDENTIFIER 64 listener listener

SimpleName:IDENTIFIER 65 assertThat assertThat

SimpleName:IDENTIFIER 65 notNullValue notNullValue

@Test(expected = SAXParseException.class)
public void parseWrongFile() throws Exception {
    File file = new File("test.txt");
    file.deleteOnExit();
    FileUtils.write(file, "bpmn xml process defintion task");
    Document doc = listener.parse(file);
    assertThat(doc, is(notNullValue()));
}


SimpleName:IDENTIFIER 22 testFileIsEmpty testFileIsEmpty

@Test
public void testFileIsEmpty() {
    Markdown2PdfWriter writer = new SimpleFileMarkdown2PdfWriter(null);
    writer.write(TEST_BYTES);
}

@Test(expected = RuntimeException.class)
public void testFileIsEmpty() {
    Markdown2PdfWriter writer = new SimpleFileMarkdown2PdfWriter(null);
    writer.write(TEST_BYTES);
}

package com.qkyrie.markdown2pdf.internal.writing;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class adhoc_SimpleFileMarkdown2PdfWriterTest {

    public static final byte[] TEST_BYTES = "testbytes".getBytes();

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


SimpleName:IDENTIFIER 504 testExceptionInConsumer testExceptionInConsumer

SimpleName:IDENTIFIER 504 IOException IOException

SimpleName:IDENTIFIER 504 InterruptedException InterruptedException

SimpleName:IDENTIFIER 506 ProcBuilder ProcBuilder

StringLiteralExpr:LITERAL 506 "echo" "echo"

SimpleName:IDENTIFIER 507 withArgs withArgs

SimpleName:IDENTIFIER 508 withOutputConsumer withOutputConsumer

SimpleName:IDENTIFIER 508 StreamConsumer StreamConsumer

SimpleName:IDENTIFIER 509 consume consume

SimpleName:IDENTIFIER 509 InputStream InputStream

SimpleName:IDENTIFIER 509 IOException IOException

SimpleName:IDENTIFIER 510 IOException IOException

StringLiteralExpr:LITERAL 510 "Oops!" "Oops!"

SimpleName:IDENTIFIER 513 withTimeoutMillis withTimeoutMillis

@Test
public void testExceptionInConsumer() throws IOException, InterruptedException {
    new ProcBuilder("echo").withArgs("line1\nline2").withOutputConsumer(new StreamConsumer() {

        public void consume(InputStream stream) throws IOException {
            throw new IOException("Oops!");
        }
    }).withTimeoutMillis(20000).run();
}

@Test(expected = IllegalStateException.class)
public void testExceptionInConsumer() throws IOException, InterruptedException {
    new ProcBuilder("echo").withArgs("line1\nline2").withOutputConsumer(new StreamConsumer() {

        public void consume(InputStream stream) throws IOException {
            throw new IOException("Oops!");
        }
    }).withTimeoutMillis(20000).run();
}

package org.buildobjects.process;

import org.junit.Test;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.*;

public class adhoc_ProcBuilderTest {
    /*TEST PLACEHOLDER*/
}

[NO-DOC]


SimpleName:IDENTIFIER 525 expected expected

SimpleName:IDENTIFIER 525 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 526 IOException IOException

SimpleName:IDENTIFIER 526 InterruptedException InterruptedException

SimpleName:IDENTIFIER 527 ProcBuilder ProcBuilder

StringLiteralExpr:LITERAL 527 "who" "who"

SimpleName:IDENTIFIER 528 withOutputConsumer withOutputConsumer

SimpleName:IDENTIFIER 528 StreamConsumer StreamConsumer

SimpleName:IDENTIFIER 529 consume consume

SimpleName:IDENTIFIER 529 InputStream InputStream

SimpleName:IDENTIFIER 529 IOException IOException

SimpleName:IDENTIFIER 532 withOutputStream withOutputStream

SimpleName:IDENTIFIER 532 ByteArrayOutputStream ByteArrayOutputStream

@Test(expected = IllegalArgumentException.class)
public void testWithOutputConsumerClashesWithWithOutputStream() throws IOException, InterruptedException {
    new ProcBuilder("who").withOutputConsumer(new StreamConsumer() {

        public void consume(InputStream stream) throws IOException {
        }
    }).withOutputStream(new ByteArrayOutputStream()).run();
}

[NO-DOC]

SimpleName:IDENTIFIER 703 ProcBuilder ProcBuilder

StringLiteralExpr:LITERAL 703 "echo" "echo"

SimpleName:IDENTIFIER 704 withArgs withArgs

StringLiteralExpr:LITERAL 704 "Hello\n'World'!" "Hello\n'World'!"

SimpleName:IDENTIFIER 705 withOutputConsumer withOutputConsumer

SimpleName:IDENTIFIER 705 StreamConsumer StreamConsumer

SimpleName:IDENTIFIER 707 consume consume

SimpleName:IDENTIFIER 707 InputStream InputStream

SimpleName:IDENTIFIER 707 IOException IOException

SimpleName:IDENTIFIER 708 BufferedReader BufferedReader

SimpleName:IDENTIFIER 708 InputStreamReader InputStreamReader

SimpleName:IDENTIFIER 710 readLine readLine

SimpleName:IDENTIFIER 713 withOutputStream withOutputStream

"`withOutputStream` and `withOutputConsumer` are mutually exclusive"

"`withOutputStream(OutputStream)` and `withOutputConsumer(OutputConsumer)` are mutually exclusive."

@Test
public void testMutualExclusivityOfStdOutConsumption2() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withOutputConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    }).withOutputStream(System.out);
}

@Test(expected = IllegalArgumentException.class)
public void testMutualExclusivityOfStdOutConsumption2() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withOutputConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    }).withOutputStream(System.out);
}

[NO-DOC]


SimpleName:IDENTIFIER 680 ProcBuilder ProcBuilder

StringLiteralExpr:LITERAL 680 "echo" "echo"

SimpleName:IDENTIFIER 681 withArgs withArgs

StringLiteralExpr:LITERAL 681 "Hello\n'World'!" "Hello\n'World'!"

SimpleName:IDENTIFIER 682 withOutputStream withOutputStream

SimpleName:IDENTIFIER 683 withOutputConsumer withOutputConsumer

SimpleName:IDENTIFIER 683 StreamConsumer StreamConsumer

SimpleName:IDENTIFIER 685 consume consume

SimpleName:IDENTIFIER 685 InputStream InputStream

SimpleName:IDENTIFIER 685 IOException IOException

SimpleName:IDENTIFIER 686 BufferedReader BufferedReader

SimpleName:IDENTIFIER 686 InputStreamReader InputStreamReader

SimpleName:IDENTIFIER 688 readLine readLine

"`withOutputStream` and `withOutputConsumer` are mutually exclusive"

"`withOutputStream(OutputStream)` and `withOutputConsumer(OutputConsumer)` are mutually exclusive."

@Test
public void testMutualExclusivityOfStdOutConsumption1() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withOutputStream(System.out).withOutputConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    });
}

@Test(expected = IllegalArgumentException.class)
public void testMutualExclusivityOfStdOutConsumption1() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withOutputStream(System.out).withOutputConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    });
}

[NO-DOC]


SimpleName:IDENTIFIER 727 ProcBuilder ProcBuilder

StringLiteralExpr:LITERAL 727 "echo" "echo"

SimpleName:IDENTIFIER 728 withArgs withArgs

StringLiteralExpr:LITERAL 728 "Hello\n'World'!" "Hello\n'World'!"

SimpleName:IDENTIFIER 729 withErrorStream withErrorStream

SimpleName:IDENTIFIER 730 withErrorConsumer withErrorConsumer

SimpleName:IDENTIFIER 730 StreamConsumer StreamConsumer

SimpleName:IDENTIFIER 732 consume consume

SimpleName:IDENTIFIER 732 InputStream InputStream

SimpleName:IDENTIFIER 732 IOException IOException

SimpleName:IDENTIFIER 733 BufferedReader BufferedReader

SimpleName:IDENTIFIER 733 InputStreamReader InputStreamReader

SimpleName:IDENTIFIER 735 readLine readLine

"`withErrorStream` and `withErrorConsumer` are mutually exclusive"

"`withErrorStream(OutputStream)` and `withErrorConsumer(OutputConsumer)` are mutually exclusive."

@Test
public void testMutualExclusivityOfStdErrConsumption1() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withErrorStream(System.out).withErrorConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    });
}

@Test(expected = IllegalArgumentException.class)
public void testMutualExclusivityOfStdErrConsumption1() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withErrorStream(System.out).withErrorConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    });
}

[NO-DOC]


SimpleName:IDENTIFIER 750 ProcBuilder ProcBuilder

StringLiteralExpr:LITERAL 750 "echo" "echo"

SimpleName:IDENTIFIER 751 withArgs withArgs

StringLiteralExpr:LITERAL 751 "Hello\n'World'!" "Hello\n'World'!"

SimpleName:IDENTIFIER 752 withErrorConsumer withErrorConsumer

SimpleName:IDENTIFIER 752 StreamConsumer StreamConsumer

SimpleName:IDENTIFIER 754 consume consume

SimpleName:IDENTIFIER 754 InputStream InputStream

SimpleName:IDENTIFIER 754 IOException IOException

SimpleName:IDENTIFIER 755 BufferedReader BufferedReader

SimpleName:IDENTIFIER 755 InputStreamReader InputStreamReader

SimpleName:IDENTIFIER 757 readLine readLine

SimpleName:IDENTIFIER 760 withErrorStream withErrorStream

"`withErrorStream` and `withErrorConsumer` are mutually exclusive"

"`withErrorStream(OutputStream)` and `withErrorConsumer(OutputConsumer)` are mutually exclusive."

@Test
public void testMutualExclusivityOfStdErrConsumption2() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withErrorConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    }).withErrorStream(System.out);
}

@Test(expected = IllegalArgumentException.class)
public void testMutualExclusivityOfStdErrConsumption2() {
    new ProcBuilder("echo").withArgs("Hello\n'World'!").withErrorConsumer(new StreamConsumer() {

        @Override
        public void consume(InputStream stream) throws IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
            String line;
            while ((line = reader.readLine()) != null) ;
        }
    }).withErrorStream(System.out);
}

[NO-DOC]


SimpleName:IDENTIFIER 15 expected expected

SimpleName:IDENTIFIER 15 NullPointerException NullPointerException

SimpleName:IDENTIFIER 18 CounterData CounterData

@Test(expected = NullPointerException.class)
public void testConstructor_NullCounterName() {
    new CounterData(null, 1);
}

package io.instacount.appengine.counter.data;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import io.instacount.appengine.counter.service.AbstractShardedCounterServiceTest;
import org.junit.Test;
import com.googlecode.objectify.Key;

public class adhoc_CounterDataTest extends AbstractShardedCounterServiceTest {

    private static final String TEST_COUNTER_NAME = "test-counter1";
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 21 expected expected

SimpleName:IDENTIFIER 21 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 24 CounterData CounterData

@Test(expected = IllegalArgumentException.class)
public void testConstructor_EmptyName() {
    new CounterData("", 1);
}

SimpleName:IDENTIFIER 27 expected expected

SimpleName:IDENTIFIER 27 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 30 CounterData CounterData

@Test(expected = IllegalArgumentException.class)
public void testConstructor_BlankName() {
    new CounterData(" ", 1);
}

SimpleName:IDENTIFIER 33 expected expected

SimpleName:IDENTIFIER 33 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 36 CounterData CounterData

@Test(expected = IllegalArgumentException.class)
public void testConstructor_NegativeShards() {
    new CounterData("", -1);
}

SimpleName:IDENTIFIER 39 expected expected

SimpleName:IDENTIFIER 39 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 42 CounterData CounterData

@Test(expected = IllegalArgumentException.class)
public void testConstructor_0Shards() {
    new CounterData(TEST_COUNTER_NAME, 0);
}


SimpleName:IDENTIFIER 45 expected expected

SimpleName:IDENTIFIER 45 NullPointerException NullPointerException

SimpleName:IDENTIFIER 48 CounterData CounterData

@Test(expected = NullPointerException.class)
public void testGetKey_NullCounterName() {
    CounterData.key(null);
}

SimpleName:IDENTIFIER 51 expected expected

SimpleName:IDENTIFIER 51 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 54 CounterData CounterData

@Test(expected = IllegalArgumentException.class)
public void testGetKey_EmptyCounterName() {
    CounterData.key("");
}

SimpleName:IDENTIFIER 57 expected expected

SimpleName:IDENTIFIER 57 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 60 CounterData CounterData

@Test(expected = IllegalArgumentException.class)
public void testGetKey_BlankCounterName() {
    CounterData.key(" ");
}

SimpleName:IDENTIFIER 54 CounterShardData CounterShardData

@Test(expected = IllegalArgumentException.class)
public void testGetKey_EmptyCounterName() {
    CounterShardData.key(CounterData.key(""), 0);
}

package io.instacount.appengine.counter.data;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import org.junit.Test;
import com.googlecode.objectify.Key;
import io.instacount.appengine.counter.service.AbstractShardedCounterServiceTest;

public class adhoc_CounterShardDataTest extends AbstractShardedCounterServiceTest {

    private static final String TEST_COUNTER_NAME = "test-counter1";
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 60 CounterShardData CounterShardData

@Test(expected = IllegalArgumentException.class)
public void testGetKey_BlankCounterName() {
    CounterShardData.key(CounterData.key(" "), 0);
}


SimpleName:IDENTIFIER 450 expected expected

SimpleName:IDENTIFIER 450 NullPointerException NullPointerException

SimpleName:IDENTIFIER 451 Exception Exception

SimpleName:IDENTIFIER 453 onTaskQueueCounterDeletion onTaskQueueCounterDeletion

@Test(expected = NullPointerException.class)
public void testOnTaskQueueCounterDeletion_NullCounterName() throws Exception {
    impl.onTaskQueueCounterDeletion(null);
}

package io.instacount.appengine.counter.service;

import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import java.math.BigInteger;
import java.util.UUID;
import io.instacount.appengine.counter.exceptions.CounterExistsException;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.google.appengine.api.memcache.MemcacheServiceFactory;
import com.google.appengine.repackaged.com.google.common.math.LongMath;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.ObjectifyService;
import io.instacount.appengine.counter.Counter;
import io.instacount.appengine.counter.CounterOperation;
import io.instacount.appengine.counter.CounterOperation.CounterOperationType;
import io.instacount.appengine.counter.data.CounterData;
import io.instacount.appengine.counter.data.CounterData.CounterIndexes;
import io.instacount.appengine.counter.data.CounterData.CounterStatus;
import io.instacount.appengine.counter.data.CounterShardData;
import io.instacount.appengine.counter.exceptions.CounterNotMutableException;
import io.instacount.appengine.counter.service.ShardedCounterServiceImpl.CounterDataGetCreateContainer;

public class adhoc_ShardedCounterServiceImplTest extends AbstractShardedCounterServiceTest {

    private static final String NEW_DESCRIPTION = "new Description";

    private static final CounterIndexes NO_INDEXES = CounterIndexes.none();

    private static final CounterIndexes ALL_INDEXES = CounterIndexes.all();

    private Key<CounterShardData> testCounter1CounterShard0Key;

    private ShardedCounterServiceImpl impl;

    @Before
    public void setUp() throws Exception {
        super.setUp();
        Key<CounterData> testCounter1Key = CounterData.key(TEST_COUNTER1);
        this.testCounter1CounterShard0Key = CounterShardData.key(testCounter1Key, 0);
        this.impl = (ShardedCounterServiceImpl) shardedCounterService;
    }

    @After
    public void tearDown() {
        super.tearDown();
    }

    private void createCounterWithStatus(final CounterStatus counterStatus) {
        Preconditions.checkNotNull(counterStatus);
        impl.createCounter(TEST_COUNTER1);
        final CounterData counterData = impl.getCounterData(TEST_COUNTER1).get();
        counterData.setCounterStatus(counterStatus);
        ObjectifyService.ofy().save().entity(counterData).now();
        final Counter dsCounter = impl.getCounter(TEST_COUNTER1).get();
        assertThat(dsCounter.getCounterStatus(), is(counterStatus));
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 462 expected expected

SimpleName:IDENTIFIER 462 RuntimeException RuntimeException

SimpleName:IDENTIFIER 463 Exception Exception

SimpleName:IDENTIFIER 465 increment increment

SimpleName:IDENTIFIER 469 onTaskQueueCounterDeletion onTaskQueueCounterDeletion

SimpleName:IDENTIFIER 472 RuntimeException RuntimeException

SimpleName:IDENTIFIER 474 assertThat assertThat

SimpleName:IDENTIFIER 474 getMessage getMessage

@Test(expected = RuntimeException.class)
public void testOnTaskQueueCounterDeletion_WrongStatus() throws Exception {
    impl.increment(TEST_COUNTER1, 1);
    try {
        impl.onTaskQueueCounterDeletion(TEST_COUNTER1);
        fail();
    } catch (RuntimeException re) {
        assertThat(re.getMessage(), is("Can't delete counter 'test-counter1' because it is currently not in the DELETING state!"));
        throw re;
    }
}


SimpleName:IDENTIFIER 546 expected expected

SimpleName:IDENTIFIER 546 NullPointerException NullPointerException

SimpleName:IDENTIFIER 547 Exception Exception

SimpleName:IDENTIFIER 549 incrementMemcacheAtomic incrementMemcacheAtomic

@Test(expected = NullPointerException.class)
public void testIncrementMemcacheAtomic_Null() throws Exception {
    this.impl.incrementMemcacheAtomic(null, 10);
}


SimpleName:IDENTIFIER 578 expected expected

SimpleName:IDENTIFIER 578 NullPointerException NullPointerException

SimpleName:IDENTIFIER 579 Exception Exception

SimpleName:IDENTIFIER 581 assembleCounterKeyforMemcache assembleCounterKeyforMemcache

@Test(expected = NullPointerException.class)
public void testAssembleCounterKeyforMemcache_NullInput() throws Exception {
    impl.assembleCounterKeyforMemcache(null);
}


SimpleName:IDENTIFIER 594 expected expected

SimpleName:IDENTIFIER 594 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 595 Exception Exception

SimpleName:IDENTIFIER 597 assertCounterAmountMutatable assertCounterAmountMutatable

SimpleName:IDENTIFIER 597 CounterStatus CounterStatus

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterAmountMutatable_ContractingShards_CONTRACTING_SHARDS() throws Exception {
    impl.assertCounterAmountMutatable(TEST_COUNTER1, CounterStatus.CONTRACTING_SHARDS);
}

SimpleName:IDENTIFIER 600 expected expected

SimpleName:IDENTIFIER 600 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 601 Exception Exception

SimpleName:IDENTIFIER 603 assertCounterAmountMutatable assertCounterAmountMutatable

SimpleName:IDENTIFIER 603 CounterStatus CounterStatus

SimpleName:IDENTIFIER 603 DELETING DELETING

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterAmountMutatable_ContractingShards_DELETING() throws Exception {
    impl.assertCounterAmountMutatable(TEST_COUNTER1, CounterStatus.DELETING);
}

SimpleName:IDENTIFIER 612 expected expected

SimpleName:IDENTIFIER 612 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 613 Exception Exception

SimpleName:IDENTIFIER 615 assertCounterAmountMutatable assertCounterAmountMutatable

SimpleName:IDENTIFIER 615 CounterStatus CounterStatus

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterAmountMutatable_ContractingShards_EXPANDING_SHARDS() throws Exception {
    impl.assertCounterAmountMutatable(TEST_COUNTER1, CounterStatus.EXPANDING_SHARDS);
}

SimpleName:IDENTIFIER 618 expected expected

SimpleName:IDENTIFIER 618 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 619 Exception Exception

SimpleName:IDENTIFIER 621 assertCounterAmountMutatable assertCounterAmountMutatable

SimpleName:IDENTIFIER 621 CounterStatus CounterStatus

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterAmountMutatable_ContractingShards_READ_ONLY_COUNT() throws Exception {
    impl.assertCounterAmountMutatable(TEST_COUNTER1, CounterStatus.READ_ONLY_COUNT);
}


SimpleName:IDENTIFIER 628 expected expected

SimpleName:IDENTIFIER 628 NullPointerException NullPointerException

SimpleName:IDENTIFIER 629 Exception Exception

SimpleName:IDENTIFIER 631 memcacheSafeDelete memcacheSafeDelete

@Test(expected = NullPointerException.class)
public void testMemcacheSafeDelete_NullInput() throws Exception {
    impl.memcacheSafeDelete(null);
}


SimpleName:IDENTIFIER 651 expected expected

SimpleName:IDENTIFIER 651 NullPointerException NullPointerException

SimpleName:IDENTIFIER 652 Exception Exception

SimpleName:IDENTIFIER 654 memcacheSafeGet memcacheSafeGet

@Test(expected = NullPointerException.class)
public void testMemcacheSafeGet_NullInput() throws Exception {
    impl.memcacheSafeGet(null);
}


SimpleName:IDENTIFIER 674 expected expected

SimpleName:IDENTIFIER 674 NullPointerException NullPointerException

SimpleName:IDENTIFIER 675 Exception Exception

SimpleName:IDENTIFIER 677 IncrementShardWork IncrementShardWork

SimpleName:IDENTIFIER 677 randomUUID randomUUID

SimpleName:IDENTIFIER 677 Optional Optional

BooleanLiteralExpr:LITERAL 677 false false

@Test(expected = NullPointerException.class)
public void testIncrementShardWork_NullCounterData() throws Exception {
    impl.new IncrementShardWork(null, UUID.randomUUID(), Optional.of(1), 1, false);
}

SimpleName:IDENTIFIER 680 expected expected

SimpleName:IDENTIFIER 680 NullPointerException NullPointerException

SimpleName:IDENTIFIER 681 Exception Exception

SimpleName:IDENTIFIER 683 IncrementShardWork IncrementShardWork

SimpleName:IDENTIFIER 683 CounterData CounterData

SimpleName:IDENTIFIER 683 Optional Optional

BooleanLiteralExpr:LITERAL 683 false false

@Test(expected = NullPointerException.class)
public void testIncrementShardWork_NullOperationUuid() throws Exception {
    impl.new IncrementShardWork(mock(CounterData.class), null, Optional.of(1), 1, false);
}

SimpleName:IDENTIFIER 686 expected expected

SimpleName:IDENTIFIER 686 NullPointerException NullPointerException

SimpleName:IDENTIFIER 687 Exception Exception

SimpleName:IDENTIFIER 689 IncrementShardWork IncrementShardWork

SimpleName:IDENTIFIER 689 CounterData CounterData

SimpleName:IDENTIFIER 689 randomUUID randomUUID

BooleanLiteralExpr:LITERAL 689 false false

@Test(expected = NullPointerException.class)
public void testIncrementShardWork_NullShardNumber() throws Exception {
    impl.new IncrementShardWork(mock(CounterData.class), UUID.randomUUID(), null, 1, false);
}

SimpleName:IDENTIFIER 718 expected expected

SimpleName:IDENTIFIER 718 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 719 Exception Exception

SimpleName:IDENTIFIER 721 IncrementShardWork IncrementShardWork

SimpleName:IDENTIFIER 721 CounterData CounterData

SimpleName:IDENTIFIER 721 randomUUID randomUUID

SimpleName:IDENTIFIER 721 Optional Optional

BooleanLiteralExpr:LITERAL 721 false false

@Test(expected = IllegalArgumentException.class)
public void testIncrementShardWork_ZeroCount() throws Exception {
    impl.new IncrementShardWork(mock(CounterData.class), UUID.randomUUID(), Optional.of(1), 0, false);
}


SimpleName:IDENTIFIER 775 expected expected

SimpleName:IDENTIFIER 775 NullPointerException NullPointerException

SimpleName:IDENTIFIER 778 counterDataKey counterDataKey

SimpleName:IDENTIFIER 778 CounterData CounterData

SimpleName:IDENTIFIER 779 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 779 CounterShardData CounterShardData

SimpleName:IDENTIFIER 779 counterDataKey counterDataKey

counterShardDataKey = CounterShardData.key(counterDataKey, 0)

SimpleName:IDENTIFIER 780 CounterOperation CounterOperation

SimpleName:IDENTIFIER 780 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 780 CounterOperationType CounterOperationType

SimpleName:IDENTIFIER 780 INCREMENT INCREMENT

SimpleName:IDENTIFIER 781 DateTime DateTime

SimpleName:IDENTIFIER 781 DateTimeZone DateTimeZone

BooleanLiteralExpr:LITERAL 781 false false

@Test(expected = NullPointerException.class)
public void testCounterOperationResult_NullCounterOperationUuid() {
    final Key<CounterData> counterDataKey = CounterData.key(TEST_COUNTER1);
    final Key<CounterShardData> counterShardDataKey = CounterShardData.key(counterDataKey, 0);
    new CounterOperation.Impl(null, counterShardDataKey, CounterOperationType.INCREMENT, 0L, DateTime.now(DateTimeZone.UTC), false);
}

SimpleName:IDENTIFIER 784 expected expected

SimpleName:IDENTIFIER 784 NullPointerException NullPointerException

SimpleName:IDENTIFIER 787 operationUuid operationUuid

SimpleName:IDENTIFIER 787 randomUUID randomUUID

final UUID operationUuid = UUID.randomUUID()

final UUID operationUuid = UUID.randomUUID();

SimpleName:IDENTIFIER 788 CounterOperation CounterOperation

SimpleName:IDENTIFIER 788 operationUuid operationUuid

SimpleName:IDENTIFIER 788 CounterOperationType CounterOperationType

SimpleName:IDENTIFIER 788 INCREMENT INCREMENT

SimpleName:IDENTIFIER 789 DateTime DateTime

SimpleName:IDENTIFIER 789 DateTimeZone DateTimeZone

BooleanLiteralExpr:LITERAL 789 false false

@Test(expected = NullPointerException.class)
public void testCounterOperationResult_NullCounterShardDataKey() {
    final UUID operationUuid = UUID.randomUUID();
    new CounterOperation.Impl(operationUuid, null, CounterOperationType.INCREMENT, 0, DateTime.now(DateTimeZone.UTC), false);
}

SimpleName:IDENTIFIER 792 expected expected

SimpleName:IDENTIFIER 792 NullPointerException NullPointerException

SimpleName:IDENTIFIER 795 operationUuid operationUuid

SimpleName:IDENTIFIER 795 randomUUID randomUUID

final UUID operationUuid = UUID.randomUUID()

final UUID operationUuid = UUID.randomUUID();

SimpleName:IDENTIFIER 796 counterDataKey counterDataKey

SimpleName:IDENTIFIER 796 CounterData CounterData

SimpleName:IDENTIFIER 797 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 797 CounterShardData CounterShardData

SimpleName:IDENTIFIER 797 counterDataKey counterDataKey

counterShardDataKey = CounterShardData.key(counterDataKey, 0)

SimpleName:IDENTIFIER 798 CounterOperation CounterOperation

SimpleName:IDENTIFIER 798 operationUuid operationUuid

SimpleName:IDENTIFIER 798 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 798 DateTime DateTime

SimpleName:IDENTIFIER 798 DateTimeZone DateTimeZone

BooleanLiteralExpr:LITERAL 798 false false

@Test(expected = NullPointerException.class)
public void testCounterOperationResult_NullCounterOperationType() {
    final UUID operationUuid = UUID.randomUUID();
    final Key<CounterData> counterDataKey = CounterData.key(TEST_COUNTER1);
    final Key<CounterShardData> counterShardDataKey = CounterShardData.key(counterDataKey, 0);
    new CounterOperation.Impl(operationUuid, counterShardDataKey, null, 0, DateTime.now(DateTimeZone.UTC), false);
}

SimpleName:IDENTIFIER 801 expected expected

SimpleName:IDENTIFIER 801 NullPointerException NullPointerException

SimpleName:IDENTIFIER 804 operationUuid operationUuid

SimpleName:IDENTIFIER 804 randomUUID randomUUID

final UUID operationUuid = UUID.randomUUID()

final UUID operationUuid = UUID.randomUUID();

SimpleName:IDENTIFIER 805 counterDataKey counterDataKey

SimpleName:IDENTIFIER 805 CounterData CounterData

SimpleName:IDENTIFIER 806 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 806 CounterShardData CounterShardData

SimpleName:IDENTIFIER 806 counterDataKey counterDataKey

counterShardDataKey = CounterShardData.key(counterDataKey, 0)

SimpleName:IDENTIFIER 807 CounterOperation CounterOperation

SimpleName:IDENTIFIER 807 operationUuid operationUuid

SimpleName:IDENTIFIER 807 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 807 CounterOperationType CounterOperationType

SimpleName:IDENTIFIER 807 INCREMENT INCREMENT

BooleanLiteralExpr:LITERAL 807 false false

@Test(expected = NullPointerException.class)
public void testCounterOperationResult_NullCreationDateTime() {
    final UUID operationUuid = UUID.randomUUID();
    final Key<CounterData> counterDataKey = CounterData.key(TEST_COUNTER1);
    final Key<CounterShardData> counterShardDataKey = CounterShardData.key(counterDataKey, 0);
    new CounterOperation.Impl(operationUuid, counterShardDataKey, CounterOperationType.INCREMENT, 1, null, false);
}

SimpleName:IDENTIFIER 810 expected expected

SimpleName:IDENTIFIER 810 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 813 operationUuid operationUuid

SimpleName:IDENTIFIER 813 randomUUID randomUUID

final UUID operationUuid = UUID.randomUUID()

final UUID operationUuid = UUID.randomUUID();

SimpleName:IDENTIFIER 814 counterDataKey counterDataKey

SimpleName:IDENTIFIER 814 CounterData CounterData

SimpleName:IDENTIFIER 815 DateTime DateTime

SimpleName:IDENTIFIER 815 DateTimeZone DateTimeZone

final DateTime now = DateTime.now(DateTimeZone.UTC)

final DateTime now = DateTime.now(DateTimeZone.UTC);

SimpleName:IDENTIFIER 816 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 816 CounterShardData CounterShardData

SimpleName:IDENTIFIER 816 counterDataKey counterDataKey

counterShardDataKey = CounterShardData.key(counterDataKey, 0)

SimpleName:IDENTIFIER 817 CounterOperation CounterOperation

SimpleName:IDENTIFIER 817 operationUuid operationUuid

SimpleName:IDENTIFIER 817 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 817 CounterOperationType CounterOperationType

SimpleName:IDENTIFIER 817 INCREMENT INCREMENT

BooleanLiteralExpr:LITERAL 817 false false

@Test(expected = IllegalArgumentException.class)
public void testIncrementCounterOperationResult_NegativeAmount() {
    final UUID operationUuid = UUID.randomUUID();
    final Key<CounterData> counterDataKey = CounterData.key(TEST_COUNTER1);
    final DateTime now = DateTime.now(DateTimeZone.UTC);
    final Key<CounterShardData> counterShardDataKey = CounterShardData.key(counterDataKey, 0);
    new CounterOperation.Impl(operationUuid, counterShardDataKey, CounterOperationType.INCREMENT, -1, now, false);
}

SimpleName:IDENTIFIER 842 expected expected

SimpleName:IDENTIFIER 842 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 845 operationUuid operationUuid

SimpleName:IDENTIFIER 845 randomUUID randomUUID

final UUID operationUuid = UUID.randomUUID()

final UUID operationUuid = UUID.randomUUID();

SimpleName:IDENTIFIER 846 counterDataKey counterDataKey

SimpleName:IDENTIFIER 846 CounterData CounterData

SimpleName:IDENTIFIER 847 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 847 CounterShardData CounterShardData

SimpleName:IDENTIFIER 847 counterDataKey counterDataKey

counterShardDataKey = CounterShardData.key(counterDataKey, 0)

SimpleName:IDENTIFIER 848 CounterOperation CounterOperation

SimpleName:IDENTIFIER 848 operationUuid operationUuid

SimpleName:IDENTIFIER 848 counterShardDataKey counterShardDataKey

SimpleName:IDENTIFIER 848 CounterOperationType CounterOperationType

SimpleName:IDENTIFIER 848 DECREMENT DECREMENT

SimpleName:IDENTIFIER 849 DateTime DateTime

SimpleName:IDENTIFIER 849 DateTimeZone DateTimeZone

BooleanLiteralExpr:LITERAL 849 false false

@Test(expected = IllegalArgumentException.class)
public void testDecrementCounterOperationResult_NegativeAmount() {
    final UUID operationUuid = UUID.randomUUID();
    final Key<CounterData> counterDataKey = CounterData.key(TEST_COUNTER1);
    final Key<CounterShardData> counterShardDataKey = CounterShardData.key(counterDataKey, 0);
    new CounterOperation.Impl(operationUuid, counterShardDataKey, CounterOperationType.DECREMENT, -1, DateTime.now(DateTimeZone.UTC), false);
}


SimpleName:IDENTIFIER 873 expected expected

SimpleName:IDENTIFIER 873 NullPointerException NullPointerException

SimpleName:IDENTIFIER 876 determineRandomShardNumber determineRandomShardNumber

@Test(expected = NullPointerException.class)
public void testDetermineRandomShardNumber_NullOptionalShardNumber() {
    impl.determineRandomShardNumber(null, 2);
}

SimpleName:IDENTIFIER 879 expected expected

SimpleName:IDENTIFIER 879 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 882 determineRandomShardNumber determineRandomShardNumber

SimpleName:IDENTIFIER 882 Optional Optional

@Test(expected = IllegalArgumentException.class)
public void testDetermineRandomShardNumber_0Shards() {
    impl.determineRandomShardNumber(Optional.of(2), 0);
}


SimpleName:IDENTIFIER 957 expected expected

SimpleName:IDENTIFIER 957 NullPointerException NullPointerException

SimpleName:IDENTIFIER 960 assertCounterDetailsMutatable assertCounterDetailsMutatable

SimpleName:IDENTIFIER 960 CounterStatus CounterStatus

SimpleName:IDENTIFIER 960 RESETTING RESETTING

{
    this.impl.assertCounterDetailsMutatable(null, CounterStatus.RESETTING);
}

@Test(expected = NullPointerException.class)
public void testAssertCounterDetailsMutable_NullCounterName() {
    this.impl.assertCounterDetailsMutatable(null, CounterStatus.RESETTING);
}

{
    this.impl.assertCounterDetailsMutatable(null, CounterStatus.RESETTING);
}

SimpleName:IDENTIFIER 963 expected expected

SimpleName:IDENTIFIER 963 NullPointerException NullPointerException

SimpleName:IDENTIFIER 966 assertCounterDetailsMutatable assertCounterDetailsMutatable

{
    this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, null);
}

@Test(expected = NullPointerException.class)
public void testAssertCounterDetailsMutable_NullCounterStatus() {
    this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, null);
}

{
    this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, null);
}

SimpleName:IDENTIFIER 969 expected expected

SimpleName:IDENTIFIER 969 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 974 assertCounterDetailsMutatable assertCounterDetailsMutatable

SimpleName:IDENTIFIER 974 CounterStatus CounterStatus

SimpleName:IDENTIFIER 976 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 978 assertThat assertThat

SimpleName:IDENTIFIER 978 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterDetailsMutable_CONTRACTING_SHARDS() {
    try {
        this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, CounterStatus.CONTRACTING_SHARDS);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("Can't mutate with status CONTRACTING_SHARDS.  Counter must be in in the AVAILABLE or READ_ONLY_COUNT state!"));
        throw e;
    }
}

SimpleName:IDENTIFIER 984 expected expected

SimpleName:IDENTIFIER 984 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 989 assertCounterDetailsMutatable assertCounterDetailsMutatable

SimpleName:IDENTIFIER 989 CounterStatus CounterStatus

SimpleName:IDENTIFIER 989 RESETTING RESETTING

SimpleName:IDENTIFIER 991 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 993 assertThat assertThat

SimpleName:IDENTIFIER 993 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterDetailsMutable_RESETTING() {
    try {
        this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, CounterStatus.RESETTING);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("Can't mutate with status RESETTING.  Counter must be in in the AVAILABLE or READ_ONLY_COUNT state!"));
        throw e;
    }
}

SimpleName:IDENTIFIER 999 expected expected

SimpleName:IDENTIFIER 999 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1004 assertCounterDetailsMutatable assertCounterDetailsMutatable

SimpleName:IDENTIFIER 1004 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1004 DELETING DELETING

SimpleName:IDENTIFIER 1006 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1008 assertThat assertThat

SimpleName:IDENTIFIER 1008 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterDetailsMutable_DELETING() {
    try {
        this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, CounterStatus.DELETING);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("Can't mutate with status DELETING.  Counter must be in in the AVAILABLE or READ_ONLY_COUNT state!"));
        throw e;
    }
}

SimpleName:IDENTIFIER 1014 expected expected

SimpleName:IDENTIFIER 1014 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1019 assertCounterDetailsMutatable assertCounterDetailsMutatable

SimpleName:IDENTIFIER 1019 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1021 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1023 assertThat assertThat

SimpleName:IDENTIFIER 1023 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertCounterDetailsMutable_EXPANDING_SHARDS() {
    try {
        this.impl.assertCounterDetailsMutatable(TEST_COUNTER1, CounterStatus.EXPANDING_SHARDS);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("Can't mutate with status EXPANDING_SHARDS.  Counter must be in in the AVAILABLE or READ_ONLY_COUNT state!"));
        throw e;
    }
}


SimpleName:IDENTIFIER 1045 expected expected

SimpleName:IDENTIFIER 1045 NullPointerException NullPointerException

SimpleName:IDENTIFIER 1048 assertValidExternalCounterStatus assertValidExternalCounterStatus

SimpleName:IDENTIFIER 1048 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1048 RESETTING RESETTING

{
    this.impl.assertValidExternalCounterStatus(null, CounterStatus.RESETTING);
}

@Test(expected = NullPointerException.class)
public void testAssertValidExternalCounterStatus_NullCounterName() {
    this.impl.assertValidExternalCounterStatus(null, CounterStatus.RESETTING);
}

{
    this.impl.assertValidExternalCounterStatus(null, CounterStatus.RESETTING);
}

SimpleName:IDENTIFIER 1051 expected expected

SimpleName:IDENTIFIER 1051 NullPointerException NullPointerException

SimpleName:IDENTIFIER 1054 assertValidExternalCounterStatus assertValidExternalCounterStatus

{
    this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, null);
}

@Test(expected = NullPointerException.class)
public void testAssertValidExternalCounterStatus_NullCounterStatus() {
    this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, null);
}

{
    this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, null);
}

SimpleName:IDENTIFIER 1057 expected expected

SimpleName:IDENTIFIER 1057 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1062 assertValidExternalCounterStatus assertValidExternalCounterStatus

SimpleName:IDENTIFIER 1062 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1064 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1066 assertThat assertThat

SimpleName:IDENTIFIER 1066 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertValidExternalCounterStatus_CONTRACTING_SHARDS() {
    try {
        this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, CounterStatus.CONTRACTING_SHARDS);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("This Counter can only be put into the AVAILABLE or READ_ONLY_COUNT status!  CONTRACTING_SHARDS is not allowed."));
        throw e;
    }
}

SimpleName:IDENTIFIER 1072 expected expected

SimpleName:IDENTIFIER 1072 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1077 assertValidExternalCounterStatus assertValidExternalCounterStatus

SimpleName:IDENTIFIER 1077 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1077 RESETTING RESETTING

SimpleName:IDENTIFIER 1079 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1081 assertThat assertThat

SimpleName:IDENTIFIER 1081 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertValidExternalCounterStatus_RESETTING() {
    try {
        this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, CounterStatus.RESETTING);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("This Counter can only be put into the AVAILABLE or READ_ONLY_COUNT status!  RESETTING is not allowed."));
        throw e;
    }
}

SimpleName:IDENTIFIER 1087 expected expected

SimpleName:IDENTIFIER 1087 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1092 assertValidExternalCounterStatus assertValidExternalCounterStatus

SimpleName:IDENTIFIER 1092 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1092 DELETING DELETING

SimpleName:IDENTIFIER 1094 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1096 assertThat assertThat

SimpleName:IDENTIFIER 1096 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertValidExternalCounterStatus_DELETING() {
    try {
        this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, CounterStatus.DELETING);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("This Counter can only be put into the AVAILABLE or READ_ONLY_COUNT status!  DELETING is not allowed."));
        throw e;
    }
}

SimpleName:IDENTIFIER 1102 expected expected

SimpleName:IDENTIFIER 1102 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1107 assertValidExternalCounterStatus assertValidExternalCounterStatus

SimpleName:IDENTIFIER 1107 CounterStatus CounterStatus

SimpleName:IDENTIFIER 1109 CounterNotMutableException CounterNotMutableException

SimpleName:IDENTIFIER 1111 assertThat assertThat

SimpleName:IDENTIFIER 1111 getMessage getMessage

@Test(expected = CounterNotMutableException.class)
public void testAssertValidExternalCounterStatus_EXPANDING_SHARDS() {
    try {
        this.impl.assertValidExternalCounterStatus(TEST_COUNTER1, CounterStatus.EXPANDING_SHARDS);
    } catch (CounterNotMutableException e) {
        assertThat(e.getMessage(), is("This Counter can only be put into the AVAILABLE or READ_ONLY_COUNT status!  EXPANDING_SHARDS is not allowed."));
        throw e;
    }
}


SimpleName:IDENTIFIER 139 expected expected

SimpleName:IDENTIFIER 139 NullPointerException NullPointerException

SimpleName:IDENTIFIER 142 ResetCounterShardWork ResetCounterShardWork

{
    new ResetCounterShardWork(null, 1);
}

@Test(expected = NullPointerException.class)
public void testResetCounterWork_NullCounterName() {
    new ResetCounterShardWork(null, 1);
}

{
    new ResetCounterShardWork(null, 1);
}

package io.instacount.appengine.counter.service;

import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import java.math.BigInteger;
import java.util.UUID;
import io.instacount.appengine.counter.exceptions.NoCounterExistsException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.googlecode.objectify.ObjectifyService;
import io.instacount.appengine.counter.Counter;
import io.instacount.appengine.counter.data.CounterData;
import io.instacount.appengine.counter.data.CounterData.CounterStatus;
import io.instacount.appengine.counter.exceptions.CounterNotMutableException;
import io.instacount.appengine.counter.service.ShardedCounterServiceImpl.ResetCounterShardWork;

public class adhoc_ShardedCounterServiceResetTest extends AbstractShardedCounterServiceTest {

    @Before
    public void setUp() throws Exception {
        super.setUp();
    }

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

SimpleName:IDENTIFIER 145 expected expected

SimpleName:IDENTIFIER 145 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 148 ResetCounterShardWork ResetCounterShardWork

{
    new ResetCounterShardWork("", 1);
}

@Test(expected = IllegalArgumentException.class)
public void testResetCounterWork_EmptyCounterName() {
    new ResetCounterShardWork("", 1);
}

{
    new ResetCounterShardWork("", 1);
}

SimpleName:IDENTIFIER 151 expected expected

SimpleName:IDENTIFIER 151 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 154 ResetCounterShardWork ResetCounterShardWork

{
    new ResetCounterShardWork("  ", 1);
}

@Test(expected = IllegalArgumentException.class)
public void testResetCounterWork_BlankCounterName() {
    new ResetCounterShardWork("  ", 1);
}

{
    new ResetCounterShardWork("  ", 1);
}


SimpleName:IDENTIFIER 59 expected expected

SimpleName:IDENTIFIER 59 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 62 builder builder

SimpleName:IDENTIFIER 62 ShardedCounterServiceConfiguration ShardedCounterServiceConfiguration

SimpleName:IDENTIFIER 62 Builder Builder

SimpleName:IDENTIFIER 63 builder builder

SimpleName:IDENTIFIER 63 withNumInitialShards withNumInitialShards

SimpleName:IDENTIFIER 65 shardedCounterService shardedCounterService

SimpleName:IDENTIFIER 65 ShardedCounterServiceImpl ShardedCounterServiceImpl

SimpleName:IDENTIFIER 65 MemcacheServiceFactory MemcacheServiceFactory

SimpleName:IDENTIFIER 65 getMemcacheService getMemcacheService

SimpleName:IDENTIFIER 66 builder builder

@Test(expected = IllegalArgumentException.class)
public void testShardedCounterServiceConstructor_ValidMemcache_0Shards() {
    final ShardedCounterServiceConfiguration.Builder builder = new ShardedCounterServiceConfiguration.Builder();
    builder.withNumInitialShards(0);
    shardedCounterService = new ShardedCounterServiceImpl(MemcacheServiceFactory.getMemcacheService(), builder.build());
}

package io.instacount.appengine.counter.service;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.google.appengine.api.memcache.MemcacheServiceFactory;

public class adhoc_ShardedCounterServiceConstructorTest extends AbstractShardedCounterServiceTest {

    @Before
    public void setUp() throws Exception {
        super.setUp();
    }

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

SimpleName:IDENTIFIER 69 expected expected

SimpleName:IDENTIFIER 69 RuntimeException RuntimeException

SimpleName:IDENTIFIER 72 builder builder

SimpleName:IDENTIFIER 72 ShardedCounterServiceConfiguration ShardedCounterServiceConfiguration

SimpleName:IDENTIFIER 72 Builder Builder

SimpleName:IDENTIFIER 73 builder builder

SimpleName:IDENTIFIER 73 withNumInitialShards withNumInitialShards

SimpleName:IDENTIFIER 75 shardedCounterService shardedCounterService

SimpleName:IDENTIFIER 75 ShardedCounterServiceImpl ShardedCounterServiceImpl

SimpleName:IDENTIFIER 75 MemcacheServiceFactory MemcacheServiceFactory

SimpleName:IDENTIFIER 75 getMemcacheService getMemcacheService

SimpleName:IDENTIFIER 76 builder builder

@Test(expected = RuntimeException.class)
public void testShardedCounterServiceConstructor_ValidMemcache_NegativeShards() {
    final ShardedCounterServiceConfiguration.Builder builder = new ShardedCounterServiceConfiguration.Builder();
    builder.withNumInitialShards(-10);
    shardedCounterService = new ShardedCounterServiceImpl(MemcacheServiceFactory.getMemcacheService(), builder.build());
}


SimpleName:IDENTIFIER 7 expected expected

SimpleName:IDENTIFIER 7 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 8 testAuthHeaderRejectsEmptyUsername testAuthHeaderRejectsEmptyUsername

SimpleName:IDENTIFIER 8 Exception Exception

SimpleName:IDENTIFIER 9 Authorization Authorization

SimpleName:IDENTIFIER 9 buildAuthHeader buildAuthHeader

StringLiteralExpr:LITERAL 9 "token" "token"

@Test(expected = IllegalArgumentException.class)
public void testAuthHeaderRejectsEmptyUsername() throws Exception {
    Authorization.buildAuthHeader(null, "token");
}

package com.librato.metrics.client;

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

public class adhoc_AuthorizationTest {
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 12 expected expected

SimpleName:IDENTIFIER 12 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 13 testAuthHeaderRejectsEmptyToken testAuthHeaderRejectsEmptyToken

SimpleName:IDENTIFIER 13 Exception Exception

SimpleName:IDENTIFIER 14 Authorization Authorization

SimpleName:IDENTIFIER 14 buildAuthHeader buildAuthHeader

StringLiteralExpr:LITERAL 14 "username" "username"

@Test(expected = IllegalArgumentException.class)
public void testAuthHeaderRejectsEmptyToken() throws Exception {
    Authorization.buildAuthHeader("username", null);
}


SimpleName:IDENTIFIER 59 expected expected

SimpleName:IDENTIFIER 59 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 60 testAssertion testAssertion

SimpleName:IDENTIFIER 60 Exception Exception

SimpleName:IDENTIFIER 61 IdentitiesAnswerHeaders IdentitiesAnswerHeaders

@Test(expected = IllegalArgumentException.class)
public void testAssertion() throws Exception {
    IdentitiesAnswerHeaders.from(new byte[] { 0, 0, 1 });
}

package com.spotify.sshagentproxy;

import static com.spotify.sshagentproxy.IdentitiesAnswerHeaders.SSH2_AGENT_IDENTITIES_ANSWER;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.Test;

public class adhoc_IdentitiesAnswerHeadersTest {
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 58 expected expected

SimpleName:IDENTIFIER 58 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 59 testAssertion testAssertion

SimpleName:IDENTIFIER 59 Exception Exception

SimpleName:IDENTIFIER 60 SignResponseHeaders SignResponseHeaders

@Test(expected = IllegalArgumentException.class)
public void testAssertion() throws Exception {
    SignResponseHeaders.from(new byte[] { 0, 0, 1 });
}

package com.spotify.sshagentproxy;

import static com.spotify.sshagentproxy.SignResponseHeaders.SSH2_AGENT_SIGN_RESPONSE;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.Test;

public class adhoc_SignResponseHeadersTest {
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 63 testFromString testFromString

@Test
public void testFromString() {
    LOG.info("fromString");
    String type = "1920x1080";
    BannerType expResult = BannerType.FANART_HD;
    BannerType result = BannerType.fromString(type);
    assertEquals(expResult, result);
    assertEquals(BannerType.ARTWORK, BannerType.fromString("artwork"));
    assertEquals(BannerType.FANART_SD, BannerType.fromString("1280x720"));
    assertEquals(BannerType.ARTWORK, BannerType.fromString("1024x768"));
    BannerType.fromString("Silly");
    BannerType.fromString("");
    BannerType.fromString(null);
}

@Test(expected = IllegalArgumentException.class)
public void testFromString() {
    LOG.info("fromString");
    String type = "1920x1080";
    BannerType expResult = BannerType.FANART_HD;
    BannerType result = BannerType.fromString(type);
    assertEquals(expResult, result);
    assertEquals(BannerType.ARTWORK, BannerType.fromString("artwork"));
    assertEquals(BannerType.FANART_SD, BannerType.fromString("1280x720"));
    assertEquals(BannerType.ARTWORK, BannerType.fromString("1024x768"));
    BannerType.fromString("Silly");
    BannerType.fromString("");
    BannerType.fromString(null);
}

package com.omertron.thetvdbapi.model;

import com.omertron.thetvdbapi.TestLogger;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertEquals;

public class adhoc_BannerTypeTest {

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

    @Rule
    public ExpectedException exception = ExpectedException.none();

    public static void setUpClass() {
        TestLogger.configure();
    }
    /*TEST PLACEHOLDER*/
}

Test of fromString method, of class BannerType.


SimpleName:IDENTIFIER 188 expected expected

SimpleName:IDENTIFIER 188 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 189 testSetAttributeUnknown testSetAttributeUnknown

SimpleName:IDENTIFIER 189 Exception Exception

SimpleName:IDENTIFIER 190 setAttribute setAttribute

SimpleName:IDENTIFIER 190 objectName objectName

StringLiteralExpr:LITERAL 190 "not-known" "not-known"

@Test(expected = IllegalArgumentException.class)
public void testSetAttributeUnknown() throws Exception {
    client.setAttribute(objectName, "not-known", "1");
}

package com.j256.simplejmx.client;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.net.InetAddress;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.management.Attribute;
import javax.management.AttributeNotFoundException;
import javax.management.JMException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
import javax.management.ObjectName;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import com.j256.simplejmx.common.IoUtils;
import com.j256.simplejmx.common.JmxAttributeMethod;
import com.j256.simplejmx.common.JmxOperation;
import com.j256.simplejmx.common.JmxResource;
import com.j256.simplejmx.common.ObjectNameUtil;
import com.j256.simplejmx.server.JmxServer;

public class adhoc_JmxClientTest {

    private static final int JMX_PORT = 8000;

    private static final String JMX_DOMAIN = "foo.com";

    private static JmxServer server;

    private static String beanName;

    private static ObjectName objectName;

    private static String anotherBeanName;

    private static ObjectName anotherObjectName;

    private static JmxClient client;

    private static JmxClient closedClient;

    private static JmxClientTestObject testObject;

    @BeforeClass
    public static void beforeClass() throws Exception {
        InetAddress address = InetAddress.getByName("localhost");
        server = new JmxServer(address, JMX_PORT);
        server.start();
        testObject = new JmxClientTestObject();
        server.register(testObject);
        beanName = JmxClientTestObject.class.getSimpleName();
        objectName = ObjectNameUtil.makeObjectName(JMX_DOMAIN, beanName);
        JmxClientTestAnotherObject anotherObj = new JmxClientTestAnotherObject();
        server.register(anotherObj);
        anotherBeanName = JmxClientTestAnotherObject.class.getSimpleName();
        anotherObjectName = ObjectNameUtil.makeObjectName(JMX_DOMAIN, anotherBeanName);
        client = new JmxClient(address, JMX_PORT);
        closedClient = new JmxClient(address, JMX_PORT);
        closedClient.closeThrow();
        closedClient.closeThrow();
    }

    @AfterClass
    public static void afterClass() {
        IoUtils.closeQuietly(client);
        client = null;
        IoUtils.closeQuietly(server);
        server = null;
    }

    private void testThingtoString(String methodName, Object arg) throws Exception {
        String argString = arg.toString();
        testThingtoString(methodName, argString, argString);
    }

    private void testThingtoString(String methodName, String expected, String argString) throws Exception {
        assertEquals(expected, client.invokeOperationToString(objectName, methodName, argString));
    }

    @JmxResource(domainName = JMX_DOMAIN)
    protected static class JmxClientTestObject {

        volatile int x;

        @JmxAttributeMethod
        public void setX(int x) {
            this.x = x;
        }

        @JmxAttributeMethod
        public int getX() {
            return x;
        }

        @JmxAttributeMethod
        public String getNull() {
            return null;
        }

        @JmxOperation
        public long times(short x1, int x2) {
            return x1 * x2;
        }

        @JmxOperation
        public void doThrow() {
            throw new RuntimeException("throw away!");
        }

        @JmxOperation
        public Object returnNull() {
            return null;
        }

        @JmxOperation
        public Object returnNull(int anotherArg) {
            return null;
        }

        @JmxOperation
        public String dateToString(Date date) {
            return date.toString();
        }

        @JmxOperation
        public String booleanToString(boolean booleanVal) {
            return Boolean.toString(booleanVal);
        }

        @JmxOperation
        public String charToString(char charVal) {
            return Character.toString(charVal);
        }

        @JmxOperation
        public String byteToString(byte byteVal) {
            return Byte.toString(byteVal);
        }

        @JmxOperation
        public String shortToString(short shortVal) {
            return Short.toString(shortVal);
        }

        @JmxOperation
        public String intToString(int intVal) {
            return Integer.toString(intVal);
        }

        @JmxOperation
        public String longToString(long longVal) {
            return Long.toString(longVal);
        }

        @JmxOperation
        public String floatToString(float floatVal) {
            return Float.toString(floatVal);
        }

        @JmxOperation
        public String doubleToString(double doubleVal) {
            return Double.toString(doubleVal);
        }
    }

    @JmxResource(domainName = JMX_DOMAIN)
    protected static class JmxClientTestAnotherObject {

        int y;

        @JmxAttributeMethod
        public int getY() {
            return y;
        }

        @JmxAttributeMethod
        public void setY(int y) {
            this.y = y;
        }

        @JmxOperation
        public long timesTwo(short y1, int y2) {
            return y1 * y2;
        }
    }
    /*TEST PLACEHOLDER*/
}


SimpleName:IDENTIFIER 18 expected expected

SimpleName:IDENTIFIER 18 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 19 testSelfNamingNoDescription testSelfNamingNoDescription

SimpleName:IDENTIFIER 20 SelfNamingNoDescription SelfNamingNoDescription

SimpleName:IDENTIFIER 21 ObjectNameUtil ObjectNameUtil

SimpleName:IDENTIFIER 21 makeObjectName makeObjectName

SimpleName:IDENTIFIER 21 getClass getClass

SimpleName:IDENTIFIER 21 getAnnotation getAnnotation

SimpleName:IDENTIFIER 21 JmxResource JmxResource

SimpleName:IDENTIFIER 21 JmxSelfNaming JmxSelfNaming

@Test(expected = IllegalArgumentException.class)
public void testSelfNamingNoDescription() {
    SelfNamingNoDescription obj = new SelfNamingNoDescription();
    ObjectNameUtil.makeObjectName(obj.getClass().getAnnotation(JmxResource.class), (JmxSelfNaming) obj);
}

package com.j256.simplejmx.common;

import static org.junit.Assert.assertEquals;
import javax.management.ObjectName;
import org.junit.Test;

public class adhoc_ObjectNameUtilTest {

    private static final String DOMAIN_NAME = "foo.com";

    private static final String OBJECT_NAME = "someObj";

    private static final String FIELD_NAME1 = "a";

    private static final String FOLDER_NAME1 = "folder1";

    private static final String FIELD_NAME2 = "b";

    private static final String FOLDER_NAME2 = "folder2";

    @JmxResource
    protected static class SelfNamingNoDescription implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return null;
        }
    }

    @JmxResource(beanName = OBJECT_NAME)
    protected static class SelfNamingUseJmxResourceObjectName implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return DOMAIN_NAME;
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return null;
        }
    }

    @JmxResource(domainName = DOMAIN_NAME)
    protected static class UseObjectClassForName {
    }

    @JmxResource(domainName = DOMAIN_NAME)
    protected static class SelfNamingUseObjectClassForName implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return null;
        }
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME, folderNames = { FIELD_NAME1 + "=" + FOLDER_NAME1, FIELD_NAME2 + "=" + FOLDER_NAME2 })
    protected static class StringFolderField {
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME, folderNames = { FOLDER_NAME1, FOLDER_NAME2 })
    protected static class NoStringFolderField {
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME)
    protected static class JmxFolderNameField implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return new JmxFolderName[] { new JmxFolderName(FIELD_NAME1, FOLDER_NAME1), new JmxFolderName(FIELD_NAME2, FOLDER_NAME2) };
        }
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME)
    protected static class NoJmxFolderNameField implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return new JmxFolderName[] { new JmxFolderName(FOLDER_NAME1), new JmxFolderName(FOLDER_NAME2) };
        }
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME, folderNames = { FOLDER_NAME1 })
    protected static class FoldersFromAnnotationWithSelfNaming implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return "FoldersFromAnnotationWithSelfNaming";
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return null;
        }
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME, folderNames = { FOLDER_NAME1 })
    protected static class FoldersFromSelfNaming implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return "FoldersFromSelfNaming";
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return new JmxFolderName[] { new JmxFolderName(FOLDER_NAME2) };
        }
    }

    @JmxResource(domainName = ":::")
    protected static class InvalidObjectName {
    }

    @JmxResource(domainName = DOMAIN_NAME, beanName = OBJECT_NAME, folderNames = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k" })
    protected static class LargeNumberOfAutoGeneratedFields {
    }

    protected static class NoDomainInfo implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return null;
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return null;
        }
    }

    protected static class NoObjectNameInfo implements JmxSelfNaming {

        @Override
        public String getJmxDomainName() {
            return "NoObjectNameInfo";
        }

        @Override
        public String getJmxBeanName() {
            return null;
        }

        @Override
        public JmxFolderName[] getJmxFolderNames() {
            return null;
        }
    }
    /*TEST PLACEHOLDER*/
}

SimpleName:IDENTIFIER 93 expected expected

SimpleName:IDENTIFIER 93 IllegalArgumentException IllegalArgumentException

SimpleName:IDENTIFIER 94 testNoDomainInfo testNoDomainInfo

SimpleName:IDENTIFIER 95 ObjectNameUtil ObjectNameUtil

SimpleName:IDENTIFIER 95 makeObjectName makeObjectName

SimpleName:IDENTIFIER 95 NoDomainInfo NoDomainInfo

@Test(expected = IllegalArgumentException.class)
public void testNoDomainInfo() {
    ObjectNameUtil.makeObjectName(null, new NoDomainInfo());
}