input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSetRow ( ) { org . apache . commons . math . linear . FieldMatrix < org . apache . commons . math . fraction . Fraction > m = new org . apache . commons . math . linear . Array2DRowFieldMatrix < org . apache . commons . math . fraction . Fraction > ( subTestData ) ; "<AssertPlaceHolder>" ; m . setRow ( 0 , subRow3 ... | org . junit . Assert . assertTrue ( ( ( subRow3 [ 0 ] [ 0 ] ) != ( m . getRow ( 0 ) [ 0 ] ) ) ) |
getDailySnapshot ( ) { com . pinterest . soundwave . resources . DailySnapshot snapshot = new com . pinterest . soundwave . resources . DailySnapshot ( ) ; javax . ws . rs . core . Response resp = snapshot . getDailySnapshot ( "2016-12-12" ) ; "<AssertPlaceHolder>" ; } getDailySnapshot ( java . lang . String ) { com . ... | org . junit . Assert . assertNotNull ( resp ) |
testGetGroupVocabulariesPaginatedWithNoVocabulariesCreatesDefaultVocabulary ( ) { java . util . List < com . liferay . asset . kernel . model . AssetVocabulary > vocabularies = com . liferay . asset . kernel . service . AssetVocabularyServiceUtil . getGroupVocabularies ( _group . getGroupId ( ) , true , QueryUtil . ALL... | org . junit . Assert . assertEquals ( vocabularies . toString ( ) , 1 , vocabularies . size ( ) ) |
getMaxRegisteredUsersCount_configurationSetting ( ) { long isExceed = bean . getMaxRegisteredUsersCount ( ) ; "<AssertPlaceHolder>" ; } getMaxRegisteredUsersCount ( ) { if ( ( maxRegisteredUsersCount ) == null ) { org . oscm . internal . vo . VOConfigurationSetting configurationSetting = getConfigurationService ( ) . g... | org . junit . Assert . assertEquals ( 5 , isExceed ) |
checkGetItemType ( ) { org . eclipse . ice . caebat . batml . BatMLModelBuilder batMLBuilder = new org . eclipse . ice . caebat . batml . BatMLModelBuilder ( ) ; "<AssertPlaceHolder>" ; } getItemType ( ) { return org . eclipse . ice . item . ItemType . Model ; } | org . junit . Assert . assertEquals ( ItemType . Model , batMLBuilder . getItemType ( ) ) |
testChooseExcessReplicasToDelete ( ) { cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( org . apache . hadoop . hdfs . server . blockmanagement . TestReconstructStripedBlocksWithRackAwareness . conf ) . racks ( racks ) . hosts ( hosts ) . numDataNodes ( hosts . length ) . build ( ) ; cluster . wa... | org . junit . Assert . assertFalse ( dn . getHostName ( ) . equals ( "host1" ) ) |
testClusterWithEnhancedJmsOptions ( ) { java . lang . String clusterName = "cluster" + ( generateRandomString ( ) ) ; gotoClusterPage ( ) ; clickByIdAction ( "propertyForm:basicTable:topActionsGroup1:addSharedTableButton" 6 ) ; sendKeysByIdAction ( "propertyForm:basicTable:topActionsGroup1:addSharedTableButton" 0 , clu... | org . junit . Assert . assertEquals ( clusterName , getText ( "propertyForm:basicTable:topActionsGroup1:addSharedTableButton" 4 ) ) |
isCustomerExportButtonDisabled_missingMandatoryFields ( ) { model . setFromDate ( new java . util . Date ( ) ) ; model . setToDate ( new java . util . Date ( ) ) ; boolean result = ctrl . isCustomerExportButtonDisabled ( ) ; "<AssertPlaceHolder>" ; } isCustomerExportButtonDisabled ( ) { if ( ( ( ( model . getFromDate (... | org . junit . Assert . assertTrue ( result ) |
createPCJ_cancelledPrompt ( ) { final java . lang . String instanceName = "unitTest" ; final org . apache . rya . api . client . RyaClient mockCommands = mock ( org . apache . rya . api . client . RyaClient . class ) ; final org . apache . rya . shell . SharedShellState state = new org . apache . rya . shell . SharedSh... | org . junit . Assert . assertEquals ( expected , message ) |
test_is53WeekYear ( int ) { org . threeten . extra . YearWeek yearWeek = org . threeten . extra . YearWeek . of ( year , 1 ) ; "<AssertPlaceHolder>" ; } is53WeekYear ( ) { return ( org . threeten . extra . YearWeek . weekRange ( year ) ) == 53 ; } | org . junit . Assert . assertTrue ( yearWeek . is53WeekYear ( ) ) |
testRoundTrip ( ) { for ( java . lang . String x : org . sakaiproject . basiclti . util . BlowFishTest . strings ) { java . lang . String enc = org . sakaiproject . basiclti . util . BlowFish . encrypt ( str2hex ( "this<sp>is<sp>the<sp>key" ) , x ) ; java . lang . String dec = org . sakaiproject . basiclti . util . Blo... | org . junit . Assert . assertTrue ( x . equals ( dec ) ) |
testUnderscoredToJava3 ( ) { java . lang . String expected = "lastName" ; "<AssertPlaceHolder>" ; } underscoredToJava ( java . lang . String , boolean ) { java . util . StringTokenizer st = new java . util . StringTokenizer ( name , "_" ) ; java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; boolean... | org . junit . Assert . assertEquals ( expected , org . apache . cayenne . util . Util . underscoredToJava ( "lastName" , false ) ) |
testFailureCompressionNotWorking ( ) { if ( skip ) return ; long rawDataSize = writeRecords ( ( 10 * ( records1stBlock ) ) , false ) ; if ( ! ( compression . equalsIgnoreCase ( Compression . Algorithm . NONE . getName ( ) ) ) ) { "<AssertPlaceHolder>" ; } closeOutput ( ) ; } getPos ( ) { return currentPos ; } | org . junit . Assert . assertTrue ( ( ( out . getPos ( ) ) < rawDataSize ) ) |
test ( ) { org . spf4j . zel . vm . Program prog = org . spf4j . zel . vm . Program . compile ( "a<sp>like<sp>'.*bula.*'" , "a" ) ; org . spf4j . zel . vm . LikeTest . LOG . debug ( "Program<sp>=<sp>{}" , prog ) ; java . lang . Boolean result = ( ( java . lang . Boolean ) ( prog . execute ( "balabulan" ) ) ) ; "<Assert... | org . junit . Assert . assertTrue ( result ) |
testMzDB ( ) { java . io . File fileName = new java . io . File ( ( ( io . github . msdk . io . filetypedetection . FileTypeDetectionAlgorithmTest . TEST_DATA_PATH ) + "OVEMB150205_12.raw.0.9.8_truncated.mzDB" ) ) ; io . github . msdk . datamodel . FileType fileType = io . github . msdk . io . filetypedetection . FileT... | org . junit . Assert . assertEquals ( FileType . MZDB , fileType ) |
restFieldInjected ( ) { final java . lang . Boolean response = org . apache . cxf . jaxrs . client . WebClient . create ( ( ( "http://localhost:" + ( org . apache . openejb . server . cxf . rs . EjbDeploymentTest . port ) ) + "/openejb-cxf-rs" ) ) . path ( "/ejb/field" ) . accept ( MediaType . TEXT_PLAIN_TYPE ) . get (... | org . junit . Assert . assertEquals ( true , response ) |
testDefaultTomatoIcon ( ) { org . tomighty . resources . Image defaultIcon = mock ( org . tomighty . resources . Image . class ) ; when ( resources . image ( resourceName ( TrayIcons . DEFAULT_ICON_SIZE ) ) ) . thenReturn ( defaultIcon ) ; org . tomighty . resources . Image icon = trayIcons . tomato ( ) ; "<AssertPlace... | org . junit . Assert . assertThat ( icon , org . hamcrest . CoreMatchers . equalTo ( defaultIcon ) ) |
testSubscriptionWithInvalidCriteria ( ) { ca . uhn . fhir . jpa . dao . BaseHapiFhirDao . setValidationDisabledForUnitTest ( true ) ; org . hl7 . fhir . dstu3 . model . Subscription s = new org . hl7 . fhir . dstu3 . model . Subscription ( ) ; s . setStatus ( Subscription . SubscriptionStatus . REQUESTED ) ; s . getCha... | org . junit . Assert . assertNotNull ( id . getIdPart ( ) ) |
testMissingRegionName ( ) { java . lang . String dir = getRandomDir ( ) ; java . lang . String g = "@t.()<sp>::=<sp>\"\"\n" ; writeFile ( dir , "g.stg" , g ) ; org . stringtemplate . v4 . test . STGroupFile group = new org . stringtemplate . v4 . test . STGroupFile ( ( dir + "/g.stg" ) ) ; org . stringtemplate . v4 . m... | org . junit . Assert . assertEquals ( expected , result ) |
getUserLocaleUpdated_session_user_null ( ) { doReturn ( null ) . when ( bean ) . getUserFromSessionWithoutException ( ) ; doReturn ( voUser ) . when ( idService ) . getCurrentUserDetailsIfPresent ( ) ; bean . getUserLocaleUpdated ( ) ; "<AssertPlaceHolder>" ; verify ( bean , never ( ) ) . getActiveLocales ( ) ; } getEr... | org . junit . Assert . assertFalse ( bean . getErrorPanelForLocaleShow ( ) ) |
testSearchOwnerConsumersNoMatches ( ) { org . candlepin . model . Consumer consumer = new org . candlepin . model . Consumer ( "testConsumer" , "testUser" , owner , ct ) ; java . util . Map < java . lang . String , java . lang . String > facts = new java . util . HashMap ( ) ; facts . put ( "testkey" , "testval" ) ; fa... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testCountingBloomFilter3 ( ) { final int countingSize = 10 ; int [ ] counting = new int [ countingSize ] ; net . tomp2p . rpc . CountingBloomFilter < java . lang . String > cbs = new net . tomp2p . rpc . CountingBloomFilter < java . lang . String > ( bfSize , counting ) ; cbs . add ( "abc" ) ; cbs . add ( "abc" ) ; cbs... | org . junit . Assert . assertEquals ( true , cbs . contains ( "abc" ) ) |
tesDataIsImportedWithConfiguredTypeName ( ) { try { configuration . getOutputFeature ( ) . setTypeName ( "renamed" ) ; executeAction ( "shp" ) ; "<AssertPlaceHolder>" ; } catch ( it . geosolutions . geobatch . flow . event . action . ActionException e ) { org . junit . Assert . fail ( ( "Action<sp>failure<sp>in<sp>exec... | org . junit . Assert . assertTrue ( ( ( getRecordCountFromDatabase ( "renamed" ) ) > 0 ) ) |
testGetContentDiffURL ( ) { org . nuxeo . ecm . core . api . DocumentModel leftDoc = createDoc ( session , "leftDoc" , "File" , "Left<sp>doc" ) ; org . nuxeo . ecm . core . api . DocumentModel rightDoc = createDoc ( session , "rightDoc" , "File" , "Right<sp>doc" ) ; java . lang . String contentDiffURL = org . nuxeo . e... | org . junit . Assert . assertEquals ( sb . toString ( ) , contentDiffURL ) |
testExceptionOnLostJobOutput ( ) { org . apache . kylin . job . execution . ExecutableManager manager = org . apache . kylin . job . execution . ExecutableManager . getInstance ( jobService . getConfig ( ) ) ; org . apache . kylin . job . execution . AbstractExecutable executable = new org . apache . kylin . rest . ser... | org . junit . Assert . assertEquals ( 0 , jobs . size ( ) ) |
testNumErrors ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testNumErrors" ) ; org . eclipse . linuxtools . valgrind . core . IValgrindMessage [ ] messages = org . eclipse . linuxtools . internal . valgrind . ui . ValgrindUIPlugin... | org . junit . Assert . assertEquals ( 3 , messages . length ) |
testVoerStapUitRootobjectIsFoutief ( ) { final nl . bzk . brp . model . bericht . kern . ActieBericht actieBericht = getOnderwerp ( ) . getAdministratieveHandeling ( ) . getHoofdActie ( ) ; actieBericht . setRootObject ( new nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht ( ) ) ; final boo... | org . junit . Assert . assertFalse ( stapResultaat ) |
testGetRow ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Value value = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Value . class ) ; mmarquee . automation . pattern... | org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 2 ) ) |
testExplicitDocumentIdSingleResult ( ) { org . hibernate . search . test . id . Article hello = new org . hibernate . search . test . id . Article ( ) ; hello . setDocumentId ( 1 ) ; hello . setText ( "Hello<sp>World" ) ; org . hibernate . Session s = openSession ( ) ; org . hibernate . Transaction tx = s . beginTransa... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
isNotAlias ( ) { com . addthis . bundle . core . Bundle bundle = new com . addthis . bundle . core . list . ListBundle ( ) ; com . addthis . hydra . data . filter . bundle . unary . BundleFilterUnary filter = ( ( com . addthis . hydra . data . filter . bundle . unary . BundleFilterUnary ) ( com . addthis . codec . conf... | org . junit . Assert . assertTrue ( filter . filter ( bundle ) ) |
testStreamRangeClosedStartGreaterThanEnd ( ) { "<AssertPlaceHolder>" ; } rangeClosed ( long , long ) { if ( startInclusive > endInclusive ) { return com . annimon . stream . LongStream . empty ( ) ; } else if ( startInclusive == endInclusive ) { return com . annimon . stream . LongStream . of ( startInclusive ) ; } els... | org . junit . Assert . assertThat ( com . annimon . stream . LongStream . rangeClosed ( 5 , 1 ) , isEmpty ( ) ) |
testRevokeSystemPermission ( ) { datawave . webservice . result . VoidResponse voidResponse = permissionsBean . revokeSystemPermission ( "test" , "GRANT" ) ; "<AssertPlaceHolder>" ; } revokeSystemPermission ( java . lang . String , org . apache . accumulo . core . security . SystemPermission ) { datawave . accumulo . i... | org . junit . Assert . assertNotNull ( voidResponse ) |
validSeldonDeploymentTest ( ) { createMocks ( "src/test/resources/model_simple.json" ) ; io . seldon . clustermanager . k8s . KubeCRDHandler crdHandler = new io . seldon . clustermanager . k8s . KubeCRDHandlerImpl ( mockK8sApiProvider , mockK8sClientProvider , props ) ; io . seldon . protos . DeploymentProtos . SeldonD... | org . junit . Assert . assertNotNull ( sDep ) |
areEqual ( ) { com . clouway . oauth2 . Session session1 = new com . clouway . oauth2 . Session ( "session" ) ; com . clouway . oauth2 . Session session2 = new com . clouway . oauth2 . Session ( "session" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( session1 , org . hamcrest . Matchers . is ( session2 ) ) |
should_add_vote ( ) { votingMachine . register ( votable , new org . mamute . model . Vote ( voter , org . mamute . model . VoteType . UP ) , org . mamute . model . Question . class ) ; "<AssertPlaceHolder>" ; } getVoteCount ( ) { return voteCount ; } | org . junit . Assert . assertEquals ( 1 , votable . getVoteCount ( ) ) |
testSetSelectable_returnsCell ( ) { org . eclipse . rap . rwt . template . Cell < ? > cell = new org . eclipse . rap . rwt . template . TestCell ( template , "foo" ) ; org . eclipse . rap . rwt . template . Cell < ? > actualCell = cell . setSelectable ( true ) ; "<AssertPlaceHolder>" ; } setSelectable ( boolean ) { isS... | org . junit . Assert . assertSame ( cell , actualCell ) |
testHomolyticCleavageReaction ( ) { org . openscience . cdk . reaction . IReactionProcess type = new org . openscience . cdk . reaction . type . HomolyticCleavageReaction ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( type ) |
testSample ( ) { com . handu . skye . Sampler sampler = new com . handu . skye . sampler . DefaultSampler ( ) ; boolean isSample = sampler . isSample ( ) ; "<AssertPlaceHolder>" ; } isSample ( ) { java . lang . String traceId = com . handu . skye . Tracer . getTraceId ( ) ; int hash = traceId . hashCode ( ) ; return ( ... | org . junit . Assert . assertTrue ( isSample ) |
fetchItems ( ) { itemProvider . addItems ( book . twju . chapter_3 . Listing_5_Mockito_SessionStoreStub_TimelineTest . FIRST_ITEM , book . twju . chapter_3 . Listing_5_Mockito_SessionStoreStub_TimelineTest . SECOND_ITEM , book . twju . chapter_3 . Listing_5_Mockito_SessionStoreStub_TimelineTest . THIRD_ITEM ) ; timelin... | org . junit . Assert . assertArrayEquals ( new book . twju . chapter_3 . Item [ ] { book . twju . chapter_3 . Listing_5_Mockito_SessionStoreStub_TimelineTest . THIRD_ITEM , book . twju . chapter_3 . Listing_5_Mockito_SessionStoreStub_TimelineTest . SECOND_ITEM } , actual . toArray ( new book . twju . chapter_3 . Item [... |
testEqualsObjectNotEqualsPort ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
TwoCollisionsEquals ( ) { org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue hash98304_obj1 = new org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue ( 1 , 98304 ) ; org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue hash98304_obj2 = new org . eclipse ... | org . junit . Assert . assertEquals ( xs , ys ) |
testParse_3 ( ) { com . google . gson . Gson gson = new com . google . gson . Gson ( ) ; java . lang . String json = "" ; org . jinstagram . entity . common . InstagramErrorResponse result = org . jinstagram . entity . common . InstagramErrorResponse . parse ( gson , json ) ; "<AssertPlaceHolder>" ; } parse ( com . goo... | org . junit . Assert . assertNotNull ( result ) |
testGetTableListIssue194 ( ) { java . lang . String sql = "SELECT<sp>1" ; net . sf . jsqlparser . statement . Statement statement = net . sf . jsqlparser . util . TablesNamesFinderTest . pm . parse ( new java . io . StringReader ( sql ) ) ; net . sf . jsqlparser . statement . select . Select selectStatement = ( ( net .... | org . junit . Assert . assertEquals ( 0 , tableList . size ( ) ) |
testOnAnd_True ( ) { this . codeGenerator . onConstant ( Variable . TRUE ) ; this . codeGenerator . onAndLeft ( null ) ; this . codeGenerator . onConstant ( Variable . TRUE ) ; this . codeGenerator . onAndRight ( null ) ; java . lang . Object result = this . eval ( new java . util . HashMap < java . lang . String , jav... | org . junit . Assert . assertEquals ( Boolean . TRUE , result ) |
shouldUseSpecifiedEncodingWhenReadingGNULongNames ( ) { final java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; final java . lang . String encoding = org . apache . commons . compress . utils . CharsetNames . UTF_16 ; final java . lang . String name = "123456789012345678901234567890123... | org . junit . Assert . assertEquals ( name , t . getName ( ) ) |
properlyFlushStaleValues ( ) { org . apache . beam . sdk . util . MovingFunction f = newFunc ( ) ; f . add ( 0 , 1 ) ; f . add ( ( ( org . apache . beam . sdk . util . MovingFunctionTest . SAMPLE_PERIOD ) * 3 ) , 1 ) ; "<AssertPlaceHolder>" ; } get ( org . apache . beam . sdk . values . TupleTag ) { return org . apache... | org . junit . Assert . assertEquals ( 1 , f . get ( ( ( org . apache . beam . sdk . util . MovingFunctionTest . SAMPLE_PERIOD ) * 3 ) ) ) |
testGetAdministratorsNegative ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . Organization org = org . oscm . test . data . Organizations . createOrganization ( mgr ) ... | org . junit . Assert . assertEquals ( 0 , query . getResultList ( ) . size ( ) ) |
testDecodeNullObject ( ) { org . apache . commons . codec . net . PercentCodec percentCodec = new org . apache . commons . codec . net . PercentCodec ( ) ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { return org . apache . commons . codec . binary . BinaryCodec . fromAscii ( ascii ) ; } | org . junit . Assert . assertEquals ( percentCodec . decode ( ( ( java . lang . Object ) ( null ) ) ) , null ) |
testConditionsOnBranches ( ) { io . cdap . cdap . etl . planner . Dag dag = new io . cdap . cdap . etl . planner . Dag ( com . google . common . collect . ImmutableSet . of ( new io . cdap . cdap . etl . proto . Connection ( "n1" , "c1" ) , new io . cdap . cdap . etl . proto . Connection ( "n1" , "n4" ) , new io . cdap... | org . junit . Assert . assertEquals ( expected , actual ) |
movingSum ( ) { org . apache . beam . sdk . util . BucketingFunction f = newFunc ( ) ; int lost = 0 ; for ( int i = 0 ; i < 200 ; i ++ ) { f . add ( i , 1 ) ; if ( i >= 100 ) { f . remove ( ( i - 100 ) ) ; if ( ( i % ( org . apache . beam . sdk . util . BucketingFunctionTest . BUCKET_WIDTH ) ) == ( ( org . apache . bea... | org . junit . Assert . assertEquals ( ( ( i + 1 ) - lost ) , f . get ( ) ) |
testConditionalUpdateResultsInUpdate ( ) { org . hl7 . fhir . dstu3 . model . ConceptMap conceptMap = ca . uhn . fhir . cli . ExportConceptMapToCsvCommandDstu3Test . createConceptMap ( ) ; ca . uhn . fhir . cli . ImportCsvToConceptMapCommandDstu3Test . ourClient . create ( ) . resource ( conceptMap ) . execute ( ) ; ja... | org . junit . Assert . assertNull ( methodOutcome . getCreated ( ) ) |
shouldIncreaseColorlessMana ( ) { mage . Mana mana = new mage . Mana ( ) ; mana . increaseGeneric ( ) ; "<AssertPlaceHolder>" ; } getGeneric ( ) { return generic ; } | org . junit . Assert . assertEquals ( 1 , mana . getGeneric ( ) ) |
khayamOverFullRange ( ) { long min = net . time4j . calendar . PersianCalendar . axis ( ) . getCalendarSystem ( ) . getMinimumSinceUTC ( ) ; long max = net . time4j . calendar . PersianCalendar . axis ( ) . getCalendarSystem ( ) . getMaximumSinceUTC ( ) ; for ( long utcDays = min ; utcDays <= max ; utcDays ++ ) { net .... | org . junit . Assert . assertThat ( PersianAlgorithm . KHAYYAM . transform ( khayyam , null ) , org . hamcrest . CoreMatchers . is ( utcDays ) ) |
testObtiene ( ) { mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . inscripciones . model . Descuento descuento = new mx . edu . um . mateo . inscripciones . model . Descuento ( ) ; mx . edu . um . mateo . general . model . Organizacion organizacion = usuario . get... | org . junit . Assert . assertEquals ( descuento . getId ( ) , descuento1 . getId ( ) ) |
testHandleUnknownCause ( ) { java . lang . Exception exception = new java . lang . Exception ( "test-unknown-cause" ) ; "<AssertPlaceHolder>" ; } handleCause ( java . lang . Throwable ) { if ( cause instanceof java . util . concurrent . ExecutionException ) { return org . apache . bookkeeper . stream . storage . impl .... | org . junit . Assert . assertEquals ( StatusCode . INTERNAL_SERVER_ERROR , org . apache . bookkeeper . stream . storage . impl . kv . TableStoreUtils . handleCause ( exception ) ) |
twoNode_test ( ) { final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; final org . eclipse . rdf4j . model . Value geo = vf . createLiteral ( "?subj2<sp><" 1 , GeoConstants . XMLSCHEMA_OGC_WKT ) ; final org . eclipse . rdf4j . model . Val... | org . junit . Assert . assertEquals ( 2 , nodes . size ( ) ) |
testBuildWithDisabledSecurityConstraint ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . street . type . StreetType context = new org . lnu . is . domain . street . type . StreetType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>StreetType<sp>e<sp>WHERE<sp>e.status=:status<sp>" ; org ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testOnderhoudAfnemerindicatiesResultaatMeldingenWordenDoorgegeven ( ) { final java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = new java . util . ArrayList ( ) ; final nl . bzk . brp . levering . afnemerindicaties . service . OnderhoudAfnemerindicatiesResultaat afnemerindicatiesResultaat =... | org . junit . Assert . assertEquals ( meldingen , afnemerindicatiesResultaat . getMeldingen ( ) ) |
testRoll ( ) { java . lang . String orig = "roll(<sp>12345<sp>)<sp>{<sp>counter(<sp>\"foo\"<sp>)<sp>}" ; org . antlr . runtime . tree . CommonTree tree = com . cloudera . flume . conf . FlumeBuilder . parseSink ( orig ) ; java . lang . String out = com . cloudera . flume . conf . FlumeSpecGen . genEventSink ( tree ) ; ... | org . junit . Assert . assertEquals ( orig , out ) |
testPatternCaseSensitiveTrue ( ) { org . apache . uima . jcas . tcas . DocumentAnnotation da = getDocumentAnnotation ( ) ; da . setSourceUri ( "20170127-Test_Document.docx" ) ; processJCas ( DocumentTypeByFilename . PARAM_PATTERN , "\\d{8}-([a-z]).*" , DocumentTypeByFilename . PARAM_DEFAULT , "unknown" , DocumentTypeBy... | org . junit . Assert . assertEquals ( "unknown" , da . getDocType ( ) ) |
testNoSimilarity ( ) { net . ricecode . similarity . LevenshteinDistanceStrategy lds = new net . ricecode . similarity . LevenshteinDistanceStrategy ( ) ; double response = lds . score ( "abc" , "def" ) ; "<AssertPlaceHolder>" ; } score ( java . lang . String , java . lang . String ) { int maxLength = java . lang . Mat... | org . junit . Assert . assertEquals ( 0.0 , response , 0.0 ) |
testRemove ( ) { org . lilyproject . repository . api . QName name = new org . lilyproject . repository . api . QName ( "testNS" , "testRemove" ) ; org . lilyproject . repository . api . RecordType recordType = org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . typeManager . newRecordTyp... | org . junit . Assert . assertTrue ( readRecordType . getFieldTypeEntries ( ) . isEmpty ( ) ) |
testStartBillingRun_withUnsuccesfullResellerSharesCalculation ( ) { doReturn ( Boolean . TRUE ) . when ( sharesCalculator ) . performBrokerSharesCalculationRun ( anyLong ( ) , anyLong ( ) ) ; doReturn ( Boolean . TRUE ) . when ( sharesCalculator ) . performMarketplacesSharesCalculationRun ( anyLong ( ) , anyLong ( ) ) ... | org . junit . Assert . assertFalse ( billingRun ) |
testInitNonInterruptingBoundaryEventThrowUnhandledException ( ) { org . camunda . bpm . engine . runtime . ProcessInstance instance = rule . processInstance ( ) ; org . camunda . bpm . engine . task . Task miSubprocessTask = rule . taskQuery ( ) . taskDefinitionKey ( "subProcessTask" ) . list ( ) . get ( 0 ) ; rule . g... | org . junit . Assert . assertEquals ( "unhandledException" , e . getMessage ( ) ) |
testSessionTimeoutExpired ( ) { heartbeat . sentHeartbeat ( time . milliseconds ( ) ) ; time . sleep ( ( ( sessionTimeoutMs ) + 5 ) ) ; "<AssertPlaceHolder>" ; } sessionTimeoutExpired ( long ) { update ( now ) ; return sessionTimer . isExpired ( ) ; } | org . junit . Assert . assertTrue ( heartbeat . sessionTimeoutExpired ( time . milliseconds ( ) ) ) |
testHelp ( ) { java . lang . String mess = "help" ; java . lang . String expResult = "Freedomotic<sp>CHAT<sp>help:" ; java . lang . String result = msg . manageMessage ( mess ) ; "<AssertPlaceHolder>" ; } manageMessage ( java . lang . String ) { java . lang . String nodeID ; java . lang . String childSensorID ; java . ... | org . junit . Assert . assertTrue ( result . startsWith ( expResult ) ) |
getUserSecurityNameWithValidUser ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String uniqueUserId = "CN=vmmtestuser,cn=users,dc=secfvt2,dc=austin,dc=ibm,dc=com" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . c , "g... | org . junit . Assert . assertEquals ( uniqueUserId , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . servlet . getUserSecurityName ( user ) ) |
shouldGenerateCorrectSqlForMathOperations7 ( ) { org . alfasoftware . morf . sql . element . AliasedField aPlusB = org . alfasoftware . morf . sql . SqlUtils . bracket ( org . alfasoftware . morf . sql . SqlUtils . field ( "a" ) . plus ( org . alfasoftware . morf . sql . SqlUtils . field ( "b" ) ) ) ; org . alfasoftwar... | org . junit . Assert . assertEquals ( expectedSqlForMathOperations7 ( ) , result ) |
testHasSameOriginUrlNull ( ) { com . orange . cepheus . cep . model . Provider provider = new com . orange . cepheus . cep . model . Provider ( ) ; provider . setServiceName ( "SN" ) ; provider . setServicePath ( "SP" ) ; com . orange . cepheus . cep . model . Provider pr = new com . orange . cepheus . cep . model . Pr... | org . junit . Assert . assertFalse ( checkTest ) |
migrateCredentialsWithExsitingCredentials ( ) { com . cloudbees . plugins . credentials . domains . Domain domain = new com . cloudbees . plugins . credentials . domains . Domain ( "example" , "test<sp>domain" , java . util . Arrays . < com . cloudbees . plugins . credentials . domains . DomainSpecification > asList ( ... | org . junit . Assert . assertEquals ( c , cred ) |
convertToMatchableEntity_MULTIPLE_AUTHORS ( ) { eu . dnetlib . iis . citationmatching . schemas . BasicMetadata basicMetadata = eu . dnetlib . iis . citationmatching . schemas . BasicMetadata . newBuilder ( ) . setAuthors ( com . google . common . collect . Lists . newArrayList ( "John<sp>Doe" , "Jane<sp>Doe" ) ) . bui... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( actualMatchableEntity . data ( ) . toByteArray ( ) , expectedMatchableEntity . data ( ) . toByteArray ( ) ) ) |
testAccessingValueWithSubscript ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; java . lang . String source = "{{<sp>person['... | org . junit . Assert . assertEquals ( "Bob" , writer . toString ( ) ) |
testAppendNullStringArray ( ) { com . liferay . portal . kernel . util . StringBundler sb = new com . liferay . portal . kernel . util . StringBundler ( ) ; sb . append ( ( ( java . lang . String [ ] ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } index ( ) { for ( Map . Entry < java . lang . String , java . util . Set < ja... | org . junit . Assert . assertEquals ( 0 , sb . index ( ) ) |
testGetTaskPositive ( ) { org . sejda . model . task . Task < ? extends org . sejda . model . parameter . base . TaskParameters > task = victim . getTask ( new org . sejda . model . task . TestTaskParameter ( ) ) ; "<AssertPlaceHolder>" ; } getTask ( java . lang . Class ) { java . lang . Class < ? extends org . sejda .... | org . junit . Assert . assertNotNull ( task ) |
testIfDerived_MavenPath_4 ( ) { final org . eclipse . xtext . generator . OutputConfiguration output = new org . eclipse . xtext . generator . OutputConfiguration ( "TEST" ) ; output . setOutputDirectory ( "xtend_gen" ) ; final org . eclipse . xtext . generator . OutputConfiguration . SourceMapping sourceMapping = new ... | org . junit . Assert . assertTrue ( this . classNameValidator . isDerived ( file ) ) |
testIsNormalDoesNotUseApply ( ) { com . sun . mail . util . logging . SeverityComparator a = new com . sun . mail . util . logging . SeverityComparator ( ) ; java . lang . Throwable next = this . headIeChain ( new java . lang . AssertionError ( ) ) ; next = new java . lang . Error ( next ) ; next = this . headIioeChain... | org . junit . Assert . assertFalse ( a . isNormal ( next ) ) |
TestTimeWrite ( ) { java . util . ArrayList < java . lang . Object > stuff = new java . util . ArrayList < java . lang . Object > ( ) ; java . util . Properties proptab = new java . util . Properties ( ) ; proptab . setProperty ( HiveShims . serdeConstants . LIST_COLUMNS , "when" ) ; proptab . setProperty ( HiveShims .... | org . junit . Assert . assertEquals ( expected , actual ) |
testRadixSortIndirectNaNs ( ) { final float [ ] t = new float [ ] { Float . NaN , 1 , 5 , 2 , 1 , 0 , 9 , 1 , Float . NaN , 2 , 4 , 6 , 8 , 9 , 10 , 12 , 1 , 7 } ; for ( int to = 1 ; to < ( t . length ) ; to ++ ) for ( int from = 0 ; from < to ; from ++ ) { final int [ ] perm = new int [ t . length ] ; for ( int i = pe... | org . junit . Assert . assertTrue ( ( ( java . lang . Float . compare ( t [ perm [ i ] ] , t [ perm [ ( i + 1 ) ] ] ) ) <= 0 ) ) |
lengthOfValue ( ) { org . junit . Assume . assumeThat ( ( ( hashValueFactory ) instanceof org . springframework . data . redis . StringObjectFactory ) , org . hamcrest . CoreMatchers . is ( true ) ) ; K key = keyFactory . instance ( ) ; HK key1 = hashKeyFactory . instance ( ) ; HV val1 = hashValueFactory . instance ( )... | org . junit . Assert . assertThat ( hashOps . lengthOfValue ( key , key1 ) , org . hamcrest . CoreMatchers . is ( java . lang . Long . valueOf ( val1 . toString ( ) . length ( ) ) ) ) |
wrongOrder_mtm ( ) { org . meri . jpa . relationships . entities . manytomany . MtmCollectionOwner owner = new org . meri . jpa . relationships . entities . manytomany . MtmCollectionOwner ( 888 ) ; org . meri . jpa . relationships . entities . manytomany . MtmCollectionInverse inverse = new org . meri . jpa . relation... | org . junit . Assert . assertFalse ( inverseCheck . getOwners ( ) . isEmpty ( ) ) |
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; java . lang . String result = instance . getWikiPage ( ) ; "<AssertPlaceHolder>" ; } getWikiPage ( ) { return "ResponseCodesPerSecond" ; } | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
testDefaultClassLoader ( ) { final com . rometools . rome . io . XmlReader reader = new com . rometools . rome . io . XmlReader ( getClass ( ) . getResourceAsStream ( "custom-module.xml" ) ) ; final com . rometools . rome . feed . synd . SyndFeed feed = new com . rometools . rome . io . SyndFeedInput ( ) . build ( read... | org . junit . Assert . assertNull ( customModule ) |
testMiddleSource ( ) { com . questdb . ql . RecordSourcePrinter p = new com . questdb . ql . RecordSourcePrinter ( sink ) ; try ( com . questdb . ql . RecordSource rs = new com . questdb . ql . TopRecordSource ( compile ( "quote" ) , new com . questdb . ql . ops . constant . LongConstant ( 102 , 0 ) , new com . questdb... | org . junit . Assert . assertEquals ( expected , sink . toString ( ) ) |
insertOrganization ( ) { com . hunt . model . entity . SysOrganization o = new com . hunt . model . entity . SysOrganization ( ) ; o . setName ( "test<sp>name" ) ; o . setFullName ( "test<sp>full<sp>name" ) ; o . setDescription ( "test<sp>desc" ) ; o . setParentId ( 2L ) ; o . setIsFinal ( 2 ) ; service . insertOrganiz... | org . junit . Assert . assertTrue ( ( ( o . getId ( ) ) != null ) ) |
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 ( passwordPolicies . isEmpty ( ) ) |
testNotSelectedProductIsRemoved ( ) { org . esa . beam . framework . gpf . ui . SourceProductSelector selector = new org . esa . beam . framework . gpf . ui . SourceProductSelector ( appContext , "Source" ) ; selector . initProducts ( ) ; appContext . getProductManager ( ) . removeProduct ( defaultProducts [ 2 ] ) ; "<... | org . junit . Assert . assertEquals ( ( ( defaultProducts . length ) - 1 ) , selector . getProductCount ( ) ) |
testThreadCanBeCollectedEvenIfHandledObjectIsReferenced ( ) { final io . netty . util . Recycler < io . netty . util . RecyclerTest . HandledObject > recycler = io . netty . util . RecyclerTest . newRecycler ( 1024 ) ; final java . util . concurrent . atomic . AtomicBoolean collected = new java . util . concurrent . at... | org . junit . Assert . assertFalse ( collected . get ( ) ) |
testActionGetRequestScore ( ) { java . lang . String uri = "http://some.com/xyz.svc/Customers(2)/ODataDemo.ODataDemoAction" ; odataUri = uriParser . parseUri ( uri , entityDataModel ) ; int score = unmarshaller . score ( createODataRequestContext ( createODataRequest ( com . sdl . odata . unmarshaller . atom . GET , co... | org . junit . Assert . assertThat ( score , org . hamcrest . CoreMatchers . is ( 0 ) ) |
shouldSelectAnElement ( ) { com . redhat . darcy . ui . api . elements . Element shouldFind = new com . redhat . darcy . ui . testing . doubles . AlwaysDisplayedLabel ( ) ; when ( selection . elementOfType ( com . redhat . darcy . ui . api . elements . Element . class , com . redhat . darcy . ui . By . id ( "test" ) ) ... | org . junit . Assert . assertSame ( shouldFind , selection . element ( com . redhat . darcy . ui . By . id ( "test" ) ) ) |
shouldExists ( ) { repository . save ( person ) ; "<AssertPlaceHolder>" ; } exists ( T extends com . github . jloisel . reactive . entity . api . ReactiveEntity ) { return exists ( entity . getId ( ) ) ; } | org . junit . Assert . assertTrue ( repository . exists ( person ) ) |
sexEqualAndAgeGreaterthanequal_sortNameDesc ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>WHERE<sp>sex<sp>=<sp>'male'<sp>and<sp>age<sp>>=<sp>35<sp>ORDER<sp>BY<sp>name<sp>desc<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>where<sp>sex<sp>=<sp>'male'<sp>and<sp>age<sp>>=<sp>35<sp>orde... | org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) ) |
testUpdateList ( ) { org . talend . components . netsuite . client . model . TypeDesc typeDesc = clientService . getMetaDataSource ( ) . getTypeInfo ( "PurchaseOrder" ) ; java . util . List < com . netsuite . webservices . test . transactions . purchases . PurchaseOrder > recordList = makeNsObjects ( new org . talend .... | org . junit . Assert . assertTrue ( writeResponses . isEmpty ( ) ) |
toJSON_enabledSet_labelsSerializedWithEnabled ( ) { com . vaadin . addon . charts . model . Labels labels = new com . vaadin . addon . charts . model . Labels ( false ) ; java . lang . String json = toJSON ( labels ) ; java . lang . String expected = "{\"enabled\":false}" ; "<AssertPlaceHolder>" ; } toJSON ( com . vaad... | org . junit . Assert . assertEquals ( expected , json ) |
testSerialization ( ) { org . jfree . chart . plot . dial . DialPointer i1 = new org . jfree . chart . plot . dial . DialPointer . Pin ( 1 ) ; org . jfree . chart . plot . dial . DialPointer i2 = ( ( org . jfree . chart . plot . dial . DialPointer ) ( org . jfree . chart . TestUtilities . serialised ( i1 ) ) ) ; "<Asse... | org . junit . Assert . assertEquals ( i1 , i2 ) |
testSanitizeWithPolicy ( ) { java . lang . String resourceName = com . github . bordertech . wcomponents . util . ConfigurationProperties . getAntisamyStrictConfigurationFile ( ) ; org . owasp . validator . html . Policy testPolicy = com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . createPolicy ( re... | org . junit . Assert . assertEquals ( expected , com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( com . github . bordertech . wcomponents . util . HtmlSanitizerUtil_Test . TAINTED_ATTRIBUTE , testPolicy ) ) |
writable_max ( ) { com . asakusafw . runtime . value . DateOption option = new com . asakusafw . runtime . value . DateOption ( ) ; option . modify ( date ( Integer . MAX_VALUE ) ) ; com . asakusafw . runtime . value . DateOption restored = restore ( option ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( canGet ) { return... | org . junit . Assert . assertThat ( option . get ( ) , is ( restored . get ( ) ) ) |
testWorks ( ) { final org . uberfire . backend . vfs . Path path = resourcePath ( "/GuvnorM2RepoDependencyExample1/src/main/resources/rule2.drl" ) ; final java . net . URL urlToValidate = this . getClass ( ) . getResource ( "/GuvnorM2RepoDependencyExample1/src/main/resources/rule2.drl" ) ; final java . util . List < or... | org . junit . Assert . assertTrue ( errors . isEmpty ( ) ) |
userGroupsCascade ( ) { net . jforum . entities . User user = new net . jforum . entities . User ( ) ; user . setUsername ( "u1" ) ; net . jforum . entities . Group g = new net . jforum . entities . Group ( ) ; g . setName ( "g1" ) ; this . newGroupDao ( ) . add ( g ) ; user . addGroup ( g ) ; net . jforum . repository... | org . junit . Assert . assertEquals ( 1 , user . getGroups ( ) . size ( ) ) |
testCopyOfCharArray ( ) { char [ ] a = new char [ ] { 1 , 2 , 3 , 4 , 5 } ; "<AssertPlaceHolder>" ; } copyOf ( java . util . Collection ) { return new org . kocakosm . pitaya . collection . ImmutableSet < E > ( new java . util . LinkedHashSet < E > ( c ) ) ; } | org . junit . Assert . assertArrayEquals ( a , copyOf ( a ) ) |
testDotFreeEnclosedWithNameExpr ( ) { java . lang . String expr = "(something<sp>after<sp>$a)" ; com . github . javaparser . ast . expr . Expression expression = org . drools . constraint . parser . DrlxParser . parseExpression ( parser , expr ) . getExpr ( ) ; "<AssertPlaceHolder>" ; } printConstraint ( com . github .... | org . junit . Assert . assertEquals ( expr , printConstraint ( expression ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.