input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetBusinessObjectFormatExternalInterfaceDescriptiveInformation ( ) { org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey = new org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey ( NAMESPACE , BDEF_NAME , FORMAT_USA... | org . junit . Assert . assertEquals ( businessObjectFormatExternalInterfaceDescriptiveInformation , result ) |
isNotEqualToNull ( ) { org . junit . runners . model . TestClass testClass = new org . junit . runners . model . TestClass ( org . junit . runners . model . TestClassTest . DummyClass . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( org . junit . runners . model . FrameworkMethod . class... | org . junit . Assert . assertFalse ( testClass . equals ( null ) ) |
testHLLMerge50PercentOverlap ( ) { org . apache . hadoop . hive . common . ndv . hll . HyperLogLog hll1 = org . apache . hadoop . hive . common . ndv . hll . HyperLogLog . builder ( ) . setNumRegisterIndexBits ( 16 ) . build ( ) ; for ( int i = 0 ; i < ( size ) ; i ++ ) { hll1 . addLong ( i ) ; } org . apache . hadoop ... | org . junit . Assert . assertEquals ( expected , actual , delta ) |
testGetCategoryOptionComboName ( ) { categoryOptionComboA = new org . hisp . dhis . category . CategoryOptionCombo ( ) ; java . util . Set < org . hisp . dhis . category . CategoryOption > categoryOptions = com . google . common . collect . Sets . newHashSet ( categoryOptionA , categoryOptionC ) ; categoryOptionComboA ... | org . junit . Assert . assertEquals ( expected , categoryOptionComboA . getName ( ) ) |
listInteratorCantMoveBeyondLowerBound ( ) { java . util . LinkedList < java . lang . String > list = new java . util . LinkedList ( ) ; list . addAll ( java . util . Arrays . asList ( "1" , "2" , "3" , "a" , "b" ) ) ; java . util . ListIterator < java . lang . String > iter = list . listIterator ( 1 ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( "1" , iter . previous ( ) ) |
testFileBatchInputFormatAvro ( ) { java . io . File fileAvro = new java . io . File ( io . cdap . plugin . batch . source . FileBatchSourceTest . temporaryFolder . newFolder ( ) , "test.avro" ) ; java . lang . String outputDatasetName = "test-filesource-avro" ; java . lang . String appName = "FileSourceAvro" ; io . cda... | org . junit . Assert . assertEquals ( expected , output ) |
shouldDoGetMaxIndexWithWindowSize ( ) { int addedElementsNumber = 10 ; int windowSize = 3 ; com . orange . dgil . trail . core . common . TrailPoint [ ] points = new com . orange . dgil . trail . core . common . TrailPoint [ windowSize ] ; com . orange . dgil . trail . TestTools . setObj ( "addedElementsNumber" , com .... | org . junit . Assert . assertEquals ( 2 , ret ) |
httpJAXBCamelEndpoint ( ) { org . switchyard . quickstarts . camel . jaxb . GreetingRequest request = new org . switchyard . quickstarts . camel . jaxb . GreetingRequest ( "Magesh" ) ; java . lang . String response = http . sendString ( org . switchyard . quickstarts . camel . jaxb . JAXBCamelTest . BASE_URL , org . sw... | org . junit . Assert . assertEquals ( rsp , org . switchyard . quickstarts . camel . jaxb . JAXBUtil . unmarshal ( response ) ) |
illFormed ( ) { java . lang . String input = "<root><sp><a<sp>some='foo<sp>'/>" ; "<AssertPlaceHolder>" ; } prettifyXml ( java . lang . CharSequence ) { return new org . onlab . util . XmlString ( com . google . common . io . CharSource . wrap ( xml ) ) ; } | org . junit . Assert . assertEquals ( input , org . onlab . util . XmlString . prettifyXml ( input ) . toString ( ) ) |
testJITInLookup ( ) { org . glassfish . hk2 . utilities . InjecteeImpl injectee = new org . glassfish . hk2 . utilities . InjecteeImpl ( org . glassfish . hk2 . tests . locator . justintime . SimpleService . class ) ; org . glassfish . hk2 . api . ActiveDescriptor < ? > ad = org . glassfish . hk2 . tests . locator . ju... | org . junit . Assert . assertNotNull ( ad ) |
testComputeIndexSplitKeys ( ) { if ( com . splicemachine . derby . impl . load . HBaseBulkLoadIT . notSupported ) return ; java . lang . String sql = "<sp>select<sp>conglomeratenumber<sp>from<sp>sys.systables<sp>t,<sp>sys.sysconglomerates<sp>c,<sp>sys.sysschemas<sp>s<sp>" + ( "-------------------------\n" 4 + "s.schema... | org . junit . Assert . assertEquals ( expected , s ) |
createTortureTest ( ) { java . util . Random rnd = new java . util . Random ( ) ; java . util . List < org . eclipse . tracecompass . segmentstore . core . SegmentStoreFactory . @ org . eclipse . jdt . annotation . NonNull SegmentStoreType > args = new java . util . ArrayList ( ) ; rnd . setSeed ( 1234 ) ; int nbValues... | org . junit . Assert . assertNotNull ( array ) |
testReadsBootstrapServersFromNamedCluster ( ) { org . pentaho . big . data . api . cluster . NamedCluster namedCluster = mock ( org . pentaho . big . data . api . cluster . NamedCluster . class ) ; when ( namedCluster . getKafkaBootstrapServers ( ) ) . thenReturn ( "server:11111" ) ; org . pentaho . big . data . api . ... | org . junit . Assert . assertThat ( meta . getBootstrapServers ( ) , org . hamcrest . CoreMatchers . is ( "server:11111" ) ) |
testMethodWithHandlerBasicTypes ( ) { io . vertx . rx . java . test . gen . AsyncResultChecker checker = new io . vertx . rx . java . test . gen . AsyncResultChecker ( ) ; obj . methodWithHandlerBasicTypes ( checker . expectedResult ( ( ( byte ) ( 123 ) ) ) , checker . expectedResult ( ( ( short ) ( 12345 ) ) ) , check... | org . junit . Assert . assertEquals ( 9 , checker . count ) |
test2 ( ) { introclassJava . median_68eb0bb0_000 mainClass = new introclassJava . median_68eb0bb0_000 ( ) ; java . lang . String expected = "Please<sp>enter<sp>3<sp>numbers<sp>separated<sp>by<sp>spaces<sp>><sp>1<sp>is<sp>the<sp>median" ; mainClass . scanner = new java . util . Scanner ( "2<sp>0<sp>1" ) ; mainClass . ex... | org . junit . Assert . assertEquals ( expected . replace ( "<sp>" , "" ) , out . replace ( "<sp>" , "" ) ) |
testUTF8 ( ) { java . lang . String testString = "Cng<sp>ha<sp>x<sp>hi" ; com . linuxense . javadbf . DBFField [ ] fields = new com . linuxense . javadbf . DBFField [ 1 ] ; fields [ 0 ] = new com . linuxense . javadbf . DBFField ( ) ; fields [ 0 ] . setName ( "abc" ) ; fields [ 0 ] . setType ( DBFDataType . CHARACTER )... | org . junit . Assert . assertEquals ( testString , rowObjects [ 0 ] ) |
dontCombineTest ( ) { org . alfresco . repo . content . transform . TransformerPropertyNameExtractorTest . mockProperties ( transformerProperties , "content.transformer.transformer1.extensions.pdf.png.maxSourceSizeKBytes" , "-1" , "content.transformer.transformer1.maxSourceSizeKBytes" , "20" ) ; extractor = new org . a... | org . junit . Assert . assertEquals ( ( - 1 ) , limits . getMaxSourceSizeKBytes ( ) ) |
shouldNotObtainLockWhenStoreDirCannotBeCreated ( ) { org . neo4j . io . fs . FileSystemAbstraction fileSystemAbstraction = new org . neo4j . graphdb . mockfs . DelegatingFileSystemAbstraction ( fileSystemRule . get ( ) ) { @ org . neo4j . kernel . internal . Override public void mkdirs ( java . io . File fileName ) thr... | org . junit . Assert . assertThat ( e . getMessage ( ) , org . hamcrest . core . Is . is ( msg ) ) |
testPublicConfigConstructor ( ) { com . google . caliper . api . ResultProcessor processor = com . google . caliper . runner . resultprocessor . ResultProcessorCreatorTest . createProcessor ( com . google . caliper . runner . resultprocessor . ResultProcessorCreatorTest . PublicConfigConstructorResultProcessor . class ... | org . junit . Assert . assertTrue ( ( processor instanceof com . google . caliper . runner . resultprocessor . ResultProcessorCreatorTest . PublicConfigConstructorResultProcessor ) ) |
testShouldBeAbleToClickElementThatIsOutOfViewInAFrameThatIsOutOfView ( ) { try { driver . get ( appServer . whereIs ( "scrolling_tests/page_with_scrolling_frame_out_of_view.html" ) ) ; driver . switchTo ( ) . frame ( "scrolling_frame" ) ; org . openqa . selenium . WebElement element = driver . findElement ( org . openq... | org . junit . Assert . assertTrue ( element . isSelected ( ) ) |
testGetClause ( ) { final org . prop4j . explain . solvers . SatProblem instance = getInstance ( ) ; instance . addFormula ( new org . prop4j . And ( "A" , new org . prop4j . Equals ( "A" , "B" ) , "C" ) ) ; final org . prop4j . Node expected = new org . prop4j . Or ( new org . prop4j . Literal ( "B" , false ) , "A" ) ... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldDelegateGetAsString ( ) { java . lang . String value = "value" ; java . lang . Object object = new java . lang . Object ( ) ; given ( this . bean . getAsObject ( this . context , this . component , value ) ) . willReturn ( object ) ; java . lang . Object actual = this . converter . getAsObject ( this . context , ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( object ) ) |
testGetCredentials ( ) { javax . jcr . Credentials creds = systemUser . getCredentials ( ) ; javax . jcr . Credentials expected = null ; "<AssertPlaceHolder>" ; } getCredentials ( ) { return credentials ; } | org . junit . Assert . assertEquals ( expected , creds ) |
testIsCachedOrg ( ) { System . out . println ( "Testing<sp>CKANCache.isCachedOrg" ) ; cache . setTree ( tree ) ; try { "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } isCachedOrg ( java . lang . String ) { if ( tree . containsKey ( orgName ) ) { com... | org . junit . Assert . assertTrue ( cache . isCachedOrg ( orgName ) ) |
testCloneIntoComposite ( ) { ca . uhn . fhir . model . dstu2 . composite . QuantityDt source = new ca . uhn . fhir . model . dstu2 . composite . QuantityDt ( ) ; source . setCode ( "CODE" ) ; ca . uhn . fhir . model . dstu2 . composite . MoneyDt target = new ca . uhn . fhir . model . dstu2 . composite . MoneyDt ( ) ; c... | org . junit . Assert . assertEquals ( "CODE" , target . getCode ( ) ) |
whenFilterListByAge_thenSizeShouldBe2 ( ) { java . util . List < com . baeldung . distinct . Person > personListFiltered = io . vavr . collection . List . ofAll ( personList ) . distinctBy ( Person :: getAge ) . toJavaList ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertTrue ( ( ( personListFiltered . size ( ) ) == 2 ) ) |
two_$parent_value_comparison_returns_true_when_field_value_matches_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field6.nf7.$parent.$parent.field4','op':'>','rvalue':3.5}" ) ; com . redhat . lightblue . ev... | org . junit . Assert . assertTrue ( ctx . getResult ( ) ) |
should_remove_all_data ( ) { try ( org . neo4j . graphdb . Transaction tx = db . beginTx ( ) ) { org . neo4j . graphdb . RelationshipType relationshipType = org . neo4j . graphdb . RelationshipType . withName ( "R" ) ; org . neo4j . graphdb . Node n1 = db . createNode ( ) ; org . neo4j . graphdb . Node n2 = db . create... | org . junit . Assert . assertThat ( nodeCount ( ) , org . hamcrest . Matchers . is ( 0L ) ) |
testGetIconFileNameSaveMavenModules ( ) { when ( mockedMavenModule . hasPermission ( AbstractProject . CONFIGURE ) ) . thenReturn ( true ) ; when ( mockedPlugin . getSaveModuleConfiguration ( ) ) . thenReturn ( true ) ; hudson . plugins . jobConfigHistory . JobConfigHistoryProjectAction sut = createActionForMavenModule... | org . junit . Assert . assertEquals ( JobConfigHistoryConsts . ICONFILENAME , sut . getIconFileName ( ) ) |
testVarAndArgs_OK1 ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( "<cffunction<sp>name=\"test\">\r\n" + "\t<cfargument<sp>name=\"xyz\"<sp>default=\"123\">\r\n" ) + "</cffunction>\r\n" ) + "</cfcomponent>" ) ; com . cflint . api . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; final... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testOneClassNoExclude ( ) { japicmp . cmp . JarArchiveComparatorOptions options = new japicmp . cmp . JarArchiveComparatorOptions ( ) ; java . util . List < japicmp . model . JApiClass > jApiClasses = japicmp . cmp . ClassesHelper . compareClasses ( options , new japicmp . cmp . ClassesHelper . ClassesGenerator ( ) { @... | org . junit . Assert . assertThat ( jApiClasses . size ( ) , org . hamcrest . core . Is . is ( 1 ) ) |
testGetDatastoreProperties ( ) { "<AssertPlaceHolder>" ; } getDatastoreProperties ( ) { return datastore . getReference ( ) ; } | org . junit . Assert . assertNotNull ( dataset . getDatastoreProperties ( ) ) |
testAssociativityConstraint ( ) { com . insightfullogic . java8 . examples . chapter5 . StringCollector collector = new com . insightfullogic . java8 . examples . chapter5 . StringCollector ( ",<sp>" , "<!--" , "-->" ) ; java . util . function . Supplier < com . insightfullogic . java8 . examples . chapter5 . StringCom... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testValidateStructureDefinition ( ) { java . lang . String input = org . apache . commons . io . IOUtils . toString ( org . hl7 . fhir . r4 . validation . FhirInstanceValidatorR4Test . class . getResourceAsStream ( "/sdc-questionnaire.profile.xml" ) ) ; ca . uhn . fhir . validation . ValidationResult output = myVal . v... | org . junit . Assert . assertEquals ( output . toString ( ) , 3 , output . getMessages ( ) . size ( ) ) |
testTimeStamp ( ) { java . lang . Class < com . j256 . ormlite . field . types . TimeStampTypeTest . LocalTimeStamp > clazz = com . j256 . ormlite . field . types . TimeStampTypeTest . LocalTimeStamp . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . TimeStampTypeTest . LocalTimeStamp ,... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testIsOpenOnError ( ) { final com . allanbank . mongodb . MongoDbException thrown = new com . allanbank . mongodb . MongoDbException ( ) ; final com . allanbank . mongodb . client . connection . Connection mockConnetion = createMock ( com . allanbank . mongodb . client . connection . Connection . class ) ; expect ( moc... | org . junit . Assert . assertSame ( thrown , good ) |
testAssociationIndicationStatusStaticAccess ( ) { for ( com . digi . xbee . api . models . WiFiAssociationIndicationStatus associationIndicationStatus : associationIndicationStatusValues ) "<AssertPlaceHolder>" ; } get ( int ) { return com . digi . xbee . api . models . WiFiAssociationIndicationStatus . lookupTable . g... | org . junit . Assert . assertEquals ( associationIndicationStatus , com . digi . xbee . api . models . WiFiAssociationIndicationStatus . get ( associationIndicationStatus . getValue ( ) ) ) |
test_sequencer_counter_value ( ) { com . hazelcast . core . Hazelcast . newHazelcastInstance ( config ) ; com . hazelcast . core . HazelcastInstance client = com . hazelcast . client . HazelcastClient . newHazelcastClient ( clientConfig ) ; try { com . noctarius . snowcast . Snowcast snowcast = com . noctarius . snowca... | org . junit . Assert . assertEquals ( 100 , sequencer . counterValue ( sequence ) ) |
testCreateSparseVolume ( ) { java . lang . String filename = ( "/tmp/" + ( java . util . UUID . randomUUID ( ) ) ) + ".qcow2" ; long size = 10995116277760L ; org . apache . cloudstack . utils . qemu . QemuImgFile file = new org . apache . cloudstack . utils . qemu . QemuImgFile ( filename , size , org . apache . clouds... | org . junit . Assert . assertFalse ( allocatedSize . equals ( declaredSize ) ) |
copyCopiesNewFile ( ) { state . generate ( environment , player , org . communitybridge . synchronization . PlayerStateTest . USER_ID ) ; org . communitybridge . synchronization . PlayerState copy = state . copy ( ) ; "<AssertPlaceHolder>" ; } isIsNewFile ( ) { return isNewFile ; } | org . junit . Assert . assertEquals ( state . isIsNewFile ( ) , copy . isIsNewFile ( ) ) |
removeStaleComponentsShouldNotBomb ( ) { appenderTracker . removeStaleComponents ( now ) ; "<AssertPlaceHolder>" ; } getComponentCount ( ) { return ( liveList . size ( ) ) + ( lingererList . size ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , appenderTracker . getComponentCount ( ) ) |
testPrependIntoEmptyList ( ) { com . sun . sgs . test . app . util . TestScalableList . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { com . sun . sgs . app . util . ScalableList < java . lang . S... | org . junit . Assert . assertEquals ( 1 , list . size ( ) ) |
testEqualsWhenEquals ( ) { final org . codice . ddf . configuration . migration . ExportMigrationJavaPropertyReferencedEntryImpl entry2 = new org . codice . ddf . configuration . migration . ExportMigrationJavaPropertyReferencedEntryImpl ( context , propertiesPath , org . codice . ddf . configuration . migration . Expo... | org . junit . Assert . assertThat ( entry . equals ( entry2 ) , org . hamcrest . Matchers . equalTo ( true ) ) |
testCreateDummy ( ) { final org . dummycreator . dummyfactories . RandomStringFactory factory = new org . dummycreator . dummyfactories . RandomStringFactory ( ) ; final org . dummycreator . RandomCreator mock = org . easymock . EasyMock . createMock ( org . dummycreator . RandomCreator . class ) ; org . dummycreator .... | org . junit . Assert . assertEquals ( "1234" , factory . createDummy ( null , null , null , null ) ) |
testLargeLoad ( ) { diskCacheV111 . pools . PoolCostInfo info = new diskCacheV111 . pools . PoolCostInfo ( "pool" , org . dcache . pool . classic . IoQueueManager . DEFAULT_QUEUE ) ; info . setSpaceUsage ( 100000000 , 100000000 , 0 , 0 ) ; info . getSpaceInfo ( ) . setParameter ( 0 , 1000 ) ; info . setMoverCostFactor ... | org . junit . Assert . assertThat ( selected , org . hamcrest . Matchers . is ( info ) ) |
testSetNoConfusionMatrixFalse ( ) { java . util . HashMap < java . lang . String , java . lang . String > args = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; args . put ( "data_key" , "a" ) ; args . put ( "model_key" , "b" ) ; args . put ( "no_confusion_matrix" , "0" ) ; edu . oswego ... | org . junit . Assert . assertEquals ( expResult . build ( encoder ) , result . build ( encoder ) ) |
testLengthLongForm ( ) { int len = org . kaazing . gateway . util . der . DerUtils . decodeLength ( java . nio . ByteBuffer . wrap ( new byte [ ] { ( ( byte ) ( 129 ) ) , ( ( byte ) ( 201 ) ) } ) ) ; "<AssertPlaceHolder>" ; } wrap ( java . nio . ByteBuffer , int ) { boolean shared = ( flags & ( org . kaazing . mina . c... | org . junit . Assert . assertEquals ( 201 , len ) |
testDeleteTableSnapshotsWithRegex ( ) { org . apache . hadoop . hbase . client . Admin admin = null ; java . util . regex . Pattern tableNamePattern = java . util . regex . Pattern . compile ( "test.*" ) ; try { admin = org . apache . hadoop . hbase . client . TestSnapshotFromClient . UTIL . getAdmin ( ) ; java . lang ... | org . junit . Assert . assertEquals ( 1 , admin . listTableSnapshots ( tableNamePattern , org . apache . hadoop . hbase . client . TestSnapshotFromClient . MATCH_ALL ) . size ( ) ) |
showWithPermissionTest ( ) { final org . guvnor . structure . organizationalunit . OrganizationalUnit organizationalUnit = mock ( org . guvnor . structure . organizationalunit . OrganizationalUnit . class ) ; doReturn ( "ou-name" ) . when ( organizationalUnit ) . getName ( ) ; presenter . show ( organizationalUnit ) ; ... | org . junit . Assert . assertEquals ( organizationalUnit , presenter . organizationalUnit ) |
testLaneCanContain ( ) { final java . lang . Class < org . kie . workbench . common . stunner . bpmn . definition . Lane > laneClass = org . kie . workbench . common . stunner . bpmn . definition . Lane . class ; final org . kie . workbench . common . stunner . core . rule . annotation . CanContain canContain = laneCla... | org . junit . Assert . assertEquals ( expectedRoles , actualRoles ) |
is_it_when_package_contains_it ( ) { fr . norad . visuwall . providers . hudson . domain . HudsonTest hudsonTest = new fr . norad . visuwall . providers . hudson . domain . HudsonTest ( "net.awired.it.MyTest" , "SUCCESS" ) ; "<AssertPlaceHolder>" ; } isIntegrationTest ( ) { if ( className . contains ( ".it." ) ) return... | org . junit . Assert . assertTrue ( hudsonTest . isIntegrationTest ( ) ) |
getToOutputBodyWithCharset ( ) { just . niubi . httprequest . HttpRequestTest . handler = new just . niubi . httprequest . RequestHandler ( ) { @ just . niubi . httprequest . Override public void handle ( org . eclipse . jetty . server . Request request , javax . servlet . http . HttpServletResponse response ) { respon... | org . junit . Assert . assertEquals ( "hello<sp>world" , body . get ( ) ) |
testForumReplySerialization ( ) { com . ibm . sbt . services . client . connections . forums . ForumReply reply = forumService . getForumReply ( createForumReply ( ) . getReplyUuid ( ) ) ; final java . lang . String replyUuid = reply . getReplyUuid ( ) ; new com . ibm . sbt . services . client . SerializationUtil ( ) {... | org . junit . Assert . assertEquals ( replyObject . getReplyUuid ( ) , replyUuid ) |
testGetLocations ( ) { org . apache . ambari . server . controller . ivory . Cluster . Location location = new org . apache . ambari . server . controller . ivory . Cluster . Location ( "name" , "path" ) ; org . apache . ambari . server . controller . ivory . Cluster cluster = new org . apache . ambari . server . contr... | org . junit . Assert . assertEquals ( java . util . Collections . singleton ( location ) , cluster . getLocations ( ) ) |
testSkipListenerInvocationForNewlyCreatedScope ( ) { org . camunda . bpm . engine . test . bpmn . multiinstance . DelegateEvent . clearEvents ( ) ; org . camunda . bpm . engine . repository . ProcessDefinition sourceProcessDefinition = migrationRule . deployAndGetDefinition ( ProcessModels . ONE_TASK_PROCESS ) ; org . ... | org . junit . Assert . assertEquals ( 0 , org . camunda . bpm . engine . test . bpmn . multiinstance . DelegateEvent . getEvents ( ) . size ( ) ) |
testNormalCase ( ) { org . apache . zeppelin . interpreter . InterpreterResult successInterpreterResult = new org . apache . zeppelin . interpreter . InterpreterResult ( org . apache . zeppelin . interpreter . InterpreterResult . Code . SUCCESS , "success<sp>result" ) ; doReturn ( successInterpreterResult ) . when ( sp... | org . junit . Assert . assertEquals ( successInterpreterResult , spyInterpretJob . getReturn ( ) ) |
testTake ( ) { final int cap = 10 ; final java . util . concurrent . BlockingQueue < java . lang . Integer > dbq = new com . conversantmedia . util . concurrent . MPMCBlockingQueue ( cap ) ; executor . execute ( ( ) -> { try { java . lang . Thread . sleep ( 1000 ) ; dbq . offer ( java . lang . Integer . valueOf ( cap )... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( cap ) , dbq . take ( ) ) |
hasPath_hostOnly ( ) { final java . net . URI input = java . net . URI . create ( "https://fabrikam-fiber-inc.visualstudio.com" ) ; final boolean actual = hudson . plugins . tfs . util . UriHelper . hasPath ( input ) ; "<AssertPlaceHolder>" ; } hasPath ( java . net . URI ) { final java . lang . String path = uri . getP... | org . junit . Assert . assertEquals ( false , actual ) |
testToJsonFromAclStatus ( ) { java . lang . String jsonString = "{\"AclStatus\":{\"entries\":[\"user:user1:rwx\",\"group::rw-\"],\"group\":\"supergroup\",\"owner\":\"testuser\",\"stickyBit\":false}}" ; org . apache . hadoop . fs . permission . AclStatus . Builder aclStatusBuilder = new org . apache . hadoop . fs . perm... | org . junit . Assert . assertEquals ( jsonString , org . apache . hadoop . hdfs . web . JsonUtil . toJsonString ( aclStatusBuilder . build ( ) ) ) |
testVoegVerwerkingssoortenToeOpGroepen ( ) { persoonHisVolledig = persoonHisVolledigRepository . leesGenormalizeerdModel ( nl . bzk . brp . levering . business . bepalers . BerichtVerwerkingssoortToevoegerIntegratieTest . PERSOON_ID_VEEL_WIJZIGINGEN ) ; persoonHisVolledigView = new nl . bzk . brp . model . hisvolledig ... | org . junit . Assert . assertTrue ( alleVerwerkingssoortenZijnGevuld ( persoonHisVolledigView , false ) ) |
editPaymentType_NoneAction_SamePaymentTypes ( ) { org . oscm . domobjects . Subscription sub = givenSubscriptionWithPaymentInfo1 ( ) ; org . oscm . domobjects . PaymentInfo piNew = givenPaymentInfo1 ( ) ; editPaymentType ( sub , piNew ) ; java . util . List < org . oscm . auditlog . model . AuditLogEntry > logEntries =... | org . junit . Assert . assertNull ( logEntries ) |
basicReturnTransactional ( ) { channel . txSelect ( ) ; channel . addReturnListener ( makeReturnListener ( ) ) ; returnCell = new com . rabbitmq . utility . BlockingCell < java . lang . Integer > ( ) ; channel . basicPublish ( "" , "unknown" , true , false , null , "mandatory1" . getBytes ( ) ) ; try { returnCell . uni... | org . junit . Assert . assertNotNull ( channel . basicGet ( Q1 , true ) ) |
testDeleteLink ( ) { org . apache . olingo . odata2 . jpa . processor . core . access . data . JPALinkTest . testCase = 1 ; try { org . apache . olingo . odata2 . jpa . processor . api . ODataJPAContext context = mockODataJPAContext ( false ) ; org . apache . olingo . odata2 . jpa . processor . core . access . data . J... | org . junit . Assert . assertNull ( org . apache . olingo . odata2 . jpa . processor . core . access . data . JPALinkTest . header . getNotesDetails ( ) ) |
testGetWithoutValue ( ) { java . lang . String key = "key" ; java . lang . String subkey = "subkey" ; com . github . pmerienne . trident . state . testing . TestValue acualValue = this . state . get ( key , subkey ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , T ) { return containsKey ( key ) ? ( ( T ) ( ge... | org . junit . Assert . assertEquals ( null , acualValue ) |
multipleMachineIps ( ) { org . togglz . core . user . FeatureUser user = new org . togglz . core . user . SimpleFeatureUser ( "ea" , false ) ; org . togglz . core . repository . FeatureState state = new org . togglz . core . repository . FeatureState ( org . togglz . core . activation . IPActivationStrategyTest . MyFea... | org . junit . Assert . assertEquals ( true , active ) |
getPersonAttributeTypes_shouldReturnEmptyListWhenViewTypeListingAndPerson ( ) { java . util . List < org . openmrs . PersonAttributeType > result = personService . getPersonAttributeTypes ( OpenmrsConstants . PERSON_TYPE . PERSON , PersonService . ATTR_VIEW_TYPE . LISTING ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { ret... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testMultipleReadsEventuallyEmpty ( ) { java . nio . channels . SeekableByteChannel channel = fixture . newChannel ( true , true , false , false , false , false , resolvedPath , fs ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 1000 ) ; random . nextBytes ( buffer . array ( ) ) ; channel . wri... | org . junit . Assert . assertEquals ( ( - 1 ) , channel . read ( buffer ) ) |
setContextNull ( ) { new mockit . Expectations ( ) { { requestEx . getHeader ( Const . CSE_CONTEXT ) ; result = null ; } } ; java . util . Map < java . lang . String , java . lang . String > context = invocation . getContext ( ) ; restInvocation . setContext ( ) ; "<AssertPlaceHolder>" ; } getContext ( ) { return conte... | org . junit . Assert . assertSame ( context , invocation . getContext ( ) ) |
invokeCronDaemon_A$DIContainerAdaptor$ScheduledExecutorService ( ) { com . github . seratch . taskun . scheduler . impl . TaskunImpl target = new com . github . seratch . taskun . scheduler . impl . TaskunImpl ( ) ; com . github . seratch . taskun . inject . TaskunInjector containerAdaptor = mock ( com . github . serat... | org . junit . Assert . assertTrue ( target . isRunning ( ) ) |
testLookupUser ( ) { com . flickr4java . flickr . urls . UrlsInterface iface = flickr . getUrlsInterface ( ) ; java . lang . String username = testProperties . getUsername ( ) ; java . lang . String usernameOnFlickr = iface . lookupUser ( java . lang . String . format ( "https://www.flickr.com/people/%s/" , username ) ... | org . junit . Assert . assertEquals ( username , usernameOnFlickr ) |
testFieldDouble ( ) { @ org . simpleflatmapper . reflect . test . asm . SuppressWarnings ( "unchecked" ) org . simpleflatmapper . reflect . primitive . DoubleGetter < org . simpleflatmapper . test . beans . DbPrimitiveObjectFields > getter = ( ( org . simpleflatmapper . reflect . primitive . DoubleGetter < org . simple... | org . junit . Assert . assertEquals ( 3.144 , getter . getDouble ( objectField ) , 0 ) |
testEmptyLinesInLabel ( ) { org . geotools . renderer . label . LabelPainter painter = new org . geotools . renderer . label . LabelPainter ( graphics , org . geotools . renderer . label . LabelCacheImpl . LabelRenderingMode . STRING ) ; org . geotools . renderer . label . LabelCacheItem labelItem = new org . geotools ... | org . junit . Assert . assertEquals ( 3 , painter . getLineCount ( ) ) |
randomNumberGenerator ( ) { final org . basex . query . func . Function . Function func = RANDOM_NUMBER_GENERATOR ; final java . lang . String query = ( func . args ( 123 ) ) + "for<sp>$i<sp>in<sp>1<sp>to<sp>100<sp>" 3 ; "<AssertPlaceHolder>" ; query ( ( ( ( ( ( ( ( ( ( ( ( "let<sp>$seq<sp>:=<sp>1<sp>to<sp>10<sp>" + "f... | org . junit . Assert . assertEquals ( query ( query ) , query ( query ) ) |
g_VX1X_repeatXoutX_untilXoutE_count_isX0XX_name ( ) { loadModern ( ) ; org . apache . tinkerpop . gremlin . process . traversal . dsl . graph . DefaultGraphTraversal < org . apache . tinkerpop . gremlin . structure . Vertex , java . lang . String > traversal = ( ( org . apache . tinkerpop . gremlin . process . traversa... | org . junit . Assert . assertEquals ( 1 , steps . size ( ) ) |
testNoTrailingHeaders ( ) { org . apache . catalina . startup . Tomcat tomcat = getTomcatInstance ( ) ; org . apache . catalina . Context ctx = tomcat . addContext ( "" , java . lang . System . getProperty ( "java.io.tmpdir" ) ) ; org . apache . catalina . startup . Tomcat . addServlet ( ctx , "servlet" , new org . apa... | org . junit . Assert . assertEquals ( "0" 3 , client . getResponseBody ( ) ) |
testFutureError ( ) { com . maigo . rpc . future . RpcFuture rpcFuture = com . maigo . rpc . test . JUnitFunctionTest . rpcClientAsyncProxy . call ( "methodThrowException" ) ; "<AssertPlaceHolder>" ; try { rpcFuture . get ( ) ; } catch ( java . lang . Throwable e ) { if ( e instanceof com . maigo . rpc . test . JUnitTe... | org . junit . Assert . assertNotNull ( rpcFuture ) |
test_Aa_Aa ( ) { org . antlr . v4 . runtime . atn . PredictionContext a1 = a ( false ) ; org . antlr . v4 . runtime . atn . PredictionContext a2 = a ( false ) ; org . antlr . v4 . runtime . atn . PredictionContext A1 = array ( a1 ) ; org . antlr . v4 . runtime . atn . PredictionContext A2 = array ( a2 ) ; org . antlr .... | org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) |
testNegativeAgeHeaderValueReturnsMaxAge ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Age" , "-100" ) } ; final org . apache . hc . client5 . http . cache . HttpCacheEntry entry = or... | org . junit . Assert . assertEquals ( CacheValidityPolicy . MAX_AGE , impl . getAgeValue ( entry ) ) |
lsar_SingleLsarEnumerateAccountsWithUserRightResponseErrorCase ( ) { com . rapid7 . client . dcerpc . mslsad . messages . LsarEnumerateAccountsWithUserRightResponse response = new com . rapid7 . client . dcerpc . mslsad . messages . LsarEnumerateAccountsWithUserRightResponse ( ) ; java . lang . String hexString = "0000... | org . junit . Assert . assertNull ( response . getSids ( ) ) |
testStringACharacterMatchesReservedString ( ) { java . lang . String reserved = "for" ; org . dataconservancy . packaging . tool . impl . support . validation . GenericCharacterMatcher underTest = new org . dataconservancy . packaging . tool . impl . support . validation . GenericCharacterMatcher ( reserved ) ; java . ... | org . junit . Assert . assertTrue ( underTest . matches ( toTest ) ) |
convertsSmallOrdinalValues ( ) { com . sjl . dsl4xml . support . convert . IntegerStringConverter _c = new com . sjl . dsl4xml . support . convert . IntegerStringConverter ( ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { return ( aValue == null ) || ( "" . equals ( aValue ) ) ? 0 : new java . lang . L... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , _c . convert ( "1" ) ) |
shouldInvalidateTrackingRecordIfOrderIsAcceptedAndHasUnchangablePlanAfterAccept ( ) { given ( order . getStringField ( "trackingRecordTreatment" ) ) . willReturn ( "02unchangablePlanAfterOrderAccept" ) ; given ( order . getStringField ( "state" ) ) . willReturn ( "02accepted" ) ; boolean isTrackingRecordValid = trackin... | org . junit . Assert . assertFalse ( isTrackingRecordValid ) |
testSimpleContents ( ) { final com . laytonsmith . PureUtilities . Common . MutableObject m = new com . laytonsmith . PureUtilities . Common . MutableObject ( ) ; doc . addListener ( "/root/nodes/inode[1]" , new com . laytonsmith . PureUtilities . SAXDocument . ElementCallback ( ) { @ com . laytonsmith . PureUtilities ... | org . junit . Assert . assertEquals ( "value" , m . getObject ( ) ) |
testPropagateWhenAssigningUserToRequiredGroups ( ) { long [ ] userIds = addUsers ( ) ; com . liferay . portal . kernel . model . User user = com . liferay . portal . kernel . service . UserLocalServiceUtil . getUser ( userIds [ 0 ] ) ; com . liferay . portal . security . membership . policy . test . util . MembershipPo... | org . junit . Assert . assertTrue ( isPropagateMembership ( ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( socialActivitySets . isEmpty ( ) ) |
testIfNoneMatchStar ( ) { org . codehaus . httpcache4j . Conditionals conditionals = new org . codehaus . httpcache4j . Conditionals ( ) ; conditionals = conditionals . addIfNoneMatch ( org . codehaus . httpcache4j . Tag . parse ( "*" ) . get ( ) ) ; "<AssertPlaceHolder>" ; try { conditionals . addIfNoneMatch ( org . c... | org . junit . Assert . assertEquals ( 1 , conditionals . getNoneMatch ( ) . size ( ) ) |
testLoadingToDefaultGraph ( ) { java . lang . String queryStr = "LOAD<sp>SILENT<sp><http://example.org/mydata>" ; org . apache . clerezza . rdf . core . sparql . SparqlPreParser parser ; parser = new org . apache . clerezza . rdf . core . sparql . SparqlPreParser ( org . apache . clerezza . rdf . core . access . TcMana... | org . junit . Assert . assertTrue ( referredGraphs . containsAll ( expected ) ) |
shouldValidateFunctionSelectionsAndReturnTrueWhenElementFilterIsNull ( ) { final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition elementDef = mock ( uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition . class ) ; final uk . gov . gchq . gaffer . data . element . function . ElementFil... | org . junit . Assert . assertTrue ( result . isValid ( ) ) |
testSerialization1 ( ) { org . jfree . data . xy . XYDataset data = new org . jfree . data . xy . XYSeriesCollection ( ) ; org . jfree . chart . axis . NumberAxis domainAxis = new org . jfree . chart . axis . NumberAxis ( "Domain" ) ; org . jfree . chart . axis . NumberAxis rangeAxis = new org . jfree . chart . axis . ... | org . junit . Assert . assertEquals ( p1 , p2 ) |
sortTest ( ) { int [ ] input = new int [ ] { 8 , 31 , 48 , 73 , 3 , 65 , 20 , 29 , 11 , 15 } ; int [ ] output = new int [ ] { 3 , 8 , 11 , 15 , 20 , 29 , 31 , 48 , 65 , 73 } ; chapter3 . selectionsort . SelectionSort selection = new chapter3 . selectionsort . ChihoonSelectionSort ( ) ; int [ ] result = selection . sort... | org . junit . Assert . assertThat ( output [ i ] , org . hamcrest . CoreMatchers . is ( result [ i ] ) ) |
testSingleMode ( ) { int [ ] scores = new int [ ] { 1 , 2 , 3 , 3 , 3 , 2 } ; for ( int s : scores ) { mode . execute ( null , null , null , new java . lang . Object [ ] { s } , null ) ; } java . lang . Object result = mode . getResult ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return registered . g... | org . junit . Assert . assertEquals ( 3 , ( ( int ) ( ( ( java . util . List < java . lang . Integer > ) ( result ) ) . get ( 0 ) ) ) ) |
testEnsureCapacityWithOldFiles ( ) { io . datakernel . util . MemSize sizeLimit = io . datakernel . util . MemSize . kilobytes ( 50 ) ; byte [ ] data = new byte [ ( ( int ) ( 4.9 * 1024 ) ) ] ; new java . util . Random ( ) . nextBytes ( data ) ; java . nio . file . Files . write ( cacheStorage . resolve ( "oldFile.txt"... | org . junit . Assert . assertTrue ( ( ( sizeLimit . toLong ( ) ) >= ( cacheSize . toLong ( ) ) ) ) |
testProcessExportedFeaturesAndPopulateTaskListWhenFoundInMemory ( ) { final org . codice . ddf . admin . application . service . migratable . JsonFeature jfeature = new org . codice . ddf . admin . application . service . migratable . JsonFeature ( org . codice . ddf . admin . application . service . migratable . Featu... | org . junit . Assert . assertThat ( features . isEmpty ( ) , org . hamcrest . Matchers . equalTo ( true ) ) |
testRethrow_RuntimeException ( ) { java . lang . Throwable throwable = new java . lang . RuntimeException ( ) ; try { throw com . hazelcast . simulator . utils . CommonUtils . rethrow ( throwable ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } rethrow ( java . lang . Throwable ) { if ( th... | org . junit . Assert . assertEquals ( throwable , e ) |
testR1586_Bsn_Persoon_Bestaande_Persoon_Opgeschort_Fout ( ) { final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters persoonParameters = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters ( ) ; attr . put ( nl . bzk . brp . bijhouding . bericht . mod... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
createObjectsNoTrackingTest ( ) { sio2box . it . testclasses . BenchmarkTestClass benchmarkTestClass = new sio2box . it . testclasses . BenchmarkTestClass ( ) ; benchmarkTestClass . createObjectsNoTracking ( ) ; "<AssertPlaceHolder>" ; } getBytes ( ) { return sio2box . api . ThreadTrackingContext . getThreadContext ( )... | org . junit . Assert . assertEquals ( 0 , sio2box . api . ThreadTrackingContext . getBytes ( ) ) |
testExceptionMessageConstructor ( ) { org . finra . herd . model . ObjectNotFoundException exception = new org . finra . herd . model . ObjectNotFoundException ( org . finra . herd . model . ObjectNotFoundExceptionTest . TEST_MESSAGE_1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj... | org . junit . Assert . assertTrue ( exception . getMessage ( ) . equals ( org . finra . herd . model . ObjectNotFoundExceptionTest . TEST_MESSAGE_1 ) ) |
findElementsTwoByEmptyChild ( ) { final org . openqa . selenium . support . pagefactory . ByChainedTest . AllDriver driver = mock ( org . openqa . selenium . support . pagefactory . ByChainedTest . AllDriver . class ) ; final org . openqa . selenium . WebElement elem1 = mock ( org . openqa . selenium . WebElement . cla... | org . junit . Assert . assertThat ( by . findElements ( driver ) , org . hamcrest . Matchers . equalTo ( elems5 ) ) |
testTestWhenFalse ( ) { org . apache . commons . functor . BinaryPredicate < java . lang . Object , java . lang . Object > p = new org . apache . commons . functor . adapter . BinaryFunctionBinaryPredicate < java . lang . Object , java . lang . Object > ( org . apache . commons . functor . core . Constant . FALSE ) ; "... | org . junit . Assert . assertFalse ( p . test ( null , null ) ) |
testH2 ( ) { org . openscience . cdk . layout . HydrogenPlacer hydrogenPlacer = new org . openscience . cdk . layout . HydrogenPlacer ( ) ; org . openscience . cdk . interfaces . IAtom h1 = new org . openscience . cdk . Atom ( "H" ) ; org . openscience . cdk . interfaces . IAtom h2 = new org . openscience . cdk . Atom ... | org . junit . Assert . assertNotNull ( h1 . getPoint2d ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.