input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testNestedIf2 ( ) { instrument ( org . jacoco . core . test . validation . java5 . CyclomaticComplexityTest . NestedIf . class ) ; target . test ( ( - 1 ) ) ; final org . jacoco . core . analysis . ICounter complexity = analyze ( ) ; "<AssertPlaceHolder>" ; } getInstance ( int , int ) { if ( ( missed <= ( org . jacoco ... | org . junit . Assert . assertEquals ( org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 2 , 1 ) , complexity ) |
testQueryImplFilter ( ) { ddf . catalog . operation . impl . QueryImpl qi = new ddf . catalog . operation . impl . QueryImpl ( ddf . catalog . operation . TestQueryImpl . filter1 ) ; "<AssertPlaceHolder>" ; } getFilter ( ) { if ( ( filters . size ( ) ) > 1 ) { return ddf . catalog . source . opensearch . MockQuery . FI... | org . junit . Assert . assertEquals ( ddf . catalog . operation . TestQueryImpl . filter1 , qi . getFilter ( ) ) |
testGetDoneItem ( ) { org . unitedinternet . cosmo . model . NoteItem done = ( ( org . unitedinternet . cosmo . model . NoteItem ) ( contentDao . findItemByUid ( "calendar2_1" ) ) ) ; org . unitedinternet . cosmo . service . triage . TriageStatusQueryContext context = new org . unitedinternet . cosmo . service . triage... | org . junit . Assert . assertEquals ( 2 , results . size ( ) ) |
testSecretBase64 ( ) { byte [ ] rndBytes = new byte [ 32 ] ; new java . security . SecureRandom ( ) . nextBytes ( rndBytes ) ; org . pac4j . jwt . config . signature . SecretSignatureConfiguration secretSignatureConfiguration = new org . pac4j . jwt . config . signature . SecretSignatureConfiguration ( ) ; java . lang ... | org . junit . Assert . assertEquals ( base64Secret , secretSignatureConfiguration . getSecretBase64 ( ) ) |
testCollectHeads_multi ( ) { com . asakusafw . utils . graph . Graph < java . lang . Integer > graph = com . asakusafw . utils . graph . Graphs . newInstance ( ) ; com . asakusafw . utils . graph . GraphsTest . addPath ( graph , 1 , 2 , 3 ) ; com . asakusafw . utils . graph . GraphsTest . addPath ( graph , 4 , 2 , 5 ) ... | org . junit . Assert . assertThat ( com . asakusafw . utils . graph . Graphs . collectHeads ( graph ) , is ( set ( 1 , 4 ) ) ) |
fetchShouldNotFetchTagsFromOtherBranches ( ) { remoteGit . commit ( ) . setMessage ( "commit" ) . call ( ) ; remoteGit . checkout ( ) . setName ( "other" ) . setCreateBranch ( true ) . call ( ) ; remoteGit . commit ( ) . setMessage ( "commit2" ) . call ( ) ; remoteGit . tag ( ) . setName ( "foo" ) . call ( ) ; git . fe... | org . junit . Assert . assertNull ( db . resolve ( "foo" ) ) |
testLinkSetRemovedRecord ( ) { com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "Test" ) ; java . util . Set < com . orientechnologies . orient . core . id . ORecordId > docs = new java . util . HashSet < com . orientechn... | org . junit . Assert . assertNull ( ( ( java . util . Set ) ( res . get ( 0 ) . field ( "items" ) ) ) . iterator ( ) . next ( ) ) |
shouldOrderProviders ( ) { final ro . isdc . wro . util . provider . TestProviderFinder . OrderedProvider lowest = new ro . isdc . wro . util . provider . TestProviderFinder . OrderedProvider ( ro . isdc . wro . util . Ordered . LOWEST ) ; final java . lang . Object defaultPriority = new java . lang . Object ( ) ; fina... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( lowest , defaultPriority , highest ) , victim . find ( ) ) |
testOffsetInInlineCommentInInstance ( ) { net . roboconf . tooling . core . autocompletion . Couple couple = prepare ( "app1" , "initial.instances" , 83 ) ; java . util . List < net . roboconf . tooling . core . autocompletion . ICompletionProposer . RoboconfCompletionProposal > proposals = couple . proposer . findProp... | org . junit . Assert . assertEquals ( 0 , proposals . size ( ) ) |
testIterator ( ) { final int nRecord = 4345 ; final int nCut = 2000 ; final int nBatch = 60 ; final java . util . concurrent . BlockingQueue < java . lang . String > input = new java . util . concurrent . LinkedBlockingQueue ( ) ; final org . apache . kylin . cube . inmemcubing . RecordConsumeBlockingQueueController in... | org . junit . Assert . assertEquals ( nRecord , nRecordConsumed . get ( ) ) |
testGetAllActionsForOrganizationNonAdmin ( ) { container . login ( userKey ) ; java . util . List < org . oscm . triggerservice . bean . VOTriggerProcess > list = triggerService . getAllActionsForOrganization ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , list . size ( ) ) |
testIsNietValideNederlandsGemeenteCode ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3GemeenteCode gemeenteCode = new nl . bzk . migratiebrp . conversie . model . lo3 . element . Lo3GemeenteCode ( "a123" ) ; "<AssertPlaceHolder>" ; } isValideNederlandseGemeenteCode ( ) { boolean result = fa... | org . junit . Assert . assertFalse ( gemeenteCode . isValideNederlandseGemeenteCode ( ) ) |
testToString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "HelloRetryRequestMessage:" ) ; sb . append ( "\n<sp>Protocol<sp>Version:<sp>" ) . append ( "null" ) ; sb . append ( "\n<sp>Selected<sp>Cipher<sp>Suite:<sp>" ) . append ( "null" ) ; sb . append ( "\n<sp>Extensions:<s... | org . junit . Assert . assertEquals ( message . toString ( ) , sb . toString ( ) ) |
testMinServices ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = createBasicParams ( ) ; parameters . put ( "min-services" , "2" ) ; org . opennms . netmgt . poller . PollStatus status = monitor . poll ( createMonitor ( ) , parameters ) ; "<AssertPlaceHolder>" ; } isAvailable ( ) { r... | org . junit . Assert . assertTrue ( status . isAvailable ( ) ) |
testSink ( ) { org . apache . edgent . topology . Topology t = newTopology ( "testSink" ) ; java . nio . file . Path tempFile1 = org . apache . edgent . test . connectors . common . FileUtil . createTempFile ( "test1" , ".txt" , new java . lang . String [ 0 ] ) ; System . out . println ( ( ( ( "Test:<sp>" + ( t . getNa... | org . junit . Assert . assertNotNull ( sink ) |
shouldReturnAllActiveStatesForATriggerId ( ) { storage . writeActiveState ( com . spotify . styx . storage . WORKFLOW_INSTANCE , com . spotify . styx . storage . DatastoreStorageTest . FULLY_POPULATED_RUNSTATE ) ; final java . util . Map < com . spotify . styx . model . WorkflowInstance , com . spotify . styx . state .... | org . junit . Assert . assertThat ( activeStates , org . hamcrest . Matchers . is ( java . util . Map . of ( com . spotify . styx . storage . WORKFLOW_INSTANCE , com . spotify . styx . storage . DatastoreStorageTest . FULLY_POPULATED_RUNSTATE ) ) ) |
testZerosLikeOp ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . scalar ( DataType . DOUBLE , 1.0 ) ; org . nd4j . linalg . api . ndarray . INDArray out = org . nd4j . linalg . factory . Nd4j . scalar ( DataType . DOUBLE , ( - 1 ) ) ; org . nd4j . linalg . api . ndarray ... | org . junit . Assert . assertNull ( err ) |
otherHttp ( ) { com . betfair . cougar . transport . impl . protocol . http . DefaultExecutionContextResolverFactory factory = new com . betfair . cougar . transport . impl . protocol . http . DefaultExecutionContextResolverFactory ( ) ; com . betfair . cougar . transport . api . DehydratedExecutionContextResolver < co... | org . junit . Assert . assertTrue ( ( ( resolvers [ 0 ] ) instanceof com . betfair . cougar . transport . impl . protocol . http . HttpIdentityTokenResolver ) ) |
testNifiDnSuffix ( ) { java . lang . String testSuffix = ",<sp>O=apache,<sp>OU=nifi" ; tlsToolkitStandaloneCommandLine . parse ( "-n" , "nifi" , "--nifiDnSuffix" , testSuffix ) ; org . apache . nifi . toolkit . tls . configuration . StandaloneConfig config = tlsToolkitStandaloneCommandLine . createConfig ( ) ; "<Assert... | org . junit . Assert . assertEquals ( testSuffix , config . getDnSuffix ( ) ) |
testFindAll ( ) { java . util . List < org . sculptor . examples . library . media . domain . Library > all = libraryService . findAll ( getServiceContext ( ) ) ; "<AssertPlaceHolder>" ; } getServiceContext ( ) { return org . sculptor . framework . test . AppEngineTestHelper . getServiceContext ( ) ; } | org . junit . Assert . assertEquals ( 3 , all . size ( ) ) |
testIncompatibleSchemaFieldType ( ) { java . io . BufferedWriter writer = com . google . common . io . Files . newWriter ( new java . io . File ( "target/incompatible.csv" ) , CSVSchemaCommand . SCHEMA_CHARSET ) ; writer . append ( "id,username,email\n" ) ; writer . append ( "NaN,test,test@example.com\n" ) ; writer . c... | org . junit . Assert . assertEquals ( 1 , rc ) |
deveObterVersaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFProtocoloEventoCancelamento procEvento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFProtocoloEventoCancelamento ( ) ; procEvento . setVersao ( "1.00" ) ; "<As... | org . junit . Assert . assertEquals ( "1.00" , procEvento . getVersao ( ) ) |
testSelfSimilarityBase ( ) { org . evosuite . testcase . TestCase test = new org . evosuite . testcase . DefaultTestCase ( ) ; double score = org . evosuite . testsuite . similarity . DiversityObserver . getNeedlemanWunschScore ( test , test ) ; "<AssertPlaceHolder>" ; } getNeedlemanWunschScore ( org . evosuite . testc... | org . junit . Assert . assertTrue ( ( score <= 0.0 ) ) |
testRandomUnsignedShortAccess ( ) { for ( int i = 0 ; i < ( ( buffer . capacity ( ) ) - 1 ) ; i += 2 ) { short value = ( ( short ) ( random . nextInt ( ) ) ) ; buffer . setShort ( i , value ) ; } random . setSeed ( seed ) ; for ( int i = 0 ; i < ( ( buffer . capacity ( ) ) - 1 ) ; i += 2 ) { int value = ( random . next... | org . junit . Assert . assertEquals ( value , buffer . getUnsignedShort ( i ) ) |
itShouldbeNullSafe ( ) { spark . QueryParamsMap queryParamsMap = new spark . QueryParamsMap ( ) ; java . lang . String ret = queryParamsMap . get ( "x" ) . get ( "z" ) . get ( "y" ) . value ( "w" ) ; "<AssertPlaceHolder>" ; } value ( java . lang . String [ ] ) { return get ( keys ) . value ( ) ; } | org . junit . Assert . assertNull ( ret ) |
testAddPoolWithAbsentPool ( ) { org . candlepin . dto . api . v1 . ActivationKeyDTO dto = new org . candlepin . dto . api . v1 . ActivationKeyDTO ( ) ; org . candlepin . dto . api . v1 . ActivationKeyDTO . ActivationKeyPoolDTO akPool = new org . candlepin . dto . api . v1 . ActivationKeyDTO . ActivationKeyPoolDTO ( "te... | org . junit . Assert . assertTrue ( dto . addPool ( akPool ) ) |
hasNextIfFullyIteratedButRewound ( ) { testsupport . Mocking . mockIteratorToHaveValues ( iterator , 1 , 2 , 3 ) ; rewindableIterator . next ( ) ; rewindableIterator . next ( ) ; rewindableIterator . next ( ) ; rewindableIterator . rewind ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return iterator . hasNext ( ) ; } | org . junit . Assert . assertThat ( rewindableIterator . hasNext ( ) , org . hamcrest . core . Is . is ( true ) ) |
testSelection_RemoveMultipleItemsAdjustSelection ( ) { combo . add ( "test0" ) ; combo . add ( "test1" ) ; combo . add ( "test2" ) ; combo . select ( 2 ) ; combo . remove ( 0 , 1 ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells... | org . junit . Assert . assertEquals ( 0 , combo . getSelectionIndex ( ) ) |
amendBranchHead_branchHeadShouldBecomeTheSpecifiedCommit ( ) { writeSomethingToCache ( ) ; org . eclipse . jgit . lib . AnyObjectId amendedCommit = commit ( branchHead . getParent ( 0 ) ) ; com . beijunyi . parallelgit . utils . BranchUtils . BranchUtils . amendCommit ( com . beijunyi . parallelgit . utils . BranchUtil... | org . junit . Assert . assertEquals ( amendedCommit , getHeadCommit ( com . beijunyi . parallelgit . utils . BranchUtilsSetBranchHeadTest . TEST_BRANCH , repo ) ) |
testActionRequestsWithIdenticalChildrenAreDuplicates ( ) { java . util . List < org . kuali . rice . kew . actionrequest . ActionRequestValue > actionRequestValues = new java . util . ArrayList < org . kuali . rice . kew . actionrequest . ActionRequestValue > ( ) ; java . util . List < org . kuali . rice . kew . action... | org . junit . Assert . assertEquals ( 1 , deduplicatedActionRequestValues . size ( ) ) |
testBatchExecute ( ) { System . out . println ( "batchExecute" ) ; java . util . List < ? > values = java . util . Arrays . asList ( 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ; com . rhythm . louie . jdbc . JdbcFactory direct = new com . rhythm . louie . jdbc . StandardJdbcFactory ( new com . rhythm . louie . jdbc . MysqlConnectionF... | org . junit . Assert . assertTrue ( ( ( results . size ( ) ) == ( values . size ( ) ) ) ) |
testConstructorCenter2 ( ) { de . nx42 . maps4cim . util . gis . Coordinate center = new de . nx42 . maps4cim . util . gis . Coordinate ( 48.0 , 10.0 ) ; de . nx42 . maps4cim . util . gis . Area result = new de . nx42 . maps4cim . util . gis . Area ( center , 2.0 , 1.0 ) ; de . nx42 . maps4cim . util . gis . Area expRe... | org . junit . Assert . assertEquals ( expResult , result ) |
testShouldLeaveOldListIfObjectDoesntExist ( ) { final java . util . List < org . solovyev . common . collections . multimap . TestObject > listBefore = multimap . asMap ( ) . get ( 3 ) ; multimap . update ( 3 , new org . solovyev . common . collections . multimap . ObjectRemovedUpdater < org . solovyev . common . colle... | org . junit . Assert . assertSame ( listBefore , listAfter ) |
testQueryCollectionSize2 ( ) { java . util . List < org . apache . cxf . jaxrs . ext . search . jpa . Book > books = queryBooks ( "reviews.authors=gt=0" ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . getSize ( ) ; } | org . junit . Assert . assertEquals ( 3 , books . size ( ) ) |
testConvert ( ) { java . lang . String name = "name" ; java . lang . String abbrName = "abbr" ; org . lnu . is . domain . married . type . MarriedType expected = new org . lnu . is . domain . married . type . MarriedType ( ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; org . lnu . is . resource... | org . junit . Assert . assertEquals ( expected , actual ) |
testDefaultValueFieldTypeEmptyType ( ) { java . lang . reflect . Field field = com . j256 . ormlite . field . FieldTypeTest . DefaultEmptyString . class . getDeclaredField ( "defaultBlank" ) ; com . j256 . ormlite . field . FieldType fieldType = com . j256 . ormlite . field . FieldType . createFieldType ( databaseType ... | org . junit . Assert . assertEquals ( "" , fieldType . getDefaultValue ( ) ) |
testCreate ( ) { org . oscarehr . common . model . ConsultationRequest entity = new org . oscarehr . common . model . ConsultationRequest ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; consultDao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) {... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
toJSON_ThemeSetWithColorStops_StopsSerialized ( ) { com . vaadin . addon . charts . model . style . Theme theme = new com . vaadin . addon . charts . model . style . Theme ( ) ; com . vaadin . addon . charts . model . style . GradientColor linear = com . vaadin . addon . charts . model . style . GradientColor . createL... | org . junit . Assert . assertEquals ( expected , toJSON ( options ) ) |
testGetAdvicedResult_NullInput ( ) { java . lang . String expectedNull = "" ; org . pentaho . di . core . util . List < java . lang . String > strings = org . pentaho . di . core . util . Arrays . asList ( expectedNull ) ; for ( java . lang . String string : strings ) { evaluator . evaluateString ( string ) ; } org . p... | org . junit . Assert . assertEquals ( 1 , result . getNrNull ( ) ) |
getMessage ( ) { "<AssertPlaceHolder>" ; } getMessage ( ) { org . junit . Assert . assertEquals ( "a<sp>message" , new com . greensopinion . finance . services . ValidationException ( "a<sp>message" ) . getMessage ( ) ) ; } | org . junit . Assert . assertEquals ( "a<sp>message" , new com . greensopinion . finance . services . ValidationException ( "a<sp>message" ) . getMessage ( ) ) |
testGetRecords ( ) { System . out . println ( "getRecords" ) ; com . sun . btrace . Profiler [ ] expected = new com . sun . btrace . Profiler . Record [ ] { new com . sun . btrace . Profiler . Record ( "r1" ) , new com . sun . btrace . Profiler . Record ( "r2" ) } ; expected [ 0 ] . invocations = 1 ; expected [ 0 ] . s... | org . junit . Assert . assertArrayEquals ( expected , result ) |
testProjection2 ( ) { java . util . List < java . lang . String > projectionFields = java . util . Arrays . asList ( TestConstants . FIRST_NAME , TestConstants . DESCRIPTION ) ; edu . uci . ics . texera . api . schema . Schema projectionSchema = new edu . uci . ics . texera . api . schema . Schema ( edu . uci . ics . t... | org . junit . Assert . assertTrue ( edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResults , returnedResults ) ) |
testSshPassword ( ) { java . nio . file . Path repoPath = directoryPath . resolve ( "testrepo" ) ; elegit . File urlFile = new elegit . File ( ( ( testFileLocation ) + "sshPasswordURL.txt" ) ) ; java . nio . file . Path passwordFile = java . nio . file . Paths . get ( testFileLocation , "sshPasswordPassword.txt" ) ; if... | org . junit . Assert . assertEquals ( helper . getCompatibleAuthentication ( ) , AuthMethod . SSH ) |
testFinalizeComputation ( ) { this . dupIndicator . reset ( ) ; this . testHandle_1 ( ) ; this . dupIndicator . finalizeComputation ( ) ; "<AssertPlaceHolder>" ; } getDuplicateValueCount ( ) { return ( count ) - ( getUniqueValueCount ( ) ) ; } | org . junit . Assert . assertTrue ( ( ( this . dupIndicator . getDuplicateValueCount ( ) ) == 2 ) ) |
testFilterUserNullArray ( ) { com . liferay . portal . kernel . util . ArrayUtilTest . User [ ] array = com . liferay . portal . kernel . util . ArrayUtil . filter ( null , _userPredicate ) ; "<AssertPlaceHolder>" ; } filter ( boolean [ ] , java . util . function . Predicate ) { return com . liferay . portal . kernel .... | org . junit . Assert . assertNull ( array ) |
testSuggestEnabledOnNamedProp ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder rules = builder . child ( org . apache . jackrabbit . oak . plugins . index . search . FulltextIndexConstants . INDEX_RULES ) ; org . apache . jackrabbit . oak . plugins . index . search . TestUtil . child ( rules , "oak:Tes... | org . junit . Assert . assertTrue ( idxDefn . isSuggestEnabled ( ) ) |
testEmpty ( ) { list1 . clear ( ) ; list2 . clear ( ) ; list3 . clear ( ) ; it = new org . zoodb . internal . util . OrderedMergeIterator ( new org . zoodb . internal . util . CloseableIterator [ ] { toCI ( list1 . iterator ( ) ) , toCI ( list2 . iterator ( ) ) , toCI ( list3 . iterator ( ) ) } ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertFalse ( it . hasNext ( ) ) |
testSave ( ) { final org . uberfire . backend . vfs . Path expected = mock ( org . uberfire . backend . vfs . Path . class ) ; final org . uberfire . backend . vfs . Path path = mock ( org . uberfire . backend . vfs . Path . class ) ; final org . uberfire . ext . editor . commons . file . DefaultMetadata metadata = moc... | org . junit . Assert . assertEquals ( expected , actual ) |
testReadEncryptionToken ( ) { java . io . InputStream etkInputStream = test . unit . be . e_contract . mycarenet . etee . EncryptionTokenTest . class . getResourceAsStream ( "/etk-fcorneli.der" ) ; "<AssertPlaceHolder>" ; org . bouncycastle . cms . CMSSignedData cmsSignedData = new org . bouncycastle . cms . CMSSignedD... | org . junit . Assert . assertNotNull ( etkInputStream ) |
getSetTenantId ( ) { final org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl saxmlObjectDataInstanceImpl = new org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl ( ) ; saxmlObjectDataInstanceImpl . setTenantId ( 69 ) ; "<As... | org . junit . Assert . assertEquals ( 69 , saxmlObjectDataInstanceImpl . getTenantId ( ) ) |
eclipseUiIsBuiltWithTychoWhenNotUsingPDE ( ) { org . eclipse . xtext . xtext . wizard . UiProjectDescriptor _uiProject = this . config . getUiProject ( ) ; _uiProject . setEnabled ( true ) ; this . config . setPreferredBuildSystem ( BuildSystem . GRADLE ) ; "<AssertPlaceHolder>" ; } needsTychoBuild ( ) { return ( this ... | org . junit . Assert . assertTrue ( this . config . needsTychoBuild ( ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . polls . model . PollsQuestion missingPollsQuestion = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adapti... | org . junit . Assert . assertNull ( missingPollsQuestion ) |
testNamespace ( ) { java . util . List < org . apache . hadoop . hbase . protobuf . generated . HBaseProtos . SnapshotDescription > snapshotDescriptions ; java . lang . String [ ] argsParam ; com . kakao . hbase . SnapshotArgs args ; com . kakao . hbase . snapshot . Snapshot app ; java . lang . String fullTableName = n... | org . junit . Assert . assertEquals ( 1 , snapshotDescriptions . size ( ) ) |
testFileTransferNotFound ( ) { _sourceFilePath = com . liferay . portal . fabric . netty . fileserver . handlers . FileServerTestUtil . createNotExistFile ( java . nio . file . Paths . get ( "testFile" ) ) ; java . util . concurrent . Future < com . liferay . portal . fabric . netty . fileserver . FileResponse > future... | org . junit . Assert . assertTrue ( fileResponse . isFileNotFound ( ) ) |
testAutoDupTree ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>INT<sp>-><sp>^(ID<sp>INT);\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a" 1 ) + "a" 2 ) ; java . lang . String treeGrammar = "a" 0 + ( ( "options<sp>{output=AST;<sp>ASTLabelType=CommonTree;... | org . junit . Assert . assertEquals ( "a" 4 , found ) |
testSubtitle ( ) { com . urbanairship . api . push . parse . notification . ios . IOSDevicePayload payload = com . urbanairship . api . push . parse . notification . ios . IOSDevicePayload . newBuilder ( ) . setAlert ( "alert" ) . setSubtitle ( "subtitle" ) . build ( ) ; java . lang . String json = com . urbanairship .... | org . junit . Assert . assertEquals ( expected , json ) |
extract2 ( ) { com . querydsl . sql . dml . Map < com . querydsl . core . types . Path < ? > , java . lang . Object > values = DefaultMapper . DEFAULT . createMap ( com . querydsl . sql . dml . DefaultMapperTest . emp , new com . querydsl . sql . dml . EmployeeX ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ... | org . junit . Assert . assertTrue ( values . isEmpty ( ) ) |
testBugReportWithoutFileWithDumpsys ( ) { at . favre . tools . uberadb . ui . Arg parsedArg = at . favre . tools . uberadb . ui . CLIParser . parse ( at . favre . tools . uberadb . ui . CLIParserTest . asArgArray ( ( ( "-" + ( CLIParser . ARG_BUGREPORT ) ) + "<sp>--dumpsysServices<sp>permissions<sp>nfc<sp>connectivity"... | org . junit . Assert . assertEquals ( expectedArg , parsedArg ) |
shouldAllowReadsInReadMode ( ) { org . neo4j . kernel . impl . api . KernelTransactionImplementation tx = newTransaction ( org . neo4j . kernel . api . security . AnonymousContext . read ( ) ) ; org . neo4j . internal . kernel . api . Read reads = tx . dataRead ( ) ; "<AssertPlaceHolder>" ; } dataRead ( ) { assertAllow... | org . junit . Assert . assertNotNull ( reads ) |
testGetSubstructure ( ) { java . lang . String [ ] smarts = new java . lang . String [ ] { "c1ccccc1" , "[CX4H3][#6]" , "[CX2]#[CX2]" } ; org . openscience . cdk . fingerprint . SubstructureFingerprinter printer = new org . openscience . cdk . fingerprint . SubstructureFingerprinter ( smarts ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( printer . getSubstructure ( 1 ) , smarts [ 1 ] ) |
testHashCode ( ) { final int number = 101 ; org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "wiki" , "space" , "document" ) ; org . xwiki . model . reference . DocumentReference classReference = new org . xwiki . model . reference . Docum... | org . junit . Assert . assertEquals ( o1 . hashCode ( ) , o2 . hashCode ( ) ) |
testSecuritySSL ( ) { java . lang . String url = ( "https://localhost:" + ( com . ibm . ws . jaxrs21 . fat . security . ssl . JAXRS21SecuritySSLTest . server . getHttpDefaultSecurePort ( ) ) ) + "/jaxrs21security/ssltest/ssl/get" ; "<AssertPlaceHolder>" ; } SendHttpsGet ( java . lang . String ) { java . lang . String r... | org . junit . Assert . assertNotNull ( com . ibm . ws . jaxrs21 . fat . security . ssl . JAXRS21SecuritySSLTest . SendHttpsGet ( url ) ) |
when_pdroute_pastMaxLoatAtAct2ShouldBe10 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( pickup_delivery_route ) , java . util . Collections . < com . graphhopper . jsprit . core . algorithm . state . Job > emptyList ( ) ) ; com . graphhopper . jsprit . core . algorithm . state . Capacity a... | org . junit . Assert . assertEquals ( 15 , atAct2 . get ( 0 ) ) |
testWordInMultipleFieldsQuery ( ) { java . lang . String query = "lin<sp>clooney" ; java . util . ArrayList < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( TestConstants . FIRST_NAME ) ; attributeNames . add ( TestConstants . LAST_NAME ) ; attributeNames . add ( TestCo... | org . junit . Assert . assertTrue ( contains ) |
testAtomicSumAndReset ( ) { long updatesPerWriter = 10000 ; int numReaders = 3 ; int numWriters = 5 ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newFixedThreadPool ( ( numReaders + numWriters ) ) ; java . util . concurrent . atomic . AtomicBoolean doneWriting = new java... | org . junit . Assert . assertThat ( count , org . hamcrest . Matchers . equalTo ( ( numWriters * updatesPerWriter ) ) ) |
testRemoveUsername ( ) { java . lang . String tweet = "@PrincessSuperC<sp>Hey<sp>Cici" ; com . github . pmerienne . trident . ml . preprocessing . TwitterTokenizer tokenizer = new com . github . pmerienne . trident . ml . preprocessing . TwitterTokenizer ( ) ; java . util . List < java . lang . String > actualTokens = ... | org . junit . Assert . assertEquals ( expectedTokens , actualTokens ) |
shouldRemoveDoubleNegation ( ) { org . neo4j . codegen . Expression expression = org . neo4j . codegen . Expression . invoke ( org . neo4j . codegen . MethodReference . methodReference ( getClass ( ) , boolean . class , "TRUE" ) ) ; "<AssertPlaceHolder>" ; } not ( org . neo4j . codegen . Expression ) { result . append ... | org . junit . Assert . assertSame ( expression , org . neo4j . codegen . Expression . not ( org . neo4j . codegen . Expression . not ( expression ) ) ) |
whenDefaults ( ) { final java . lang . Class < ? > cls = org . apache . isis . core . metamodel . facets . object . domainobjectlayout . DomainObjectLayoutFactoryTest . CustomerWithDefaults . class ; facetFactory . process ( new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessClassContext ( cls ... | org . junit . Assert . assertNull ( facet ) |
testOneFieldMatches ( ) { japicmp . filter . JavadocLikeFieldFilter fieldFilter = new japicmp . filter . JavadocLikeFieldFilter ( "japicmp.Test#field" ) ; javassist . CtClass ctClass = japicmp . util . CtClassBuilder . create ( ) . name ( "japicmp.Test" ) . addToClassPool ( new javassist . ClassPool ( ) ) ; javassist .... | org . junit . Assert . assertThat ( fieldFilter . matches ( ctField ) , org . hamcrest . core . Is . is ( true ) ) |
createDeepCopyFromOriginalBitmap ( ) { bogdan . imagefilters . effect . bitmap . SimpleBitmap duplicateBitmap = ( ( bogdan . imagefilters . effect . bitmap . SimpleBitmap ) ( bogdan . imagefilters . effect . bitmap . SimpleBitmapTest . bitmap . duplicate ( ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object... | org . junit . Assert . assertTrue ( bogdan . imagefilters . effect . bitmap . SimpleBitmapTest . bitmap . equals ( duplicateBitmap ) ) |
testWithAString ( ) { getBlock1 ( ) . setValue ( "" ) ; "<AssertPlaceHolder>" ; } getBlock1 ( ) { return block1 ; } | org . junit . Assert . assertEquals ( "" , getBlock1 ( ) . getValue ( ) ) |
testKeyIndexHack ( ) { org . junit . Assume . assumeTrue ( test2i ) ; com . basho . riak . client . core . operations . SecondaryIndexQueryOperation . Query query = new com . basho . riak . client . core . operations . SecondaryIndexQueryOperation . Query . Builder ( com . basho . riak . client . core . operations . it... | org . junit . Assert . assertEquals ( 10 , response . getEntryList ( ) . size ( ) ) |
testMultithreadSinglePartition ( ) { com . jolbox . bonecp . CommonTestUtils . logTestInfo ( "Test<sp>multiple<sp>threads<sp>hitting<sp>a<sp>single<sp>partition<sp>concurrently" ) ; config . setAcquireIncrement ( 5 ) ; config . setMinConnectionsPerPartition ( 30 ) ; config . setMaxConnectionsPerPartition ( 100 ) ; conf... | org . junit . Assert . assertEquals ( 0 , dsb . getTotalLeased ( ) ) |
invokesProcessors ( ) { this . mocker . registerComponent ( org . phenotips . security . audit . spi . AuditEventProcessor . class , this . processor ) ; org . phenotips . security . audit . AuditEvent e = new org . phenotips . security . audit . AuditEvent ( ) ; org . mockito . Mockito . when ( this . processor . proc... | org . junit . Assert . assertSame ( e , captor . getValue ( ) ) |
testGetUserById ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/UserServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . UserService userService = argusService . getUserService ( ) ; com . salesforce... | org . junit . Assert . assertEquals ( expected , result ) |
testSortedEntries4 ( ) { tl . lin . data . map . HMapIL m = new tl . lin . data . map . HMapIL ( ) ; tl . lin . data . map . MapIL [ ] e = m . getEntriesSortedByValue ( ) ; "<AssertPlaceHolder>" ; } getEntriesSortedByValue ( ) { if ( ( this . size ( ) ) == 0 ) return null ; it . unimi . dsi . fastutil . ints . Int2Floa... | org . junit . Assert . assertTrue ( ( e == null ) ) |
createInput ( ) { profile . add ( "root" , com . asakusafw . runtime . directio . hadoop . HadoopDataSource . class , "/" ) ; profile . add ( "root" , HadoopDataSourceProfile . KEY_PATH , folder . getRoot ( ) . toURI ( ) . toURL ( ) . toString ( ) ) ; profile . put ( ) ; put ( "base/output.txt" , "Hello,<sp>world!" ) ;... | org . junit . Assert . assertThat ( list , is ( java . util . Arrays . asList ( "Hello,<sp>world!" ) ) ) |
roundTripPojoWithOptionals ( ) { com . owlike . genson . ext . guava . OptionalSerDeserTest . Pojo expected = new com . owlike . genson . ext . guava . OptionalSerDeserTest . Pojo ( com . google . common . base . Optional . of ( 1 ) , com . google . common . base . Optional . < com . owlike . genson . ext . guava . Opt... | org . junit . Assert . assertEquals ( expected , actual ) |
testDifference ( ) { org . onosproject . net . resource . DiscreteResource res1 = org . onosproject . net . resource . Resources . discrete ( org . onosproject . store . resource . impl . EncodedDiscreteResourcesTest . DID , org . onosproject . store . resource . impl . EncodedDiscreteResourcesTest . PN , org . onospro... | org . junit . Assert . assertThat ( sut . difference ( other ) , org . hamcrest . Matchers . is ( org . onosproject . store . resource . impl . EncodedDiscreteResources . of ( com . google . common . collect . ImmutableSet . of ( res2 ) , new org . onosproject . store . resource . impl . VlanIdCodec ( ) ) ) ) |
testLastIndexOf09 ( ) { java . lang . Number _NaN = org . stjs . javascript . JSGlobal . NaN ; org . stjs . javascript . Array < java . lang . Object > a = new org . stjs . javascript . Array < java . lang . Object > ( "NaN" , _NaN , org . stjs . javascript . JSGlobal . NaN , null , 0 , false , null , "false" ) ; "<Ass... | org . junit . Assert . assertEquals ( ( - 1 ) , a . lastIndexOf ( org . stjs . javascript . JSGlobal . NaN ) ) |
testWrongFormat ( ) { boolean raises = false ; java . util . Date now = new java . util . Date ( ) ; try { org . nuxeo . ecm . platform . audit . api . query . DateRangeParser . parseDateRangeQuery ( now , "xh" ) ; } catch ( org . nuxeo . ecm . platform . audit . api . query . AuditQueryException e ) { raises = true ; ... | org . junit . Assert . assertTrue ( raises ) |
assertContainDataSourceNameWithMasterDataSourceName ( ) { org . apache . shardingsphere . core . rule . MasterSlaveRule actual = new org . apache . shardingsphere . core . rule . MasterSlaveRule ( new org . apache . shardingsphere . api . config . masterslave . MasterSlaveRuleConfiguration ( "master_slave" , "master_ds... | org . junit . Assert . assertTrue ( actual . containDataSourceName ( "master_ds" ) ) |
testAnnotationEmpty ( ) { com . baidu . unbiz . fluentvalidator . dto . Person person = getValidPerson ( ) ; com . baidu . unbiz . fluentvalidator . Result ret = com . baidu . unbiz . fluentvalidator . FluentValidator . checkAll ( ) . configure ( new com . baidu . unbiz . fluentvalidator . registry . impl . SimpleRegis... | org . junit . Assert . assertThat ( ret . isSuccess ( ) , org . hamcrest . core . Is . is ( true ) ) |
testCEPOperatorSideOutputLateElementsEventTime ( ) { org . apache . flink . cep . Event startEvent = new org . apache . flink . cep . Event ( 41 , "c" , 1.0 ) ; org . apache . flink . cep . Event middle1Event1 = new org . apache . flink . cep . Event ( 41 , "a" , 2.0 ) ; org . apache . flink . cep . Event middle1Event2... | org . junit . Assert . assertArrayEquals ( expected . toArray ( ) , late . toArray ( ) ) |
testIsWorkItemSetWhenWorkItemDefinitionIsNull ( ) { when ( editingCol . getWorkItemDefinition ( ) ) . thenReturn ( null ) ; final java . lang . Boolean isWorkItemSet = plugin . isWorkItemSet ( ) ; "<AssertPlaceHolder>" ; } isWorkItemSet ( ) { return isWorkItemPageCompleted ( ) ; } | org . junit . Assert . assertFalse ( isWorkItemSet ) |
testExistingName ( ) { java . lang . String propertyName = "name" ; boolean result = org . openl . rules . table . properties . inherit . PropertiesChecker . isPropertySuitableForLevel ( InheritanceLevel . TABLE , propertyName ) ; "<AssertPlaceHolder>" ; } isPropertySuitableForLevel ( org . openl . rules . table . prop... | org . junit . Assert . assertTrue ( result ) |
testInvalidOffset ( ) { try { java . lang . String queryString = "offset=four" ; java . net . URI requestUri = new java . net . URI ( ( ( ( org . slc . sli . api . service . query . ApiQueryTest . URI_STRING ) + "?" ) + queryString ) ) ; when ( uriInfo . getRequestUri ( ) ) . thenReturn ( requestUri ) ; } catch ( java ... | org . junit . Assert . assertTrue ( false ) |
canReturnAndBorrowWorkersWhileStartingUpOtherWorkers ( ) { java . util . concurrent . SynchronousQueue < java . util . concurrent . Future < com . facebook . buck . worker . WorkerProcess > > workers = new java . util . concurrent . SynchronousQueue ( ) ; com . facebook . buck . worker . WorkerProcessPool pool = com . ... | org . junit . Assert . assertThat ( secondBorrowedWorker . get ( ) , org . hamcrest . Matchers . is ( firstBorrowedWorker . get ( ) ) ) |
testHashCode ( ) { org . terasoluna . gfw . common . codepoints . CodePoints cp1 = new org . terasoluna . gfw . common . codepoints . CodePoints ( "ABCD" ) ; org . terasoluna . gfw . common . codepoints . CodePoints cp2 = new org . terasoluna . gfw . common . codepoints . CodePoints ( "ABCD" ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertThat ( cp1 . hashCode ( ) , org . hamcrest . CoreMatchers . is ( cp2 . hashCode ( ) ) ) |
testConvertToValidPath_1 ( ) { java . lang . String path = "/" ; java . lang . String result = com . impetus . ankush . common . utils . FileNameUtils . convertToValidPath ( path ) ; "<AssertPlaceHolder>" ; } convertToValidPath ( java . lang . String ) { if ( path == null ) { return path ; } if ( path . endsWith ( "/" ... | org . junit . Assert . assertEquals ( "/" , result ) |
shouldNotRunAnyChangeSet ( ) { runner . setSpringEnvironment ( new com . github . mongobee . resources . EnvironmentMock ( "foobar" ) ) ; runner . setChangeLogsScanPackage ( com . github . mongobee . test . profiles . dev . ProfiledDevChangeLog . class . getPackage ( ) . getName ( ) ) ; when ( dao . isNewChange ( any (... | org . junit . Assert . assertEquals ( 0 , changes ) |
testSetBigDecimalintBigDecimal ( ) { stmt . prepare ( ( ( org . eclipse . birt . report . data . oda . jdbc . StatementTest . SELECT_SQL ) + "<sp>where<sp>col0<sp>=<sp>?" ) ) ; stmt . setBigDecimal ( 1 , new java . math . BigDecimal ( "1111" ) ) ; org . eclipse . birt . report . data . oda . jdbc . ResultSet rs = ( ( o... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
convert_when_TextMessage_has_JMSPriority ( ) { int jmsPriority = 1 ; javax . jms . TextMessage message = new org . apache . activemq . command . ActiveMQTextMessage ( ) ; message . setJMSPriority ( jmsPriority ) ; javax . jms . TextMessage result = uut . convert ( message ) ; "<AssertPlaceHolder>" ; } getJMSPriority ( ... | org . junit . Assert . assertEquals ( jmsPriority , result . getJMSPriority ( ) ) |
testPing ( ) { when ( solrClientMock . ping ( ) ) . thenReturn ( new org . apache . solr . client . solrj . response . SolrPingResponse ( ) ) ; org . apache . solr . client . solrj . response . SolrPingResponse pingResult = solrTemplate . ping ( ) ; "<AssertPlaceHolder>" ; verify ( solrClientMock , times ( 1 ) ) . ping... | org . junit . Assert . assertNotNull ( pingResult ) |
shouldReturnTimestampInSeconds ( ) { final java . lang . String expected = "1000" ; "<AssertPlaceHolder>" ; } getTimestampInSeconds ( ) { return java . lang . String . valueOf ( getTs ( ) ) ; } | org . junit . Assert . assertEquals ( expected , service . getTimestampInSeconds ( ) ) |
AccessStaticVariableIndirectIndirect_MethodVarVar ( ) { java . lang . String fromClass = "domain.indirect.violatingfrom.AccessStaticVariableIndirectIndirect_MethodVarVar" ; java . lang . String toClass = "domain.indirect.indirectto.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . ... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) ) |
receiveInvalidLengthMessage ( ) { final org . xnio . ByteBufferSlicePool pool = new org . xnio . ByteBufferSlicePool ( org . xnio . BufferAllocator . BYTE_BUFFER_ALLOCATOR , 10 , ( 10 * 16 ) ) ; final org . xnio . channels . FramedMessageChannel channel = new org . xnio . channels . FramedMessageChannel ( connectedChan... | org . junit . Assert . assertTrue ( failed ) |
checkSortedFalseDefault ( ) { java . util . Map < java . lang . String , java . lang . String [ ] > parameters = new java . util . HashMap < java . lang . String , java . lang . String [ ] > ( ) ; jrds . webapp . ParamsBean pb = new jrds . webapp . ParamsBean ( jrds . mockobjects . GetMoke . getRequest ( parameters ) ,... | org . junit . Assert . assertTrue ( ( ! ( pb . isSorted ( ) ) ) ) |
testConvertRegister ( ) { java . lang . String key = "perf/dubbo.test.api.HelloService:1.0.0" ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > register = new java . util . HashMap < java . lang . String , java . util . Map < java . lang . String , java . l... | org . junit . Assert . assertEquals ( register , newRegister ) |
testType ( ) { for ( org . eclipse . californium . core . coap . CoAP . Type type : org . eclipse . californium . core . coap . CoAP . Type . values ( ) ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertEquals ( type , org . eclipse . californium . core . coap . CoAP . Type . valueOf ( type . value ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.