- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ScheduledThreadPoolExecutor s =
new ScheduledThreadPoolExecutor(corePoolSize)
ThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
String str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
- Smart code suggestions by Codota
}
@Test public void invalidInputData() { TimerData invalidInput = new TimerData(); processor.process(invalidInput, entityManager); verifyNoMoreInteractions(ciService); }
@Test public void matchEmptyApplication() { StringMatchingExpression stringMatchingExpression = new StringMatchingExpression(PatternMatchingType.CONTAINS, "root"); stringMatchingExpression.setStringValueSource(stringValueSource); stringMatchingExpression.setSearchNodeInTrace(false); StringMatchingExpression stringMatchingExpression_2 = new StringMatchingExpression(PatternMatchingType.CONTAINS, "nothing"); stringMatchingExpression_2.setStringValueSource(stringValueSource); stringMatchingExpression_2.setSearchNodeInTrace(false); applicationDefinition.setMatchingRuleExpression(stringMatchingExpression_2); applicationDefinition_empty.setMatchingRuleExpression(stringMatchingExpression); processor.process(root, entityManager); assertThat(root.getApplicationId(), equalTo(application_empty.getId())); assertThat(root.getBusinessTransactionId(), equalTo(businessTx_unknown.getId())); }
@Test public void match() { StringMatchingExpression stringMatchingExpression = new StringMatchingExpression(PatternMatchingType.CONTAINS, "root"); stringMatchingExpression.setStringValueSource(stringValueSource); stringMatchingExpression.setSearchNodeInTrace(false); StringMatchingExpression stringMatchingExpression_2 = new StringMatchingExpression(PatternMatchingType.CONTAINS, "nothing"); stringMatchingExpression_2.setStringValueSource(stringValueSource); stringMatchingExpression_2.setSearchNodeInTrace(false); applicationDefinition.setMatchingRuleExpression(stringMatchingExpression); applicationDefinition_empty.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_1.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_2.setMatchingRuleExpression(stringMatchingExpression); processor.process(root, entityManager); assertThat(root.getApplicationId(), equalTo(application.getId())); assertThat(root.getBusinessTransactionId(), equalTo(businessTx_2.getId())); }
@Test public void matchDefaultBT() { StringMatchingExpression stringMatchingExpression = new StringMatchingExpression(PatternMatchingType.CONTAINS, "root"); stringMatchingExpression.setStringValueSource(stringValueSource); stringMatchingExpression.setSearchNodeInTrace(false); StringMatchingExpression stringMatchingExpression_2 = new StringMatchingExpression(PatternMatchingType.CONTAINS, "nothing"); stringMatchingExpression_2.setStringValueSource(stringValueSource); stringMatchingExpression_2.setSearchNodeInTrace(false); applicationDefinition.setMatchingRuleExpression(stringMatchingExpression); applicationDefinition_empty.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_1.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_2.setMatchingRuleExpression(stringMatchingExpression_2); processor.process(root, entityManager); assertThat(root.getApplicationId(), equalTo(application.getId())); assertThat(root.getBusinessTransactionId(), equalTo(businessTx_unknown.getId())); }
@Test public void matchDefaultAppAndBT() { StringMatchingExpression stringMatchingExpression = new StringMatchingExpression(PatternMatchingType.CONTAINS, "nothing"); stringMatchingExpression.setStringValueSource(stringValueSource); stringMatchingExpression.setSearchNodeInTrace(false); StringMatchingExpression stringMatchingExpression_2 = new StringMatchingExpression(PatternMatchingType.CONTAINS, "nothing"); stringMatchingExpression_2.setStringValueSource(stringValueSource); stringMatchingExpression_2.setSearchNodeInTrace(false); applicationDefinition.setMatchingRuleExpression(stringMatchingExpression); applicationDefinition_empty.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_1.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_2.setMatchingRuleExpression(stringMatchingExpression_2); processor.process(root, entityManager); assertThat(root.getApplicationId(), equalTo(application_unknown.getId())); assertThat(root.getBusinessTransactionId(), equalTo(businessTx_unknown.getId())); }
@Test public void matchWithSearchInTrace() { StringMatchingExpression stringMatchingExpression = new StringMatchingExpression(PatternMatchingType.CONTAINS, "multiple"); stringMatchingExpression.setStringValueSource(stringValueSource); stringMatchingExpression.setSearchNodeInTrace(true); stringMatchingExpression.setMaxSearchDepth(2); StringMatchingExpression stringMatchingExpression_2 = new StringMatchingExpression(PatternMatchingType.CONTAINS, "nothing"); stringMatchingExpression_2.setStringValueSource(stringValueSource); stringMatchingExpression_2.setSearchNodeInTrace(false); applicationDefinition.setMatchingRuleExpression(stringMatchingExpression); applicationDefinition_empty.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_1.setMatchingRuleExpression(stringMatchingExpression_2); businessTxDefinition_2.setMatchingRuleExpression(stringMatchingExpression); processor.process(root, entityManager); assertThat(root.getApplicationId(), equalTo(application.getId())); assertThat(root.getBusinessTransactionId(), equalTo(businessTx_2.getId())); }