question stringlengths 935 50.2k | answer stringlengths 92 8.26k |
|---|---|
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'createWorker' in class 'net.greghaines.jesque.meta.dao.impl.Wo... | ```java
@Test(expected = ParseException.class)
public void testCreateWorker_MalformedName() throws ParseException, IOException {
this.workerInfoDAO.createWorker("foo", this.jedis);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.meta.dao.impl.KeysDAOR... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullConfig() {
new KeysDAORedisImpl(null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.meta.dao.impl.KeysDAOR... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullPool() {
final Config config = new ConfigBuilder().build();
new KeysDAORedisImpl(config, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.meta.dao.impl.FailureD... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullConfig() {
new FailureDAORedisImpl(null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.meta.dao.impl.FailureD... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullPool() {
final Config config = new ConfigBuilder().build();
new FailureDAORedisImpl(config, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'enqueue' in class 'net.greghaines.jesque.meta.dao.impl.Failure... | ```java
@Test(expected = IllegalArgumentException.class)
public void testEnqueue_NullQueue() throws IOException {
this.failureDAO.enqueue(this.jedis, null, new Job("foo"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'enqueue' in class 'net.greghaines.jesque.meta.dao.impl.Failure... | ```java
@Test(expected = IllegalArgumentException.class)
public void testEnqueue_EmptyQueue() throws IOException {
this.failureDAO.enqueue(this.jedis, "", new Job("foo"));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'enqueue' in class 'net.greghaines.jesque.meta.dao.impl.Failure... | ```java
@Test(expected = IllegalArgumentException.class)
public void testEnqueue_NullJob() throws IOException {
this.failureDAO.enqueue(this.jedis, "foo", null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'enqueue' in class 'net.greghaines.jesque.meta.dao.impl.Failure... | ```java
@Test(expected = IllegalStateException.class)
public void testEnqueue_InvalidJob() throws IOException {
this.failureDAO.enqueue(this.jedis, "foo", new Job());
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.meta.dao.impl.QueueInf... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullConfig() {
new QueueInfoDAORedisImpl(null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.meta.dao.impl.QueueInf... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullPool() {
final Config config = new ConfigBuilder().build();
new QueueInfoDAORedisImpl(config, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.ConfigBuilder' for the... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_Cloning_Null() {
new ConfigBuilder(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withHost' in class 'net.greghaines.jesque.ConfigBuilder' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithHost_Null() {
new ConfigBuilder().withHost(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withHost' in class 'net.greghaines.jesque.ConfigBuilder' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithHost_Empty() {
new ConfigBuilder().withHost("");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withPort' in class 'net.greghaines.jesque.ConfigBuilder' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithPort_Low() {
new ConfigBuilder().withPort(0);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withPort' in class 'net.greghaines.jesque.ConfigBuilder' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithPort_High() {
new ConfigBuilder().withPort(Integer.MAX_VALUE);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withTimeout' in class 'net.greghaines.jesque.ConfigBuilder' fo... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithTimeout_Negative() {
new ConfigBuilder().withTimeout(-1);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withDatabase' in class 'net.greghaines.jesque.ConfigBuilder' f... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithDatabase_Negative() {
new ConfigBuilder().withDatabase(-1);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'withNamespace' in class 'net.greghaines.jesque.ConfigBuilder' ... | ```java
@Test(expected = IllegalArgumentException.class)
public void testWithNamespace_Null() {
new ConfigBuilder().withNamespace(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.JobFailure' for the ex... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_Clone_Null() {
new JobFailure(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'forName' in class 'net.greghaines.jesque.utils.ReflectionUtils... | ```java
@Test(expected = IllegalArgumentException.class)
public void testForName_Null() throws ClassNotFoundException {
ReflectionUtils.forName(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'forName' in class 'net.greghaines.jesque.utils.ReflectionUtils... | ```java
@Test(expected = ClassNotFoundException.class)
public void testForName_NotFound() throws ClassNotFoundException {
ReflectionUtils.forName("123Bogus");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'invokeSetters' in class 'net.greghaines.jesque.utils.Reflectio... | ```java
@Test(expected = NoSuchMethodException.class)
public void testInvokeSetters_MissingSetter() throws ReflectiveOperationException {
final Map<String, Object> vars = new HashMap<String, Object>();
vars.put("bogusVal", new Object());
ReflectionUtils.invokeSetters(new SetterObj(), vars);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'invokeSetters' in class 'net.greghaines.jesque.utils.Reflectio... | ```java
@Test(expected = IllegalArgumentException.class)
public void testInvokeSetters_BadType() throws ReflectiveOperationException {
final Map<String, Object> vars = new HashMap<String, Object>();
vars.put("intVal", new Object());
ReflectionUtils.invokeSetters(new SetterObj(), vars);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'recreateThrowable' in class 'net.greghaines.jesque.utils.Jesqu... | ```java
@Test(expected = NoSuchConstructorException.class)
public void simpleNonRegularException() throws Exception {
try {
throw new NonRegularException(0.0);
} catch (Throwable t) {
serialize(t);
}
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'recreateThrowable' in class 'net.greghaines.jesque.utils.Jesqu... | ```java
@Test(expected = NoSuchConstructorException.class)
public void nestedNonRegularException() throws Exception {
try {
try {
throw new NonRegularException(0.0);
} catch (Throwable t) {
throw new RuntimeException(t);
}
} catch (Throwable t2) {
serializ... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'materializeJob' in class 'net.greghaines.jesque.utils.JesqueUt... | ```java
@Test(expected = ClassCastException.class)
public void testMaterializeJob_NotRunnable() throws Exception {
JesqueUtils.materializeJob(new Job(TestBadJob.class.getName()));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'materializeJob' in class 'net.greghaines.jesque.utils.JesqueUt... | ```java
@Test(expected = UnpermittedJobException.class)
public void testMaterializeJob_Types_NotPermitted() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
JesqueUtils.materializeJob(new Job("TestRunnableJob"), jobTypes);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'materializeJob' in class 'net.greghaines.jesque.utils.JesqueUt... | ```java
@Test(expected = ClassCastException.class)
public void testMaterializeJob_Types_NotRunnable() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put("TestBadJob", TestBadJob.class);
JesqueUtils.materializeJob(new Job("TestBadJob"), jobTypes);
}
```
</... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'recreateStackTrace' in class 'net.greghaines.jesque.utils.Jesq... | ```java
@Test(expected = ParseException.class)
public void testRecreateStackTrace_BadFormat() throws ParseException {
final List<String> bTrace = new ArrayList<String>(Arrays.asList("\tat net.greghaines"));
final StackTraceElement[] stes = JesqueUtils.recreateStackTrace(bTrace);
Assert.assertEquals(0, stes.... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'doWorkInPool' in class 'net.greghaines.jesque.utils.PoolUtils'... | ```java
@Test(expected = IllegalArgumentException.class)
public void testDoWorkInPool_NullPool() throws Exception {
PoolUtils.doWorkInPool(null, this.work);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'doWorkInPool' in class 'net.greghaines.jesque.utils.PoolUtils'... | ```java
@Test(expected = IllegalArgumentException.class)
public void testDoWorkInPool_NullWork() throws Exception {
PoolUtils.doWorkInPool(this.pool, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'doWorkInPoolNicely' in class 'net.greghaines.jesque.utils.Pool... | ```java
@Test(expected = RuntimeException.class)
public void testDoWorkInPoolNicely_ThrowRuntimeEx() throws Exception {
final RuntimeException rte = new RuntimeException("foo");
this.mockCtx.checking(new Expectations() {
{
oneOf(pool).getResource();
will(returnValue(resource));
... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'doWorkInPoolNicely' in class 'net.greghaines.jesque.utils.Pool... | ```java
@Test(expected = RuntimeException.class)
public void testDoWorkInPoolNicely_ThrowEx() throws Exception {
final Exception ex = new Exception("foo");
this.mockCtx.checking(new Expectations() {
{
oneOf(pool).getResource();
will(returnValue(resource));
oneOf(work... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'createJedisPool' in class 'net.greghaines.jesque.utils.PoolUti... | ```java
@Test(expected = IllegalArgumentException.class)
public void testCreateJedisPool_NullConfig() {
PoolUtils.createJedisPool(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'createJedisPool' in class 'net.greghaines.jesque.utils.PoolUti... | ```java
@Test(expected = IllegalArgumentException.class)
public void testCreateJedisPool_NullPoolConfig() {
final Config config = new ConfigBuilder().build();
PoolUtils.createJedisPool(config, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.utils.ConcurrentHashSe... | ```java
@Test(expected = IllegalArgumentException.class)
public void testCollectionConstructor_Null() {
new ConcurrentHashSet<String>(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'materializeJob' in class 'net.greghaines.jesque.utils.JesqueUt... | ```java
@Test(expected = ClassCastException.class)
public void testMaterializeJob_NotRunnable() throws Exception {
JesqueUtils.materializeJob(new Job(TestBadJob.class.getName()));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.MapBasedJobFact... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_Null() {
new MapBasedJobFactory(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.MapBasedJobFact... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullName() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put(null, TestCallableJob.class);
new MapBasedJobFactory(jobTypes);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.MapBasedJobFact... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullType() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put("TestCallableJob", null);
new MapBasedJobFactory(jobTypes);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.MapBasedJobFact... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NotRunnable() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put("TestBadJob", TestBadJob.class);
new MapBasedJobFactory(jobTypes);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'addJobType' in class 'net.greghaines.jesque.worker.MapBasedJob... | ```java
@Test(expected = IllegalArgumentException.class)
public void testAddJobType_NullName() {
final MapBasedJobFactory jobFactory = new MapBasedJobFactory(new HashMap<String, Class<?>>());
jobFactory.addJobType(null, TestCallableJob.class);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'addJobType' in class 'net.greghaines.jesque.worker.MapBasedJob... | ```java
@Test(expected = IllegalArgumentException.class)
public void testAddJobType_NullType() {
final MapBasedJobFactory jobFactory = new MapBasedJobFactory(new HashMap<String, Class<?>>());
jobFactory.addJobType("TestCallableJob", null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'removeJobName' in class 'net.greghaines.jesque.worker.MapBased... | ```java
@Test(expected = IllegalArgumentException.class)
public void testRemoveJobName_Null() {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put("TestRunnableJob", TestRunnableJob.class);
jobTypes.put("TestCallableJob", TestCallableJob.class);
final MapBasedJobFactory... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'removeJobType' in class 'net.greghaines.jesque.worker.MapBased... | ```java
@Test(expected = IllegalArgumentException.class)
public void testRemoveJobType_Null() {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put("TestRunnableJob", TestRunnableJob.class);
jobTypes.put("TestCallableJob", TestCallableJob.class);
final MapBasedJobFactory... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'materializeJob' in class 'net.greghaines.jesque.worker.MapBase... | ```java
@Test(expected = UnpermittedJobException.class)
public void testMaterializeJob_Types_NotPermitted() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
final MapBasedJobFactory jobFactory = new MapBasedJobFactory(jobTypes);
jobFactory.materializeJob(new Job("Te... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.WorkerImpl' for... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullConfig() {
new WorkerImpl(null, null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.WorkerImpl' for... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullQueues() {
new WorkerImpl(CONFIG, null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.WorkerImpl' for... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullJobFactory() {
new WorkerImpl(CONFIG, Collections.<String>emptyList(), null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.WorkerImpl' for... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullJedis() {
new WorkerImpl(CONFIG, Collections.<String>emptyList(), new MapBasedJobFactory(map(entry("Test", TestAction.class))), null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.worker.WorkerImpl' for... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullNextQueueStrategy() {
new WorkerImpl(CONFIG, Collections.<String>emptyList(), new MapBasedJobFactory(map(entry("Test", TestAction.class))), getJedis(), null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'checkQueues' in class 'net.greghaines.jesque.worker.WorkerImpl... | ```java
@Test(expected = IllegalArgumentException.class)
public void testCheckQueues_Null() {
WorkerImpl.checkQueues(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'checkQueues' in class 'net.greghaines.jesque.worker.WorkerImpl... | ```java
@Test(expected = IllegalArgumentException.class)
public void testCheckQueues_NullQueue() {
WorkerImpl.checkQueues(Arrays.asList("foo", null));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'checkQueues' in class 'net.greghaines.jesque.worker.WorkerImpl... | ```java
@Test(expected = IllegalArgumentException.class)
public void testCheckQueues_EmptyQueue() {
WorkerImpl.checkQueues(Arrays.asList("foo", ""));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'run' in class 'net.greghaines.jesque.admin.commands.PauseComma... | ```java
@Test(expected = IllegalStateException.class)
public void testRun_NoWorker() {
final PauseCommand pauseCmd = new PauseCommand(false);
pauseCmd.run();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'run' in class 'net.greghaines.jesque.admin.commands.ShutdownCo... | ```java
@Test(expected = IllegalStateException.class)
public void testRun_NoWorker() {
final ShutdownCommand shutdownCmd = new ShutdownCommand(false);
shutdownCmd.run();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = NullPointerException.class)
public void testConstructor_OneArg_NullConfig() {
new AdminImpl(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = NullPointerException.class)
public void testConstructor_ThreeArg_NullConfig() {
new AdminImpl(null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_ThreeArg_NullChannels() {
new AdminImpl(CONFIG, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_ThreeArg_NullJobFactory() {
new AdminImpl(CONFIG, set(ADMIN_CHANNEL), null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullConfig() {
new AdminImpl(null, null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullChannels() {
new AdminImpl(CONFIG, null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullJobFactory() {
new AdminImpl(CONFIG, set(ADMIN_CHANNEL), null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullJedis() {
new AdminImpl(CONFIG, set(ADMIN_CHANNEL), new MapBasedJobFactory(map(entry("PauseCommand", PauseCommand.class), entry("ShutdownCommand", ShutdownCommand.class))), null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetChannels_Null() {
new AdminImpl(CONFIG).setChannels(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetChannels_NullChannel() {
new AdminImpl(CONFIG).setChannels(set((String) null));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetChannels_EmptyChannel() {
new AdminImpl(CONFIG).setChannels(set(""));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetExceptionHandler_Null() {
new AdminImpl(CONFIG).setExceptionHandler(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminClientPoolI... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullConfig() {
new AdminClientPoolImpl(null, this.jedisPool);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminClientPoolI... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_NullPool() {
new AdminClientPoolImpl(CONFIG, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminPoolImpl' f... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_TwoArg_NullConfig() {
new AdminPoolImpl(null, this.jedisPool);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminPoolImpl' f... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_TwoArg_NullPool() {
new AdminPoolImpl(CONFIG, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminPoolImpl' f... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullConfig() {
new AdminPoolImpl(null, null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminPoolImpl' f... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullChannels() {
new AdminPoolImpl(CONFIG, null, null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminPoolImpl' f... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullJobFactory() {
new AdminPoolImpl(CONFIG, set(ADMIN_CHANNEL), null, null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.admin.AdminImpl' for t... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_FourArg_NullPool() {
new AdminImpl(CONFIG, set(ADMIN_CHANNEL), new MapBasedJobFactory(map(entry("PauseCommand", PauseCommand.class), entry("ShutdownCommand", ShutdownCommand.class))), null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'setChannels' in class 'net.greghaines.jesque.admin.AdminPoolIm... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetChannels_Null() {
new AdminPoolImpl(CONFIG, this.jedisPool).setChannels(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'setChannels' in class 'net.greghaines.jesque.admin.AdminPoolIm... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetChannels_NullChannel() {
new AdminPoolImpl(CONFIG, this.jedisPool).setChannels(set((String) null));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'setChannels' in class 'net.greghaines.jesque.admin.AdminPoolIm... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetChannels_EmptyChannel() {
new AdminPoolImpl(CONFIG, this.jedisPool).setChannels(set(""));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'setExceptionHandler' in class 'net.greghaines.jesque.admin.Adm... | ```java
@Test(expected = IllegalArgumentException.class)
public void testSetExceptionHandler_Null() {
new AdminPoolImpl(CONFIG, this.jedisPool).setExceptionHandler(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'net.greghaines.jesque.WorkerStatus' for the ... | ```java
@Test(expected = IllegalArgumentException.class)
public void testConstructor_Clone_Null() {
new WorkerStatus(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'from' in class 'redis.clients.jedis.HostAndPort' for the excep... | ```java
@Test(expected = IllegalArgumentException.class)
public void checkFromWithoutPort() throws Exception {
String host = "localhost";
HostAndPort.from(host + ":");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getResource' in class 'redis.clients.jedis.JedisPool' for the ... | ```java
@Test(expected = JedisException.class)
public void checkPoolOverflow() {
GenericObjectPoolConfig<Jedis> config = new GenericObjectPoolConfig<>();
config.setMaxTotal(1);
config.setBlockWhenExhausted(false);
try (JedisPool pool = new JedisPool(config, hnp.getHost(), hnp.getPort());
Jedis j... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'redis.clients.jedis.JedisPool' for the excep... | ```java
@Test(expected = InvalidURIException.class)
public void shouldThrowInvalidURIExceptionForInvalidURI() throws URISyntaxException {
new JedisPool(new URI("localhost:6380")).close();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'getResource' in class 'redis.clients.jedis.ConnectionPool' for... | ```java
@Test(expected = JedisException.class)
public void checkPoolOverflow() {
GenericObjectPoolConfig<Connection> config = new GenericObjectPoolConfig<>();
config.setMaxTotal(1);
config.setBlockWhenExhausted(false);
try (JedisPooled pool = new JedisPooled(hnp, config);
Connection jedis = pool... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'redis.clients.jedis.JedisPooled' for the exc... | ```java
@Test(expected = Exception.class)
public void shouldThrowExceptionForInvalidURI() throws URISyntaxException {
new JedisPooled(new URI("localhost:6380")).close();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'write' in class 'redis.clients.jedis.util.RedisOutputStream' f... | ```java
@Test(expected = IOException.class)
public void writeOverflow() throws IOException {
RedisOutputStream ros = new RedisOutputStream(new OutputStream() {
@Override
public void write(int b) throws IOException {
throw new IOException("thrown exception");
}
});
ros.wr... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'connect' in class 'redis.clients.jedis.Connection' for the exc... | ```java
@Test(expected = JedisConnectionException.class)
public void checkUnkownHost() {
client = new Connection("someunknownhost", Protocol.DEFAULT_PORT);
client.connect();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'connect' in class 'redis.clients.jedis.Connection' for the exc... | ```java
@Test(expected = JedisConnectionException.class)
public void checkWrongPort() {
client = new Connection(Protocol.DEFAULT_HOST, 55665);
client.connect();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'redis.clients.jedis.json.Path2' for the exceptio... | ```java
@Test(expected = NullPointerException.class)
public void _null() {
Path2.of(null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'of' in class 'redis.clients.jedis.json.Path2' for the exceptio... | ```java
@Test(expected = IllegalArgumentException.class)
public void empty() {
Path2.of("");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'redis.clients.jedis.JedisSentinelPool' for t... | ```java
@Test(expected = JedisConnectionException.class)
public void initializeWithNotAvailableSentinelsShouldThrowException() {
Set<String> wrongSentinels = new HashSet<String>();
wrongSentinels.add(new HostAndPort("localhost", 65432).toString());
wrongSentinels.add(new HostAndPort("localhost", 65431).toSt... |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'redis.clients.jedis.JedisSentinelPool' for t... | ```java
@Test(expected = JedisException.class)
public void initializeWithNotMonitoredMasterNameShouldThrowException() {
final String wrongMasterName = "wrongMasterName";
JedisSentinelPool pool = new JedisSentinelPool(wrongMasterName, sentinels);
pool.destroy();
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'redis.clients.jedis.JedisCluster' for the ex... | ```java
@Test(expected = JedisClusterOperationException.class)
public void uselessStartNodes() {
new JedisCluster(new HostAndPort("localhost", 7378));
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ensureNotNull' in class 'org.camunda.commons.utils.EnsureUtil'... | ```java
@Test(expected = IllegalArgumentException.class)
public void shouldFailEnsureNotNull() {
String string = null;
EnsureUtil.ensureNotNull("string", string);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'ensureParamInstanceOf' in class 'org.camunda.commons.utils.Ens... | ```java
@Test(expected = IllegalArgumentException.class)
public void shouldFailEnsureParameterInstanceOfClass() {
Object string = "string";
EnsureUtil.ensureParamInstanceOf("string", string, Integer.class);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'put' in class 'org.camunda.commons.utils.cache.ConcurrentLruCa... | ```java
@Test(expected = NullPointerException.class)
public void failToInsertInvalidKey() {
cache.put(null, "1");
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method 'put' in class 'org.camunda.commons.utils.cache.ConcurrentLruCa... | ```java
@Test(expected = NullPointerException.class)
public void failToInsertInvalidValue() {
cache.put("a", null);
}
```
</s> |
<s>[INST] <<SYS>>
You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code.
<</SYS>>
Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'org.camunda.commons.utils.cache.ConcurrentLr... | ```java
@Test(expected = IllegalArgumentException.class)
public void failToCreateCacheWithInvalidCapacity() {
new ConcurrentLruCache<String, String>(-1);
}
```
</s> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.