input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
createTableInAccumuloNamespace ( ) { java . lang . String tableName = ( Namespace . ACCUMULO . name ( ) ) + ".1" ; "<AssertPlaceHolder>" ; c . tableOperations ( ) . create ( tableName ) ; } tableOperations ( ) { return context . tableOperations ( ) ; } | org . junit . Assert . assertFalse ( c . tableOperations ( ) . exists ( tableName ) ) |
testValidPartition ( ) { org . kitesdk . data . spi . PartitionKey key = org . kitesdk . data . spi . filesystem . FileSystemDatasetRepository . partitionKeyForPath ( dataset , new org . apache . hadoop . fs . Path ( testDirectory , "username_part=1" ) . toUri ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( new org . kitesdk . data . spi . PartitionKey ( 1 ) , key ) |
testGo ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream ps = new java . io . PrintStream ( baos ) ; new org . drools . example . api . defaultkiesession . DefaultKieSessionExample ( ) . go ( ps ) ; ps . close ( ) ; java . lang . String actual = new java ... | org . junit . Assert . assertEquals ( expected , actual ) |
setIndent ( ) { biweekly . io . xml . XCalOutputProperties properties = new biweekly . io . xml . XCalOutputProperties ( ) ; properties . setIndent ( 1 ) ; java . util . Map < java . lang . String , java . lang . String > expected = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; expecte... | org . junit . Assert . assertEquals ( expected , properties ) |
setAsText_shouldSetUsingProgramUuid ( ) { org . openmrs . propertyeditor . ProgramEditor editor = new org . openmrs . propertyeditor . ProgramEditor ( ) ; editor . setAsText ( "da4a0391-ba62-4fad-ad66-1e3722d16380" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertNotNull ( editor . getValue ( ) ) |
testSimpleBuilderMissingStringL1 ( ) { software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder expected = software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder . builder ( ) . longVal ( 10L ) . build ( ) ; software . amazon . kinesis . multilang . ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
test_getLog ( ) { java . lang . String [ ] logcatResponse = new java . lang . String [ ] { "loggy" , "last" } ; when ( android . getShellReturn ( any ( com . android . ddmlib . IDevice . class ) , any ( java . lang . String . class ) ) ) . thenReturn ( logcatResponse ) ; java . lang . String [ ] testResult = rootedAndr... | org . junit . Assert . assertTrue ( testResult [ 0 ] . equals ( logcatResponse [ 0 ] ) ) |
testBeideLeeg ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . autorisatie . Lo3AutorisatieInhoud meestRecenteNietLegeInhoud = autorisatieConversieHelper . bepaalMeesteRecenteNietLegeInhoud ( maakStapel ( 19900101 , true , 19910101 , true ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( meestRecenteNietLegeInhoud ) |
testNewBroadcastComparison2 ( ) { org . nd4j . linalg . api . ndarray . INDArray initial = org . nd4j . linalg . factory . Nd4j . create ( 3 , 5 ) ; org . nd4j . linalg . api . ndarray . INDArray mask = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 5 , 4 , 3 , 2 , 1 } ) ; org . nd4j . linalg . api . ... | org . junit . Assert . assertEquals ( exp , initial . getRow ( i ) ) |
zoekLo3VoorkomenVoorActieWelGevonden ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Lo3Voorkomen result = verConvRepository . zoekLo3VoorkomenVoorActie ( 28L ) ; "<AssertPlaceHolder>" ; } zoekLo3VoorkomenVoorActie ( nl . bzk . brp . model . logisch . kern . Actie ) { if ( actie == null ) { return nu... | org . junit . Assert . assertNotNull ( result ) |
testGetBadDouble ( ) { op . newOption ( alpha ) . requiredArg ( ) . done ( ) ; op . process ( com . google . common . collect . Lists . newArrayList ( "command" , "--alpha" , "a" ) ) ; "<AssertPlaceHolder>" ; op . getDouble ( alpha ) ; } has ( E ) { if ( ( longOption == null ) || ( ( longOption . toString ( ) ) == null... | org . junit . Assert . assertTrue ( op . has ( alpha ) ) |
iterationFromKeyIsInOrder ( ) { for ( java . util . Map < java . lang . Integer , java . lang . Integer > any : net . java . quickcheck . generator . CombinedGeneratorsIterables . someMaps ( net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) , net . java . quickcheck . generator . PrimitiveGenerat... | org . junit . Assert . assertEquals ( expectedKeys , actualKeys ) |
testInvalidIDPName ( ) { org . apache . jackrabbit . oak . spi . security . authentication . external . impl . jmx . SyncMBeanImpl syncMBean = createSyncMBeanImpl ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . jmx . SyncMBeanImplTest . SYNC_NAME , "invalid" ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( "invalid" , syncMBean . getIDPName ( ) ) |
validate_shouldPassValidationIfFieldLengthsAreCorrect ( ) { org . openmrs . PatientIdentifierType type = new org . openmrs . PatientIdentifierType ( ) ; type . setName ( "name" ) ; type . setFormat ( "format" ) ; type . setFormatDescription ( "formatDescription" ) ; type . setValidator ( "validator" ) ; type . setRetir... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testEvalReturnArrayStrings ( ) { actual . add ( connection . eval ( "return<sp>{KEYS[1],ARGV[1]}" , ReturnType . MULTI , 1 , "foo" , "bar" ) ) ; org . springframework . data . redis . connection . List < byte [ ] > result = ( ( org . springframework . data . redis . connection . List < byte [ ] > ) ( getResults ( ) . g... | org . junit . Assert . assertEquals ( org . springframework . data . redis . connection . Arrays . asList ( new java . lang . Object [ ] { "foo" , "bar" } ) , org . springframework . data . redis . connection . Arrays . asList ( new java . lang . Object [ ] { new java . lang . String ( result . get ( 0 ) ) , new java .... |
canGetSinglePolicyById ( ) { java . lang . String expectedName = ( testPolicyPrefix ) + "GetOne" ; double duration = 1 ; com . microsoft . windowsazure . services . media . models . AccessPolicyInfo policyToGet = service . create ( com . microsoft . windowsazure . services . media . models . AccessPolicy . create ( exp... | org . junit . Assert . assertEquals ( policyToGet . getId ( ) , retrievedPolicy . getId ( ) ) |
boolNullEveryOther ( ) { final int count = 1024 ; try ( org . apache . arrow . vector . BitVector in = new org . apache . arrow . vector . BitVector ( "in" , allocator ) ; org . apache . arrow . vector . BitVector out = new org . apache . arrow . vector . BitVector ( "out" , allocator ) ) { in . allocateNew ( count ) ;... | org . junit . Assert . assertEquals ( in . getObject ( i ) , out . getObject ( i ) ) |
atomStereoLeftOrUnspec ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getAtomExpr ( "[@?]" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . or ( org . openscience... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testMaxDistance_happyPath ( ) { java . lang . Double maxDistance = ( ( double ) ( org . apache . metron . stellar . common . utils . StellarProcessorUtils . run ( "GEOHASH_MAX_DIST([empireState,<sp>mosconeCenter,<sp>jutland])" , com . google . common . collect . ImmutableMap . of ( "empireState" , empireStateHash , "mo... | org . junit . Assert . assertEquals ( expectedDistance , maxDistance , 1.0 ) |
failSSLonPlainConnectionWrite ( ) { final org . threadly . concurrent . future . SettableListenableFuture < java . lang . Boolean > gotError = new org . threadly . concurrent . future . SettableListenableFuture < java . lang . Boolean > ( ) ; org . threadly . litesockets . TCPServer server = SE . createTCPServer ( "loc... | org . junit . Assert . assertTrue ( gotError . get ( ) ) |
testNotEqualsFiltered ( ) { hudson . plugins . clearcase . history . FieldFilter filter = new hudson . plugins . clearcase . history . FieldFilterTest . FieldFilterDummy ( FieldFilter . Type . NotEquals , hudson . plugins . clearcase . history . FieldFilterTest . PATTERN ) ; "<AssertPlaceHolder>" ; } accept ( java . la... | org . junit . Assert . assertFalse ( filter . accept ( hudson . plugins . clearcase . history . FieldFilterTest . PATTERN ) ) |
testList3 ( ) { final java . util . List < java . lang . Object > packages = conf . getList ( "test.threesome.three" ) ; "<AssertPlaceHolder>" ; } size ( ) { int count = 0 ; for ( final java . util . Iterator < java . lang . String > iterator = configuration . getKeys ( ) ; iterator . hasNext ( ) ; ) { iterator . next ... | org . junit . Assert . assertEquals ( 3 , packages . size ( ) ) |
backwardsCompatible_withPrivateDns_notPublicIp ( ) { boolean usePrivateDnsName = true ; boolean connectUsingPublicIp = false ; boolean associatePublicIp = false ; "<AssertPlaceHolder>" ; } backwardsCompatible ( boolean , boolean , boolean ) { if ( usePrivateDnsName && ( ! connectUsingPublicIp ) ) { return hudson . plug... | org . junit . Assert . assertThat ( hudson . plugins . ec2 . ConnectionStrategy . backwardsCompatible ( usePrivateDnsName , connectUsingPublicIp , associatePublicIp ) , org . hamcrest . CoreMatchers . equalTo ( ConnectionStrategy . PRIVATE_DNS ) ) |
setUpdateType_allTypes_isCorrect ( ) { for ( eu . chargetime . ocpp . model . localauthlist . UpdateType type : eu . chargetime . ocpp . model . localauthlist . UpdateType . values ( ) ) { request . setUpdateType ( type ) ; "<AssertPlaceHolder>" ; } } getUpdateType ( ) { return updateType ; } | org . junit . Assert . assertThat ( request . getUpdateType ( ) , org . hamcrest . CoreMatchers . equalTo ( type ) ) |
deleteAll ( ) { todoRepository . deleteAll ( ) ; "<AssertPlaceHolder>" ; } deleteAll ( ) { todoRepository . deleteAll ( ) ; org . junit . Assert . assertEquals ( 0 , todoRepository . count ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , todoRepository . count ( ) ) |
testEncodeDecodeSignature ( ) { com . trilead . ssh2 . signature . RSAKeyAlgorithm testCase = new com . trilead . ssh2 . signature . RSAKeyAlgorithm ( ) ; java . security . KeyPairGenerator factory = java . security . KeyPairGenerator . getInstance ( "RSA" ) ; java . security . interfaces . RSAPrivateKey privateKey = (... | org . junit . Assert . assertArrayEquals ( signature , decoded ) |
fileSearchSkipStartWith ( ) { final java . lang . String str = getClass ( ) . getResource ( "/skipped" ) . toString ( ) ; final java . lang . String baseDir = str . substring ( ( ( str . indexOf ( ":/" ) ) + 1 ) ) ; final com . github . wuic . path . DirectoryPath directoryPath = com . github . wuic . path . DirectoryP... | org . junit . Assert . assertEquals ( 2 , res . size ( ) ) |
testAddShellStepToEmrCluster ( ) { org . finra . herd . model . api . xml . EmrShellStepAddRequest emrShellStepAddRequest = new org . finra . herd . model . api . xml . EmrShellStepAddRequest ( NAMESPACE , EMR_CLUSTER_DEFINITION_NAME , EMR_CLUSTER_NAME , EMR_STEP_NAME , EMR_STEP_SCRIPT_LOCATION , java . util . Arrays .... | org . junit . Assert . assertEquals ( emrShellStep , result ) |
testClassPathWithWildcardIsBuildCorrectlyUsingRelativePath ( ) { java . lang . String wildcard = ( info . novatec . testit . livingdoc . server . domain . RunnerTest . classpathDirectory . getAbsolutePath ( ) ) + "/*.html" ; info . novatec . testit . livingdoc . server . domain . Runner runner = info . novatec . testit... | org . junit . Assert . assertEquals ( 2 , resolvedClassPaths . size ( ) ) |
testMutableAdd ( ) { System . out . println ( "mutableAdd" ) ; cvec . mutableAdd ( ( - 1 ) , dvec ) ; for ( int i = 0 ; i < ( dvec . length ( ) ) ; i ++ ) "<AssertPlaceHolder>" ; } get ( int ) { if ( index < ( w . length ( ) ) ) return w . get ( index ) ; else if ( index == ( w . length ( ) ) ) return b [ 0 ] ; else th... | org . junit . Assert . assertEquals ( 0.0 , cvec . get ( i ) , 0.0 ) |
testGetApisMessageByHashcode ( ) { final java . lang . String hash = "1122233" ; gov . gtas . model . ApisMessage m = new gov . gtas . model . ApisMessage ( ) ; m . setHashCode ( hash ) ; m . setCreateDate ( new java . util . Date ( ) ) ; m . setFilePath ( "/tmp/nothing.txt" ) ; apisMessageRepository . save ( m ) ; gov... | org . junit . Assert . assertEquals ( m , m2 ) |
testSetLanguageSuccessNull ( ) { java . lang . String languageNull = null ; simpleWizard . setLanguage ( languageNull ) ; "<AssertPlaceHolder>" ; } getLanguage ( ) { return language ; } | org . junit . Assert . assertEquals ( languageNull , simpleWizard . getLanguage ( ) ) |
testFilterConjunction ( ) { org . apache . accumulo . core . iterators . SortedMapIterator source = new org . apache . accumulo . core . iterators . SortedMapIterator ( createKeyValues ( ) ) ; org . apache . accumulo . core . iterators . user . RowFilter filter0 = new org . apache . accumulo . core . iterators . user .... | org . junit . Assert . assertEquals ( new java . util . HashSet ( java . util . Arrays . asList ( "1" ) ) , getRows ( filter ) ) |
testSetImageReturnsDescriptor ( ) { com . eclipsesource . tabris . ui . Action action = mock ( com . eclipsesource . tabris . ui . Action . class ) ; java . io . InputStream image = com . eclipsesource . tabris . internal . ui . ActionDescriptorTest . class . getResourceAsStream ( "testImage.png" ) ; com . eclipsesourc... | org . junit . Assert . assertSame ( descriptor , actualDescriptor ) |
shouldReturnListForGivenStringQuery ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity1 = org . springframework . data . elasticsearch . entities . SampleEntity . builder ( ) . id ( documentId ) . message ( "test<sp>message" ... | org . junit . Assert . assertThat ( sampleEntities . size ( ) , is ( 3 ) ) |
testToevoegenOnderzoekAanPersoon ( ) { "<AssertPlaceHolder>" ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonIndicatieHistorie indicatieHistorie = maakPersoonIndicatie ( bestaandPersoon ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . mapper . strategie . OnderzoekMapper ... | org . junit . Assert . assertTrue ( bestaandPersoon . getOnderzoeken ( ) . isEmpty ( ) ) |
testHedgingWhenOneFails ( ) { final org . apache . hadoop . hdfs . protocol . ClientProtocol goodMock = org . mockito . Mockito . mock ( org . apache . hadoop . hdfs . protocol . ClientProtocol . class ) ; org . mockito . Mockito . when ( goodMock . getStats ( ) ) . thenAnswer ( new org . mockito . stubbing . Answer < ... | org . junit . Assert . assertTrue ( ( ( stats . length ) == 1 ) ) |
testCheckMapExactly_DifferKeys ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testUnaryExpression ( ) { org . antlr . runtime . tree . CommonTree tree_empty = unaryExpression ( "" ) ; "<AssertPlaceHolder>" ; } unaryExpression ( java . lang . String ) { try { setInput ( content ) ; return parser . unaryExpression ( ) . getTree ( ) ; } catch ( org . antlr . runtime . RecognitionException e ) { ret... | org . junit . Assert . assertEquals ( null , tree_empty ) |
testIp ( ) { byte [ ] bytes = org . spongycastle . util . encoders . Hex . decode ( "41043e96222332ea7848323c08116dddafbfa917b8e37f0bdf63841628267148588a09a43540942d58d49717ad3fabfe14978cf4f0a8b84d2435dad16e9aa4d7f935ac" ) ; com . google . litecoin . core . Script s = new com . google . litecoin . core . Script ( com .... | org . junit . Assert . assertTrue ( s . isSentToRawPubKey ( ) ) |
testDefaultLeafToNullChangedToFalse_NoNullInOutput ( ) { org . pentaho . di . trans . steps . jsoninput . JsonInputField id = new org . pentaho . di . trans . steps . jsoninput . JsonInputField ( "id" ) ; id . setPath ( "$..id" ) ; id . setType ( ValueMetaInterface . TYPE_STRING ) ; org . pentaho . di . trans . steps .... | org . junit . Assert . assertEquals ( 1 , jsonInput . getLinesWritten ( ) ) |
nonClusterableNodeStoreAndLeaseTimeout ( ) { nodeStore = new org . apache . jackrabbit . oak . plugins . memory . MemoryNodeStore ( ) ; injectDefaultServices ( ) ; java . util . Map < java . lang . String , java . lang . Object > config = com . google . common . collect . ImmutableMap . < java . lang . String , java . ... | org . junit . Assert . assertEquals ( 0 , indexUpdate . getLeaseTimeOut ( ) ) |
setParameterValue_rightDBWrongContext ( ) { liquibase . changelog . ChangeLogParameters changeLogParameters = new liquibase . changelog . ChangeLogParameters ( new liquibase . database . core . H2Database ( ) ) ; changeLogParameters . setContexts ( new liquibase . Contexts ( "junit" ) ) ; changeLogParameters . set ( "d... | org . junit . Assert . assertNull ( changeLogParameters . getValue ( "doubleSet" , null ) ) |
shouldNotAddContextPathIfNotSlashPrefixed ( ) { org . springframework . springfaces . mvc . servlet . view . BookmarkableRedirectView view = new org . springframework . springfaces . mvc . servlet . view . BookmarkableRedirectView ( "ab" , true ) ; java . lang . String actual = view . getBookmarkUrl ( null , this . req... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( "ab" ) ) ) |
testGetAllAtomContainers_IReactionSet ( ) { "<AssertPlaceHolder>" ; } getAllAtomContainers ( org . openscience . cdk . interfaces . IReactionSet ) { return org . openscience . cdk . tools . manipulator . MoleculeSetManipulator . getAllAtomContainers ( org . openscience . cdk . tools . manipulator . ReactionSetManipulat... | org . junit . Assert . assertEquals ( 3 , org . openscience . cdk . tools . manipulator . ReactionSetManipulator . getAllAtomContainers ( set ) . size ( ) ) |
testTimer ( ) { com . vladmihalcea . flexypool . metric . micrometer . MicrometerMetrics micrometerMetrics = new com . vladmihalcea . flexypool . metric . micrometer . MicrometerMetrics ( configurationProperties ) ; com . vladmihalcea . flexypool . metric . Timer timer = micrometerMetrics . timer ( "timer" ) ; "<Assert... | org . junit . Assert . assertNotNull ( timer ) |
testCase2 ( ) { java . lang . String log = "<33>last<sp>message<sp>repeated<sp>7<sp>times" ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; params . put ( "message" , log ) ; java . util . Map < java . lang . Str... | org . junit . Assert . assertNull ( m ) |
checkIfGIDIsWithinRange ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . ModulesUtilsEntryIntegrationTest . CLASS_NAME ) + "checkIfGIDIsWithinRange" ) ) ; cz . metacentrum . perun . core . api . Attribute gidRanges = new cz . metacentrum . perun . core . api . Attribute ( perun . getAttribut... | org . junit . Assert . assertEquals ( 1 , i ) |
testHiveSitePath ( ) { java . lang . String expectedPath = org . apache . hive . common . util . HiveTestUtils . getFileFromClasspath ( "hive-site.xml" ) ; java . lang . String hiveSiteLocation = org . apache . hadoop . hive . conf . HiveConf . getHiveSiteLocation ( ) . getPath ( ) ; "<AssertPlaceHolder>" ; } getPath (... | org . junit . Assert . assertEquals ( expectedPath , hiveSiteLocation ) |
shouldGetMockCollectionGivenTwoTypesOfCollection ( ) { uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField mockCollection1 = new uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField ( java . util . Collections . emptySet ( ) , java . util . Set . class , java . io . In... | org . junit . Assert . assertSame ( mockCollection1 , actualMockCollection ) |
checkPluginCreation ( ) { info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap . IBootstrap < info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > > bootstrap = mock ( info . smart_tools . smartactors . feature_... | org . junit . Assert . assertNotNull ( plugin ) |
testRedundantSecond ( ) { _orBuilder . add ( org . batfish . datamodel . acl . explanation . DisjunctsBuilderTest . DST_PREFIX ) ; _orBuilder . add ( org . batfish . datamodel . acl . explanation . DisjunctsBuilderTest . DST_IP ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . batfish . referencelibrary . Refe... | org . junit . Assert . assertThat ( _orBuilder . build ( ) , org . hamcrest . Matchers . equalTo ( org . batfish . datamodel . acl . explanation . DisjunctsBuilderTest . DST_PREFIX ) ) |
testGetValueRawJson ( ) { createRawJsonProcessor ( ) ; initInputStream ( ) ; inputBodyByteBuf . writeCharSequence ( "\"1\"" , StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object [ ] ) { return ( ( T ) ( args [ paramIndex ] ) ) ; } | org . junit . Assert . assertEquals ( "\"1\"" , processor . getValue ( request ) ) |
error ( ) { java . lang . String uuid = java . util . UUID . randomUUID ( ) . toString ( ) ; resetOutput ( ) ; org . spincast . plugins . logbackutils . tests . DefaultTest . logger . error ( uuid ) ; java . lang . String output = getOutput ( ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { java . lang... | org . junit . Assert . assertTrue ( output . contains ( uuid ) ) |
testMultipleChannels ( ) { java . util . List < org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal > signals = new java . util . ArrayList ( ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 0 ) )... | org . junit . Assert . assertEquals ( 1 , nb ) |
deserializeCollection ( ) { io . reinert . requestor . serialization . DeserializationContext context = org . mockito . Mockito . mock ( io . reinert . requestor . serialization . DeserializationContext . class ) ; org . mockito . Mockito . when ( context . getInstance ( java . util . List . class ) ) . thenReturn ( ne... | org . junit . Assert . assertEquals ( expected , output ) |
testDoBackWithWebacAcl ( ) { final org . fcrepo . kernel . api . models . FedoraWebacAcl webacAcl = new org . fcrepo . kernel . modeshape . FedoraWebacAclImpl ( webacAclNode ) ; when ( webacAclNode . getPath ( ) ) . thenReturn ( ( ( path ) + "/fedora:acl" ) ) ; final org . apache . jena . rdf . model . Resource convert... | org . junit . Assert . assertEquals ( expectedResource , converted ) |
testSerialization ( ) { org . jfree . chart . block . LineBorder b1 = new org . jfree . chart . block . LineBorder ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . RED , 3.0F , 4.0F , java . awt . Color . yellow ) , new java . awt . BasicStroke ( 1.0F ) , new org . jfree . chart . ui . RectangleIns... | org . junit . Assert . assertEquals ( b1 , b2 ) |
test4 ( ) { nopol_examples . nopol_example_3 . NopolExample ex = new nopol_examples . nopol_example_3 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isOddNumber ( int ) { int tmp = ( a - 1 ) % 2 ; if ( tmp != 0 ) { return true ; } return false ; } | org . junit . Assert . assertTrue ( ( ! ( ex . isOddNumber ( 2 ) ) ) ) |
testGetContentTypesNone ( ) { ddf . catalog . source . solr . provider . SolrProviderTestUtil . deleteAll ( ddf . catalog . source . solr . provider . SolrProviderContentTypes . provider ) ; "<AssertPlaceHolder>" ; } getContentTypes ( ) { return client . getContentTypes ( ) ; } | org . junit . Assert . assertEquals ( 0 , ddf . catalog . source . solr . provider . SolrProviderContentTypes . provider . getContentTypes ( ) . size ( ) ) |
test_format_simple ( ) { final java . lang . String pattern = "getNextPrintPackage/{SessionID}/{TransactionID}" ; final java . util . Map < java . lang . String , java . lang . String > args = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; args . put ( "SessionID" , "1" ) ; args . put (... | org . junit . Assert . assertEquals ( strExpected , strActual ) |
testCanRead ( ) { java . lang . String testFileName = "testCanRead.txt" ; java . lang . String absPath = org . irods . jargon . core . pub . io . IRODSFileImplTest . scratchFileUtils . createAndReturnAbsoluteScratchPath ( org . irods . jargon . core . pub . io . IRODSFileImplTest . IRODS_TEST_SUBDIR_PATH ) ; org . irod... | org . junit . Assert . assertTrue ( irodsFile . canRead ( ) ) |
xsdVersion ( ) { final org . basex . query . func . Function . Function func = _VALIDATE_XSD_VERSION ; "<AssertPlaceHolder>" ; } query ( org . basex . http . rest . Function ) { final org . basex . http . rest . HTTPConnection conn = session . conn ; final java . lang . String query = ( "declare<sp>variable<sp>$d<sp>ex... | org . junit . Assert . assertFalse ( query ( func . args ( ) ) . isEmpty ( ) ) |
testMpReach ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . MpReachNlriBuilder mpReach = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 .... | org . junit . Assert . assertEquals ( mpReachExpected . build ( ) , mpReach . build ( ) ) |
testGetValidHumanishName ( ) { java . lang . String humanishName = new org . eclipse . jgit . transport . URIish ( ( ( org . eclipse . jgit . transport . URIishTest . GIT_SCHEME ) + "abc" ) ) . getHumanishName ( ) ; "<AssertPlaceHolder>" ; } getHumanishName ( ) { java . lang . String s = getPath ( ) ; if ( ( "/" . equa... | org . junit . Assert . assertEquals ( "abc" , humanishName ) |
testGetEqual ( ) { org . openscience . smsd . helper . BinaryTree instance = new org . openscience . smsd . helper . BinaryTree ( 15 ) ; org . openscience . smsd . helper . BinaryTree equal = new org . openscience . smsd . helper . BinaryTree ( 15 ) ; instance . setEqual ( equal ) ; instance . setNotEqual ( new org . o... | org . junit . Assert . assertEquals ( expResult , result ) |
testEvaluateSingleBindingNestedTarget ( ) { com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription firstDescription = new com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription ( ) ; firstDescription . name = "A" ; firstDescription . ... | org . junit . Assert . assertEquals ( firstDescription . logConfig . type , secondDescription . hostname ) |
marshal_nullValue ( ) { "<AssertPlaceHolder>" ; } marshal ( java . math . BigDecimal ) { return org . oscm . billingservice . business . org . oscm . billingservice . business . BigDecimalJaxbCustomBinder . printBigDecimal ( value ) ; } | org . junit . Assert . assertNull ( adapter . marshal ( null ) ) |
testComplexECDecodeInputStream ( ) { System . out . println ( ) ; System . out . println ( "Running:<sp>testComplexECDecodeInputStream" ) ; org . ccnx . ccn . apps . examples . ccnb . ExampleComplicated ecToEncode = setupEC ( 2 , false , Enumeration . Enu1 ) ; java . io . ByteArrayOutputStream baos = encodeOutput ( "Ex... | org . junit . Assert . assertNotNull ( baos ) |
testSetsUserTimingCategory ( ) { com . eclipsesource . tabris . tracking . internal . analytics . model . hit . TimingHit eventHit = new com . eclipsesource . tabris . tracking . internal . analytics . model . hit . TimingHit ( ) . setUserTimingCategory ( "foo" ) ; java . lang . String userTimingCategory = ( ( java . l... | org . junit . Assert . assertEquals ( "foo" , userTimingCategory ) |
test ( ) { com . dw . ccm . wechat . base . WeChat weChat = com . dw . ccm . wechat . base . WeChatHelper . getWeChat ( com . dw . ccm . wechat . base . WeChatHelper . getAccessToken ( "wxd2bff322d0c25d5f" , "5383aade955f01939562613bef7a2c44" ) . getAccessToken ( ) ) ; com . dw . ccm . wechat . base . MenuMessage menuM... | org . junit . Assert . assertTrue ( ( ( response . getErrCode ( ) ) == 0 ) ) |
testBulkLoginWithQuotes ( ) { org . talend . components . salesforce . SalesforceConnectionProperties props = setupProps ( null , org . talend . components . salesforce . integration . ADD_QUOTES ) ; props . bulkConnection . setValue ( true ) ; org . talend . daikon . properties . presentation . Form f = props . getFor... | org . junit . Assert . assertEquals ( ValidationResult . Result . OK , props . getValidationResult ( ) . getStatus ( ) ) |
testMoveNotExistingSuperiorReferralAncestorCoreAPIWithManageDsaIt ( ) { org . apache . directory . server . core . api . CoreSession coreSession = getService ( ) . getAdminSession ( ) ; org . apache . directory . api . ldap . model . name . Dn dn = new org . apache . directory . api . ldap . model . name . Dn ( "cn=Emm... | org . junit . Assert . assertTrue ( true ) |
shouldUpdateBucket ( ) { com . couchbase . client . java . cluster . BucketSettings settings = com . couchbase . client . java . cluster . DefaultBucketSettings . builder ( ) . name ( com . couchbase . client . java . ClusterManagerTest . UPDATE_BUCKET ) . password ( "password" ) . quota ( 128 ) . build ( ) ; com . cou... | org . junit . Assert . assertEquals ( 256 , size ) |
testGroupParam ( ) { final org . apache . hadoop . hdfs . web . resources . GroupParam p = new org . apache . hadoop . hdfs . web . resources . GroupParam ( GroupParam . DEFAULT ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( null , p . getValue ( ) ) |
analyseSingleBitmap ( ) { org . roaringbitmap . RoaringBitmap rb = new org . roaringbitmap . RoaringBitmap ( ) ; rb . add ( 1 , 3 , 6 , 26 , 110 , 1024 ) ; rb . add ( 70000L , 80000L ) ; for ( int i = 5 << 16 ; i < ( 6 << 16 ) ; i ++ ) { rb . add ( i ) ; } org . roaringbitmap . insights . BitmapStatistics result = org ... | org . junit . Assert . assertEquals ( expected , result ) |
testVariableDirectoryStraggler ( ) { final java . lang . String s = "" + ( ( ( ( ( "c<sp>1<sp>Foo\n" + "c<sp>2<sp>Bar\n" ) + "p<sp>cnf<sp>3<sp>2\n" ) + "1<sp>-3<sp>0\n" ) + "c<sp>3<sp>Baz\n" ) + "2<sp>3<sp>-1<sp>0" ) ; final de . ovgu . featureide . fm . core . io . dimacs . DimacsReader r = new de . ovgu . featureide ... | org . junit . Assert . assertEquals ( expected , actual ) |
testNoDoubleUnderscore ( ) { metricName = "echo__two_underscores" ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { if ( ( null == nameForCrossEntityAggregate ) || ( nameForCrossEntityAggregate . isEmpty ( ) ) ) { return true ; } return com . cloudera . csd... | org . junit . Assert . assertFalse ( validator . isValid ( metricName , context ) ) |
brokenRecipeTest ( ) { java . lang . String recipe = "rule[is(<http://kres.iks-project.eu/ontology.owl#Person>)<sp>-><sp>is(<http://xmlns.com/foaf/0.1/Person>,<sp>?x)]" ; try { org . apache . stanbol . rules . manager . parse . RuleParserImpl . parse ( "http://kres.iks-project.eu/ontology.owl#" , recipe ) ; } catch ( j... | org . junit . Assert . assertTrue ( true ) |
stepEmbeddingTest ( ) { java . util . List < java . lang . Integer > expected = java . util . Arrays . asList ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ... | org . junit . Assert . assertEquals ( expected , actualEmbeddingsCount ) |
should_throw_exception_when_annotation_with_non_entity_class ( ) { com . ctp . cdi . query . meta . extractor . AnnotationMetadataExtractor extractor = new com . ctp . cdi . query . meta . extractor . AnnotationMetadataExtractor ( ) ; com . ctp . cdi . query . meta . DaoEntity result = extractor . extract ( com . ctp .... | org . junit . Assert . assertNull ( result ) |
testStartTimeout ( ) { try { java . util . List < java . lang . String > args = getWriterLoopCommand ( ) ; new org . zeroturnaround . exec . ProcessExecutor ( ) . command ( args ) . start ( ) . getFuture ( ) . get ( 1 , TimeUnit . SECONDS ) ; org . junit . Assert . fail ( "TimeoutException<sp>expected." ) ; } catch ( j... | org . junit . Assert . assertNull ( e . getMessage ( ) ) |
phraseScoreTest ( ) { java . lang . String query = "ID<sp>==<sp>'TEST_ID'<sp>&&<sp>content:phrase(-1.5,<sp>termOffsetMap,'boy','car')" ; final java . util . List < datawave . webservice . query . result . event . DefaultEvent > events = getQueryResults ( query , true , true ) ; "<AssertPlaceHolder>" ; final java . util... | org . junit . Assert . assertEquals ( 1 , events . size ( ) ) |
should_get_project_description ( ) { org . sonar . wsclient . services . Resource resource = new org . sonar . wsclient . services . Resource ( ) ; resource . setLongName ( "description" ) ; when ( sonarClient . findResource ( anyString ( ) ) ) . thenReturn ( resource ) ; fr . norad . visuwall . api . domain . Software... | org . junit . Assert . assertEquals ( "description" , description ) |
testBuildWithParametersAndDisabledDefaultsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . address . type . AddressType addressType = new org ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
partialSelectorWithNoTargetField ( ) { final org . marc4j . marc . Record record = newRecord ( null , null ) ; final eu . aliada . rdfizer . pipeline . format . marc . selector . binary . ControlFieldExpression expression = new eu . aliada . rdfizer . pipeline . format . marc . selector . binary . ControlFieldExpressio... | org . junit . Assert . assertNull ( expression . evaluate ( record ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . asset . list . model . AssetListEntryAssetEntryRel missingAssetListEntryAssetEntryRel = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( lon... | org . junit . Assert . assertNull ( missingAssetListEntryAssetEntryRel ) |
testSetAuthenticationPolicy ( ) { org . apache . activemq . shiro . authc . AuthenticationPolicy policy = new org . apache . activemq . shiro . authc . AuthenticationPolicy ( ) { @ org . apache . activemq . shiro . subject . Override public void customizeSubject ( org . apache . shiro . subject . Subject . Builder subj... | org . junit . Assert . assertSame ( policy , factory . getAuthenticationPolicy ( ) ) |
testGetExportedObjectsByType_01 ( ) { org . eclipse . emf . ecore . EClass classifier = EcorePackage . Literals . ECLASSIFIER ; java . lang . Iterable < org . eclipse . xtext . resource . IEObjectDescription > iterable = container . getExportedObjectsByType ( classifier ) ; org . eclipse . emf . ecore . EObject eObject... | org . junit . Assert . assertSame ( eClass , eObject ) |
returnPendingIfNullIsPassedIntoParseLineMulti ( ) { java . lang . String [ ] nextLine = csvParser . parseLineMulti ( "This,\"is<sp>a<sp>\"goo\\d\"<sp>line\\\\<sp>to<sp>parse\\" ) ; org . junit . Assert . assertEquals ( 1 , nextLine . length ) ; org . junit . Assert . assertEquals ( "This" , nextLine [ 0 ] ) ; org . jun... | org . junit . Assert . assertFalse ( csvParser . isPending ( ) ) |
should_return_Set_containing_all_elements_in_array ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "One" , "Two" } ; java . util . LinkedHashSet < java . lang . String > set = org . fest . util . Sets . newLinkedHashSet ( expected ) ; "<AssertPlaceHolder>" ; } newLinkedHashSet ( T [ ] ) { org .... | org . junit . Assert . assertArrayEquals ( expected , set . toArray ( ) ) |
removeUnits ( ) { stackUnitIs ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "MB" ) ; setUpStack ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE , org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV ) ; java . u... | org . junit . Assert . assertEquals ( expected , configuration . getProperties ( ) ) |
testExpandedNodeIdFourByte ( ) { org . opcfoundation . ua . builtintypes . ExpandedNodeId data = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( null , 0 , 33000 ) ; org . opcfoundation . ua . encoding . EncoderContext ctx = org . opcfoundation . ua . encoding . EncoderContext . getDefaultInstance ( ) ; ... | org . junit . Assert . assertEquals ( data , actual ) |
test_duplicate_method_for_getAllDeclareMethods ( ) { java . lang . reflect . Method [ ] ms = org . nutz . lang . Mirror . me ( org . nutz . lang . MirrorTest . TDMFGADMII . class ) . getAllDeclaredMethodsWithoutTop ( ) ; java . util . List < java . lang . reflect . Method > tmp = new java . util . ArrayList < java . la... | org . junit . Assert . assertEquals ( 2 , ms . length ) |
testWithinIndex ( ) { db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>class<sp>Polygon<sp>extends<sp>v" ) ) . execute ( ) ; db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>property<sp>Polygon.geometry<sp>EMBEDDED<sp>OPolygon" ) ) . ... | org . junit . Assert . assertEquals ( 1 , execute . size ( ) ) |
createApi ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . module . tests . API ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . refreshGradleProject ( com . liferay . ide . ui... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( com . liferay . ide . ui . module . tests . NewModuleProjectWizardLiferayWorkspaceGradleTests . liferayWorkspace . getModuleFiles ( project . getName ( ) ) ) ) |
testQuaternion ( ) { io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ) ; org . spout . api . util . ByteBufUtils . writeQuaternion ( buf , Quaternionf . IDENTITY ) ; "<AssertPlaceHolder>" ; } readQuaternion ( io . netty . buffer . ByteBuf ) { final float x = buffer . readFloat ( ) ; final ... | org . junit . Assert . assertEquals ( Quaternionf . IDENTITY , org . spout . api . util . ByteBufUtils . readQuaternion ( buf ) ) |
testReadURL ( ) { java . lang . String urlPom = org . apache . commons . io . FileUtils . readFileToString ( fileIO . resolveURL ( new java . net . URL ( mockServer . getUrl ( ) ) ) ) ; java . lang . String filePom = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( new java . io . Fil... | org . junit . Assert . assertEquals ( urlPom , filePom ) |
testSoftReferenceHandling ( ) { final int maxSize = 10 ; final int iters = 50 ; final org . thymeleaf . cache . StandardCache < java . lang . String , java . lang . String > cache = new org . thymeleaf . cache . StandardCache < java . lang . String , java . lang . String > ( "testSoftReferences" , true , 2 , maxSize , ... | org . junit . Assert . assertEquals ( maxSize , cacheSize ) |
testGetTableNotExists ( ) { boolean expected = false ; when ( _server . getTableAttributes ( "table-name" ) ) . thenThrow ( new com . bazaarvoice . emodb . sor . api . UnknownTableException ( ) ) ; boolean actual = blobClient ( ) . getTableExists ( "table-name" ) ; "<AssertPlaceHolder>" ; verify ( _server ) . getTableA... | org . junit . Assert . assertEquals ( actual , expected ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.