input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testIsRemoveMultiLineComments ( ) { classUnderTest . setRemoveMultiLineComments ( true ) ; "<AssertPlaceHolder>" ; } isRemoveMultiLineComments ( ) { return removeMultiLineComments ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isRemoveMultiLineComments ( ) ) |
testUnwrapForNull ( ) { "<AssertPlaceHolder>" ; } unwrap ( java . lang . Class ) { if ( clazz == null ) { return null ; } if ( clazz . isPrimitive ( ) ) { return clazz ; } if ( ! ( cz . zcu . kiv . jop . util . PrimitiveUtils . isWrapper ( clazz ) ) ) { return clazz ; } java . lang . String name = clazz . getName ( ) ;... | org . junit . Assert . assertNull ( cz . zcu . kiv . jop . util . PrimitiveUtils . unwrap ( null ) ) |
IsItemReturnedAsJON ( ) { java . lang . String url = ( ( catalogURL ( ) ) + "/catalog/" ) + ( iPodNano . getId ( ) ) ; com . ewolff . microservice . catalog . Item body = getForMediaType ( com . ewolff . microservice . catalog . Item . class , MediaType . APPLICATION_JSON , url ) ; "<AssertPlaceHolder>" ; } getForMedia... | org . junit . Assert . assertThat ( body , equalTo ( iPodNano ) ) |
testSplitByMaterialGroupForPartialGroups ( ) { de . javagl . obj . Obj obj = de . javagl . obj . ObjReader . read ( getClass ( ) . getResourceAsStream ( "/fourTrianglesPartiallyInMaterialGroups.obj" ) ) ; java . util . Map < java . lang . String , de . javagl . obj . Obj > objs = de . javagl . obj . ObjSplitting . spli... | org . junit . Assert . assertEquals ( 2 , objs . size ( ) ) |
getOrCreateShouldNotCreateNorModifyValueIfExist ( ) { referencableDaoService . getOrCreate ( ConfigRefEnum . ACHIEVEMENTS_REFRESH_RATE , "1" ) ; referencableDaoService . getOrCreate ( ConfigRefEnum . ACHIEVEMENTS_REFRESH_RATE , "2" ) ; "<AssertPlaceHolder>" ; } get ( com . atlassian . crowd . embedded . api . User ) { ... | org . junit . Assert . assertThat ( referencableDaoService . get ( ConfigRefEnum . ACHIEVEMENTS_REFRESH_RATE ) . getValue ( ) , org . hamcrest . core . Is . is ( "1" ) ) |
testGetLocalizedStringExactMatchLanguageCountryFrench ( ) { org . pentaho . metadata . model . concept . types . LocalizedString s = new org . pentaho . metadata . model . concept . types . LocalizedString ( ) ; s . setString ( "fr_FR_WIN" , "fr_FR_WIN<sp>value" ) ; s . setString ( "fr_FR" , "fr_FR<sp>value" ) ; s . se... | org . junit . Assert . assertEquals ( "fr_FR<sp>value" , s . getLocalizedString ( "fr_FR" ) ) |
testJoinThread ( ) { java . lang . Object lock = new java . lang . Object ( ) ; int count = 5 ; com . jim . framework . web . SpringbootApplicationTests . StarData starData = new com . jim . framework . web . SpringbootApplicationTests . StarData ( count ) ; java . lang . Thread thread0 = new java . lang . Thread ( new... | org . junit . Assert . assertTrue ( true ) |
transform_route6_leading_zeroes ( ) { final net . ripe . db . whois . common . rpsl . RpslObject rpslObject = net . ripe . db . whois . common . rpsl . RpslObject . parse ( ( "" + ( "route6:<sp>2001:1578:0200::/40\n" + "origin:<sp>AS12321" ) ) ) ; final net . ripe . db . whois . common . rpsl . RpslObject result = attr... | org . junit . Assert . assertThat ( result . getValueForAttribute ( AttributeType . ROUTE6 ) . toString ( ) , org . hamcrest . Matchers . is ( "2001:1578:200::/40" ) ) |
handleResultStoresState ( ) { org . apache . beam . runners . local . StructuralKey < ? > myKey = org . apache . beam . runners . local . StructuralKey . of ( "foo" . getBytes ( org . apache . beam . runners . direct . portable . UTF_8 ) , org . apache . beam . sdk . coders . ByteArrayCoder . of ( ) ) ; org . apache . ... | org . junit . Assert . assertThat ( afterResultState . state ( org . apache . beam . runners . core . StateNamespaces . global ( ) , intBag ) . read ( ) , org . hamcrest . Matchers . contains ( 1 , 2 , 4 ) ) |
whenJavaSerializedToXmlFile_thenCorrect ( ) { com . fasterxml . jackson . dataformat . xml . XmlMapper xmlMapper = new com . fasterxml . jackson . dataformat . xml . XmlMapper ( ) ; xmlMapper . writeValue ( new java . io . File ( "target/simple_bean.xml" ) , new com . baeldung . jackson . xml . SimpleBean ( ) ) ; java ... | org . junit . Assert . assertNotNull ( file ) |
greaterThanOrEqualQuery ( ) { addDocument ( "foo" , 1 ) ; addDocument ( "foo" , 2 ) ; com . google . cloud . firestore . QuerySnapshot querySnapshot = randomColl . whereGreaterThanOrEqualTo ( "foo" , 1 ) . get ( ) . get ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return struct . getFieldsMap ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , querySnapshot . size ( ) ) |
URLnull ( ) { java . lang . String relationName = getRelationFromRelationClassUrl ( "https://example.com/test0110/__relation/box/" ) ; "<AssertPlaceHolder>" ; } getRelationFromRelationClassUrl ( java . lang . String ) { java . lang . String relationName = null ; log . debug ( java . lang . String . format ( "RequestRel... | org . junit . Assert . assertEquals ( null , relationName ) |
testGetJobExecution ( ) { final javax . batch . operations . JobOperator mockJobOperator = mockery . mock ( javax . batch . operations . JobOperator . class ) ; final javax . transaction . TransactionManager mockTranMgr = mockery . mock ( javax . transaction . TransactionManager . class ) ; final javax . transaction . ... | org . junit . Assert . assertEquals ( retMe , buildJobOperator ( mockJobOperator , mockTranMgr ) . getJobExecution ( 0 ) ) |
getPathIsCorrect ( ) { final java . lang . String iotHubHostname = "test.iothub" ; final java . lang . String deviceId = "test-deviceid" ; final java . lang . String path = "test-path" ; new mockit . NonStrictExpectations ( ) { { mockIotHubUri . getPath ( ) ; result = path ; } } ; com . microsoft . azure . sdk . iot . ... | org . junit . Assert . assertThat ( testPath , org . hamcrest . CoreMatchers . is ( expectedPath ) ) |
testCreateTxtHostVmwareWithEmptyIPAddress ( ) { com . intel . mtwilson . datatypes . TxtHostRecord hostObj = new com . intel . mtwilson . datatypes . TxtHostRecord ( ) ; hostObj . HostName = "10.1.71.146" ; hostObj . Port = 0 ; hostObj . AddOn_Connection_String = "https://10.1.71.87:443/sdk;Administrator;P@ssw0rd" ; ho... | org . junit . Assert . assertTrue ( ( ( hostAddObj . getHostName ( ) ) != null ) ) |
testAll ( ) { final java . util . Collection < org . drools . verifier . core . index . select . SelectNoMatchesTest . Address > all = select . all ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return map . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( all . isEmpty ( ) ) |
testEqualsSelf ( ) { org . jfree . data . time . Year year = new org . jfree . data . time . Year ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . xy . YWithXInterval ) ) { return false ; } org . jfree . data . xy . Y... | org . junit . Assert . assertTrue ( year . equals ( year ) ) |
testCreate ( ) { org . oscarehr . common . model . OcanFormOption entity = new org . oscarehr . common . model . OcanFormOption ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id... | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
shouldStartWithNoGraphs ( ) { final java . util . Collection < uk . gov . gchq . gaffer . graph . Graph > graphs = graphStorage . get ( nullUser , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , graphs . size ( ) ) |
_7 ( ) { int actual = new fr . inria . lille . examples . tcas . Tcas ( ) . is_upward_preferred ( 0 , 0 , 99 ) ; "<AssertPlaceHolder>" ; } is_upward_preferred ( int , int , int ) { int bias ; if ( 0 != inhibit ) { bias = down_sep ; } else { bias = up_sep ; } if ( bias > down_sep ) { return 1 ; } else { return 0 ; } } | org . junit . Assert . assertEquals ( 0 , actual ) |
test_bounce_wchar ( ) { char result = server . bounce_wchar ( org . jacorb . test . orb . CharTest . EURO_SIGN ) ; "<AssertPlaceHolder>" ; } bounce_wchar ( char ) { return x ; } | org . junit . Assert . assertEquals ( org . jacorb . test . orb . CharTest . EURO_SIGN , result ) |
testV8ArrayMethodCalledFromScriptWithResult ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; com . eclipsesource . v8 . V8Array array = new com . eclipsesource . v8 . V8Array ( v8 ) ; array . push ( "john" ) ; doReturn ( arra... | org . junit . Assert . assertEquals ( "john" , result . getString ( 0 ) ) |
testRemovingGeneratedFile ( ) { com . github . jhonnymertz . wkhtmltopdf . wrapper . Pdf pdf = new com . github . jhonnymertz . wkhtmltopdf . wrapper . Pdf ( ) ; pdf . addPageFromString ( "<html><head><meta<sp>charset=\"utf-8\"></head><h1>Page<sp>1</h1></html>" ) ; pdf . addPageFromString ( "<html><head><meta<sp>charse... | org . junit . Assert . assertTrue ( savedPdf . delete ( ) ) |
testVerifyValidSig ( ) { java . lang . String signature ; boolean result ; signature = digSig . sign ( dataToSign , privateKey ) ; result = digSig . verify ( dataToSign , signature , publicKey ) ; "<AssertPlaceHolder>" ; } verify ( java . lang . String , java . lang . String , java . security . PublicKey ) { byte [ ] d... | org . junit . Assert . assertTrue ( result ) |
testGetByBarcodeListNone ( ) { java . util . List < java . lang . String > barcodes = new java . util . ArrayList ( ) ; barcodes . add ( "asdf" ) ; barcodes . add ( "jkl;" ) ; "<AssertPlaceHolder>" ; } getByBarcodeList ( java . util . Collection ) { if ( barcodeList . isEmpty ( ) ) { return java . util . Collections . ... | org . junit . Assert . assertEquals ( 0 , dao . getByBarcodeList ( barcodes ) . size ( ) ) |
testExonicThreePrimeOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t58946502\t.\tN\t<INS>\t.\t.\tSVTYPE=INS;END=58946502" ) ; final java . lang . String expected = "1\t58946502\t.\tN\t<INS>\t.\t.\tEND=58946502;" + ( "SVANN=insertion&3_prime_UTR_exon_variant&structural_varia... | org . junit . Assert . assertEquals ( expected , actual ) |
testMatchExactlyLinkIdErr ( ) { queriesString = "type=node&enabled=true&path=link_id=link01" ; target = new org . o3project . odenos . core . component . network . flow . query . BasicFlowQuery ( queriesString ) ; target . parse ( ) ; java . util . List < org . o3project . odenos . core . component . network . flow . b... | org . junit . Assert . assertThat ( target . matchExactly ( flow ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . reason . Reason entity = new org . lnu . is . domain . reason . Reason ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String ... | org . junit . Assert . assertEquals ( expected , actual ) |
testUIComputation ( ) { populate ( ) ; org . openqa . selenium . WebElement button = driver . findElement ( org . openqa . selenium . By . tagName ( "Button" ) ) ; button . click ( ) ; org . openqa . selenium . WebElement texts = driver . findElement ( org . openqa . selenium . By . tagName ( "text" ) ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( texts . getText ( ) , java . lang . String . valueOf ( ( ( values . get ( 0 ) ) + ( values . get ( 1 ) ) ) ) ) |
moveFile_theSourceFileShouldNotExist ( ) { initRepository ( ) ; writeToCache ( "/source.txt" ) ; commitToMaster ( ) ; initGitFileSystem ( ) ; com . beijunyi . parallelgit . filesystem . GitPath source = gfs . getPath ( "/source.txt" ) ; com . beijunyi . parallelgit . filesystem . GitPath target = gfs . getPath ( "/targ... | org . junit . Assert . assertFalse ( com . beijunyi . parallelgit . filesystem . Files . exists ( source ) ) |
testBuildAndSearchRealPositionalIndex ( ) { int peterRank = positionalBuildSearchGetRank ( "-dimension<sp>200<sp>-vectortype<sp>real<sp>-seedlength<sp>10<sp>-luceneindexpath<sp>positional_index" , "-queryvectorfile<sp>termtermvectors.bin<sp>simon" , new java . lang . String [ ] { "termtermvectors.bin" , "docvectors.bin... | org . junit . Assert . assertTrue ( ( peterRank < 20 ) ) |
testLista ( ) { log . debug ( "Debiera<sp>mostrar<sp>lista<sp>de<sp>paquetes" ) ; mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . contabilidad . facturas . model . InformeEmpleado informe = null ; for ( int i = 0 ; i < 20 ; i ++ ) { informe = new mx . edu . um . ... | org . junit . Assert . assertNotNull ( informe . getId ( ) ) |
testSumUngroupedHavingAggregation2 ( ) { java . lang . String tablename = generateUniqueName ( ) ; java . lang . String tenantId = getOrganizationId ( ) ; java . lang . String query = ( "SELECT<sp>sum(unique_users),sum(cpu_utilization),sum(transactions),sum(db_utilization),sum(response_time)<sp>FROM<sp>" + tablename ) ... | org . junit . Assert . assertFalse ( rs . next ( ) ) |
shouldChangeDirection_WhenReflectedFromHorisontalUpToDown ( ) { com . codenjoy . dojo . pong . model . BallDirection ballDirection = new com . codenjoy . dojo . pong . model . BallDirection ( com . codenjoy . dojo . services . QDirection . UP ) ; com . codenjoy . dojo . pong . model . BallDirection reflectedDirection =... | org . junit . Assert . assertTrue ( expectedDirection . equals ( reflectedDirection ) ) |
testGetSourcesSsrcAndRid ( ) { org . jitsi . jicofo . RtpDescriptionPacketExtension rtpDescriptionPacketExtension = new org . jitsi . jicofo . RtpDescriptionPacketExtension ( ) ; rtpDescriptionPacketExtension . setMedia ( "video" ) ; org . jitsi . jicofo . SourcePacketExtension ssrcOne = new org . jitsi . jicofo . Sour... | org . junit . Assert . assertEquals ( 4 , sources . size ( ) ) |
testSave_customProcessorAnno_withGetter ( ) { com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet outSheet = new com . gh . mygreen . xlsmapper . XlsMapperTest . CustomAnnoSheet ( ) ; outSheet . setCustomProcessor ( "" ) ; com . gh . mygreen . xlsmapper . xml . bind . AnnotationMappingInfo xmlInfo = create... | org . junit . Assert . assertThat ( sheet . customProcessor ) |
testAdaptNull ( ) { "<AssertPlaceHolder>" ; } adapt ( org . apache . commons . functor . Predicate ) { return null == predicate ? null : new org . apache . commons . functor . adapter . PredicateFunction < A > ( predicate ) ; } | org . junit . Assert . assertNull ( org . apache . commons . functor . adapter . PredicateFunction . adapt ( null ) ) |
testEditOtherSourceThrowsError ( ) { javax . servlet . http . HttpSession session = mock ( javax . servlet . http . HttpSession . class ) ; when ( servletRequest . getSession ( ) ) . thenReturn ( session ) ; when ( localeManager . getLocale ( ) ) . thenReturn ( new java . util . Locale ( "us" , "EN" ) ) ; org . orcid .... | org . junit . Assert . assertEquals ( throwsError , true ) |
testContainsOnOverlappingSets ( ) { edu . ucla . sspace . util . Set < java . lang . Integer > set1 = new edu . ucla . sspace . util . HashSet < java . lang . Integer > ( ) ; edu . ucla . sspace . util . Set < java . lang . Integer > set2 = new edu . ucla . sspace . util . HashSet < java . lang . Integer > ( ) ; for ( ... | org . junit . Assert . assertTrue ( combined . contains ( i ) ) |
testIsRemotePackage ( ) { java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( "org.opennms.netmgt.ConfigFileConstants" , "ERROR" ) ; org . opennms . core . test . MockLogAppender . setupLogging ( p ) ; org . opennms . netmgt . config . poller . Package pkg = new org . opennms . netmgt . co... | org . junit . Assert . assertFalse ( poller . pollableServiceInPackage ( null , null , pkg ) ) |
resultsInNullExtension ( ) { java . util . Map < java . lang . String , java . lang . Object > map = org . n52 . sos . statistics . sos . models . ExtensionEsModel . convert ( ( ( org . n52 . shetland . ogc . ows . extension . Extension < ? > ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } convert ( org . n52 . shetland . o... | org . junit . Assert . assertNull ( map ) |
testIsAssumeIdentity ( ) { policy . setAnonymousAccessAllowed ( true ) ; "<AssertPlaceHolder>" ; } isAssumeIdentity ( org . apache . activemq . shiro . ConnectionReference ) { return ( isAnonymousAccessAllowed ( ) ) || ( ( isSystemConnection ( conn ) ) && ( ! ( isVmConnectionAuthenticationRequired ( ) ) ) ) ; } | org . junit . Assert . assertTrue ( policy . isAssumeIdentity ( null ) ) |
contentTypeServiceDocumentAcceptHeaders ( ) { final org . apache . http . HttpResponse response = callUri ( "" , HttpHeaders . ACCEPT , "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" , HttpStatusCodes . OK ) ; checkMediaType ( response , HttpContentType . APPLICATION_XML_UTF8 ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertTrue ( ( ( getBody ( response ) . length ( ) ) > 100 ) ) |
testChangingNewObservablesValue ( ) { nestedListenerHandle = createAttachedNestedListenerHandle ( nesting , listener ) ; javafx . beans . property . StringProperty newObservable = new javafx . beans . property . SimpleStringProperty ( "new<sp>observable's<sp>initial<sp>value" ) ; setNestingObservable ( nesting , newObs... | org . junit . Assert . assertEquals ( newObservable , getNestingObservable ( nesting ) ) |
fulfill_throwsException_completesWithException ( ) { java . lang . RuntimeException expectedException = new java . lang . RuntimeException ( ) ; when ( eventsMock . handleRequest ( any ( ) ) ) . thenThrow ( expectedException ) ; java . util . concurrent . CompletableFuture < eu . chargetime . ocpp . model . Confirmatio... | org . junit . Assert . assertThat ( result [ 0 ] , org . hamcrest . CoreMatchers . is ( expectedException ) ) |
testLsr ( ) { final org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . numDataNodes ( 2 ) . build ( ) ; org . apache . hadoop . hdfs ... | org . junit . Assert . assertTrue ( results . contains ( "zzz" ) ) |
testNotIn ( ) { io . jeo . filter . In f = ( ( io . jeo . filter . In ) ( io . jeo . filter . cql . CQL . parse ( "STATE_NAME<sp>NOT<sp>IN<sp>('Virginia','Maryland')" ) ) ) ; "<AssertPlaceHolder>" ; } negated ( ) { return not ; } | org . junit . Assert . assertTrue ( f . negated ( ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . Portlet missingPortlet = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive... | org . junit . Assert . assertNull ( missingPortlet ) |
non_strict_wip_with_undefined_scenarios ( ) { createNonStrictWipExitStatus ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . UNDEFINED ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { if ( results . isEmpty ( ) ) { return cucumber . runtime . ExitStatus . DEFAULT ; } if ( runtimeOptions . isWip ( ) ) { re... | org . junit . Assert . assertEquals ( 0 , exitStatus . exitStatus ( ) ) |
getObjectInteger ( ) { org . mockito . Mockito . when ( resultSet . getObject ( 1 ) ) . thenReturn ( 1L ) ; org . mockito . Mockito . when ( resultSet . getInt ( 1 ) ) . thenReturn ( 1 ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( resultSet ) . getInt ( 1 ) ; } getObject ( java . lang . Class , java . ... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 1 ) ) , com . cloud . utils . db . GenericDaoBase . getObject ( com . cloud . utils . db . Integer . class , resultSet , 1 ) ) |
testSaveDrugInfoShouldSaveDrugInfo ( ) { org . openmrs . Drug drug = new org . openmrs . Drug ( ) ; drug . setId ( 3 ) ; org . raxa . module . raxacore . DrugInfo drugInfo = new org . raxa . module . raxacore . DrugInfo ( ) ; drugInfo . setDrug ( drug ) ; drugInfo . setName ( "TestDrugInfo3" ) ; drugInfo . setDescripti... | org . junit . Assert . assertEquals ( name , "TestDrugInfo3" ) |
visitOrMatchExpr_nf ( ) { org . batfish . datamodel . acl . AclLineMatchExpr expr = org . batfish . datamodel . acl . AclLineMatchExprs . or ( org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . A , org . batfish . datamodel . acl . AclLineMatchExprNormalizerTest . B , org . batfish . datamodel . acl . A... | org . junit . Assert . assertThat ( normalize ( expr ) , org . hamcrest . Matchers . equalTo ( expr ) ) |
testSplitJsNotSupported ( ) { defaultRewriterFeature = new org . apache . shindig . gadgets . rewrite . ContentRewriterFeature . DefaultConfig ( "" , "test" , "0" , TAGS , false , false ) ; "<AssertPlaceHolder>" ; } isSplitJsEnabled ( ) { return enableSplitJs ; } | org . junit . Assert . assertFalse ( defaultRewriterFeature . isSplitJsEnabled ( ) ) |
testBasicValidInput ( ) { java . lang . String input = "" + ( ( ( ( ( ( ( ( ( ( ( "[Desktop<sp>Entry]\n" + "[Desktop<sp>Entry]\n" 1 ) + "Type=Application\n" ) + "Name=Foo<sp>Viewer\n" ) + "[Desktop<sp>Entry]\n" 0 ) + "TryExec=fooview\n" ) + "Exec=fooview<sp>%F\n" ) + "[Desktop<sp>Entry]\n" 2 ) + "MimeType=image/x-foo;\... | org . junit . Assert . assertNotNull ( file ) |
getOrDefault_ParamNull_ReturnsDefaultValue ( ) { "<AssertPlaceHolder>" ; } getOrDefault ( T , java . util . function . Supplier ) { software . amazon . awssdk . utils . Validate . paramNotNull ( defaultValue , "defaultValue" ) ; return param != null ? param : defaultValue . get ( ) ; } | org . junit . Assert . assertEquals ( "bar" , software . amazon . awssdk . utils . Validate . getOrDefault ( null , ( ) -> "bar" ) ) |
testRotatedPage ( ) { byte [ ] bytes = createSimplePdf ( PageSize . LETTER . rotate ( ) , "A\nB\nC\nD" ) ; com . itextpdf . text . pdf . PdfReader r = new com . itextpdf . text . pdf . PdfReader ( bytes ) ; java . lang . String text = com . itextpdf . text . pdf . parser . PdfTextExtractor . getTextFromPage ( r , 1 , c... | org . junit . Assert . assertEquals ( "A\nB\nC\nD" , text ) |
listTest2 ( ) { java . lang . Float agTest1 = agTest . listTest2 ( 0.1F ) ; "<AssertPlaceHolder>" ; } listTest2 ( java . lang . Long ) { return value ; } | org . junit . Assert . assertTrue ( ( agTest1 == ( 0.1F + 0.1F ) ) ) |
shouldSetValue ( ) { bot . scaleInGroup ( "Scale" ) . setValue ( 24 ) ; "<AssertPlaceHolder>" ; } scaleInGroup ( java . lang . String ) { return scaleInGroup ( inGroup , 0 ) ; } | org . junit . Assert . assertEquals ( 24 , bot . scaleInGroup ( "Scale" ) . getValue ( ) ) |
testListS3BucketsFail ( ) { java . lang . String userName = "randomUser" ; java . util . Iterator < ? extends org . apache . hadoop . ozone . client . OzoneBucket > iterator = org . apache . hadoop . ozone . client . rpc . TestOzoneRpcClientAbstract . store . listS3Buckets ( userName , null ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertFalse ( iterator . hasNext ( ) ) |
dispose ( ) { items . add ( "a" ) ; items . add ( "z" ) ; myReg . remove ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return myRegistrations . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( target . isEmpty ( ) ) |
readNull ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( null ) ; java . util . List < com . att . aro . core . perip... | org . junit . Assert . assertTrue ( ( ( batteryInfos . size ( ) ) == 0 ) ) |
testTraceAndMeasureConstructorJoinPointWithLoggerAtInfoLevel ( ) { FakeClassWithAspect . SERVICE_LOGGER . setLevel ( Level . INFO ) ; classWithAspect = new com . ibm . logger . FakeClassWithAspect ( 123 ) ; java . util . List < java . util . logging . LogRecord > logRecordList = aspectClassLogHandler . logRecordList ; ... | org . junit . Assert . assertEquals ( 0 , logRecordList . size ( ) ) |
testSuccessfulMatch ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "3" ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "4" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<As... | org . junit . Assert . assertTrue ( matcher . match ( msg , rule ) ) |
parseEmpty ( ) { io . robe . convert . xml . parsers . ParseEnumTest . TestEnum expected = null ; java . lang . reflect . Field field = getClass ( ) . getField ( "testEnum" ) ; io . robe . convert . xml . parsers . ParseEnum parseEnum = new io . robe . convert . xml . parsers . ParseEnum ( ) ; io . robe . convert . xml... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldReturnFalseWhenCurrentFPMethodOfECIsNotCondom ( ) { boolean didRuleSucceed = currentFPMethodIsCondomRule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "currentMethod" , "ocp" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return t... | org . junit . Assert . assertFalse ( didRuleSucceed ) |
shouldFinishSessionWhenTestsFinishRunning ( ) { testRunner . run ( ) ; testsProgress . testsFinished ( ) ; "<AssertPlaceHolder>" ; } isFinished ( ) { return finished ; } | org . junit . Assert . assertTrue ( session . isFinished ( ) ) |
testHashcodeAfterReencodingWithValidUuid ( ) { datawave . edge . util . EdgeValue originalEdgeValue = createEdgeValueWithUuid ( "11111111-1111-1111-1111-111111111111" ) ; datawave . edge . util . EdgeValue decodedEdgeValue = datawave . edge . util . EdgeValue . decode ( createEdgeValueWithUuid ( "11111111-1111-1111-111... | org . junit . Assert . assertEquals ( ( ( originalEdgeValue + "\n" ) + decodedEdgeValue ) , originalEdgeValue . hashCode ( ) , decodedEdgeValue . hashCode ( ) ) |
singleNodeTypeMiss ( ) { org . apache . jackrabbit . oak . spi . state . NodeState node = org . apache . jackrabbit . oak . plugins . observation . filter . NodeTypePredicateTest . createNodeOfType ( org . apache . jackrabbit . JcrConstants . NT_BASE ) ; org . apache . jackrabbit . oak . plugins . nodetype . TypePredic... | org . junit . Assert . assertFalse ( p . apply ( node ) ) |
testCacheEntryWithProxyRevalidateDoesEndToEndRevalidation ( ) { final org . apache . hc . core5 . http . HttpRequest basicRequest = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "GET" , "/" ) ; final org . apache . hc . core5 . http . HttpRequest requestWrapper = RequestCopier . INSTANCE . copy ( ... | org . junit . Assert . assertTrue ( foundMaxAge0 ) |
parallelForEachPerformanceOneThread ( ) { java . lang . Object [ ] array = org . eclipse . collections . impl . list . Interval . zeroTo ( 100 ) . toArray ( ) ; org . eclipse . collections . impl . math . Sum parallelSum = new org . eclipse . collections . impl . math . LongSum ( 0 ) ; this . parallelSum ( array , para... | org . junit . Assert . assertEquals ( parallelSum , linearSum ) |
testBuildWithParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Double markMin = 0.0 ; java . lang . Double markMax = 10.0 ; java . lang . Double markExchange = 5.0 ; org . lnu . is . domain . mark . scale . MarkScale markscale = new org . lnu . is .... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testSpdyHeadersFrame ( ) { short type = 8 ; byte flags = 0 ; int length = 4 ; int streamId = ( ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ) | 1 ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ( ( io . netty . handler . codec . spdy ... | org . junit . Assert . assertFalse ( buf . isReadable ( ) ) |
source_shortcut_01 ( ) { org . apache . jena . graph . Graph graph = org . apache . jena . sparql . graph . GraphFactory . createGraphMem ( ) ; org . apache . jena . riot . RDFParser . fromString ( org . apache . jena . riot . TestRDFParser . testdata ) . lang ( Lang . TTL ) . parse ( graph ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( 1 , graph . size ( ) ) |
shouldCountVotes ( ) { feedbackService . save ( roomId , 0 , "user-id-one" ) ; feedbackService . save ( roomId , 0 , "user-id-two" ) ; int actual = feedbackService . countFeedbackByRoomId ( roomId ) ; "<AssertPlaceHolder>" ; } countFeedbackByRoomId ( java . lang . String ) { final de . thm . arsnova . model . Feedback ... | org . junit . Assert . assertEquals ( 2 , actual ) |
testServiceHandlerHasServiceStore ( ) { final java . util . concurrent . atomic . AtomicReference < org . eclipse . rap . rwt . internal . service . ServiceStore > serviceStoreRef = new java . util . concurrent . atomic . AtomicReference ( ) ; org . eclipse . rap . rwt . engine . RWTServlet_Test . fakeServiceHandler ( ... | org . junit . Assert . assertNotNull ( serviceStoreRef . get ( ) ) |
testDoRequestWithAddHeaders ( ) { addPageRequest ( "GET" , "http://test.com/index.html?query=ab+cd&page=1" , "Test<sp>Page" ) . addHeader ( "foo" , "bar" , "baz" ) ; com . gistlabs . mechanize . Resource page = agent ( ) . doRequest ( "http://test.com/index.html" ) . add ( "baz" 0 , "ab<sp>cd" ) . add ( "page" , "1" ) ... | org . junit . Assert . assertEquals ( "Test<sp>Page" , page . asString ( ) ) |
testGetSelectionIndex ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . MULTI ) ; org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 3 , 3 ) ; int [ ] indicies = new int [ ] { 3 , 4 , 1 , 7 } ; grid . setSelection ( indicies ) ; "<Assert... | org . junit . Assert . assertEquals ( 3 , grid . getSelectionIndex ( ) ) |
serialize ( ) { org . oscm . auditlog . util . AuditLogSerializer auditLogSerializer = new org . oscm . auditlog . util . AuditLogSerializer ( ) ; java . util . List < org . oscm . auditlog . model . AuditLog > auditLogs = org . oscm . auditlog . util . AuditLogFactory . createAuditLogs ( ) ; byte [ ] result = auditLog... | org . junit . Assert . assertThat ( result , isSerializedCorrectly ( auditLogs ) ) |
featureWPS2 ( ) { final org . geotoolkit . wps . xml . v200 . Format format = new org . geotoolkit . wps . xml . v200 . Format ( "UTF-8" , "text/xml" , "http://schemas.opengis.net/gml/3.1.1/base/feature.xsd" , null ) ; final org . geotoolkit . wps . adaptor . ComplexAdaptor adaptor = org . geotoolkit . wps . adaptor . ... | org . junit . Assert . assertEquals ( org . opengis . feature . Feature . class , adaptor . getValueClass ( ) ) |
getSubscribedListenersInThreadOnlyTest ( ) { org . threadly . concurrent . event . RunnableListenerHelperTest . TestRunnable tr = new org . threadly . concurrent . event . RunnableListenerHelperTest . TestRunnable ( ) ; onceHelper . addListener ( tr ) ; "<AssertPlaceHolder>" ; } getSubscribedListeners ( ) { synchronize... | org . junit . Assert . assertTrue ( onceHelper . getSubscribedListeners ( ) . contains ( tr ) ) |
testRemove ( ) { com . liferay . dynamic . data . lists . model . DDLRecordSetVersion newDDLRecordSetVersion = addDDLRecordSetVersion ( ) ; _persistence . remove ( newDDLRecordSetVersion ) ; com . liferay . dynamic . data . lists . model . DDLRecordSetVersion existingDDLRecordSetVersion = _persistence . fetchByPrimaryK... | org . junit . Assert . assertNull ( existingDDLRecordSetVersion ) |
testPutSchedulerPZInUseToDockerPZShouldFail ( ) { com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState createdPlacementZone = createPlacementZone ( "scheduler-placement-zone" , true ) ; "<AssertPlaceHolder>" ; createComputeState ( createdPlacementZone , true ) ; markDockerPla... | org . junit . Assert . assertNotNull ( createdPlacementZone ) |
testIsSticky ( ) { org . pentaho . reporting . engine . classic . core . PageHeader header = new org . pentaho . reporting . engine . classic . core . PageHeader ( ) ; header . getStyle ( ) . setBooleanStyleProperty ( BandStyleKeys . STICKY , true ) ; "<AssertPlaceHolder>" ; } isSticky ( ) { return getStyle ( ) . getBo... | org . junit . Assert . assertThat ( header . isSticky ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) ) |
testCorrectePeriodeGemeenteGeenPeriode ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > objectenDieDeRegelOvertreden = brby0903 . voerRegelUit ( null , maakPersoonOverlijden ( maakGemeente ( "24" , "gemeente" , null , null ) , 20120303 ) , maakActie ( "id.actie1" , 20120303 , null ) ,... | org . junit . Assert . assertEquals ( 0 , objectenDieDeRegelOvertreden . size ( ) ) |
gettingAccountByNameAndServerWorks ( ) { fi . helsinki . cs . tmc . cli . backend . Account wanted = new fi . helsinki . cs . tmc . cli . backend . Account ( "2" , "e" ) ; wanted . setServerAddress ( "1" ) ; list . addAccount ( new fi . helsinki . cs . tmc . cli . backend . Account ( "-" , "D" ) ) ; list . addAccount (... | org . junit . Assert . assertSame ( wanted , get ) |
startsWithoutExceptionsIfSetupIsCorrect ( ) { org . appenders . log4j2 . elasticsearch . IndexNameFormatter formatter = org . appenders . log4j2 . elasticsearch . RollingIndexNameFormatterTest . createRollingIndexNameFormatterBuilder ( ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( credentials ) == null )... | org . junit . Assert . assertNotNull ( formatter ) |
shouldNotMatchWhenLocationsDiffer ( ) { final org . pitest . mutationtest . engine . MutationIdentifier a = new org . pitest . mutationtest . engine . MutationIdentifier ( org . pitest . mutationtest . LocationMother . aLocation ( ) . withMethodDescription ( "X" ) . build ( ) , 1 , "M" ) ; final org . pitest . mutation... | org . junit . Assert . assertFalse ( a . matches ( b ) ) |
shouldNotBeEqualWhenObjectIsNull ( ) { com . sonymobile . tools . gerrit . gerritevents . dto . events . RefReplicationDone refReplicationDone = new com . sonymobile . tools . gerrit . gerritevents . dto . events . RefReplicationDone ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o )... | org . junit . Assert . assertFalse ( refReplicationDone . equals ( null ) ) |
testSolutionAboveSide ( ) { org . apache . commons . math3 . analysis . UnivariateFunction f = new org . apache . commons . math3 . analysis . SinFunction ( ) ; org . apache . commons . math3 . analysis . solvers . UnivariateSolver solver = getSolver ( ) ; double left = - 1.5 ; double right = 0.05 ; for ( int i = 0 ; i... | org . junit . Assert . assertTrue ( ( ( f . value ( solution ) ) >= 0.0 ) ) |
attemptToWriteWithFaultyTask ( ) { engineMock . setHandshakeActions ( HandshakeAction . NEED_FAULTY_TASK ) ; final java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 21 ) ; buffer . put ( "write<sp>this<sp>if<sp>you<sp>can" . getBytes ( "UTF-8" ) ) . flip ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { boo... | org . junit . Assert . assertTrue ( failed ) |
testNotHasRole ( ) { java . lang . String sql = "SELECT<sp>hasRole('bar')" ; java . lang . String userName = "logon" ; org . teiid . client . ResultsMessage rm = helpExecute ( sql , userName ) ; "<AssertPlaceHolder>" ; } getResultsList ( ) { return results ; } | org . junit . Assert . assertFalse ( ( ( java . lang . Boolean ) ( rm . getResultsList ( ) . get ( 0 ) . get ( 0 ) ) ) ) |
testDefaults ( ) { @ com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults class Annotated { } com . google . auto . value . AutoAnnotationDefaultsTest . EverythingWithDefaults expected = Annotated . class . getAnnotation ( com . google . auto . value . AutoAnnotationDefaultsTest . Everythin... | org . junit . Assert . assertTrue ( differences , differences . isEmpty ( ) ) |
runMatcherNestedFunctionsTests ( ) { nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester uaa = new nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester ( "classpath*:Matcher-nested-functions.yaml" ) ; "<AssertPlaceHolder>" ; } runTests ( boolean , boolean ) { return runTests ( showAll , failO... | org . junit . Assert . assertTrue ( uaa . runTests ( false , false ) ) |
testIterator ( ) { System . out . println ( "iterator" ) ; java . util . Iterator result = instance . iterator ( ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return graphRow . iterator ( ) ; } | org . junit . Assert . assertNotNull ( result ) |
nonExistingBenchmarkConfig ( ) { org . optaplanner . benchmark . api . PlannerBenchmarkFactory plannerBenchmarkFactory = org . optaplanner . benchmark . api . PlannerBenchmarkFactory . createFromXmlResource ( "org/optaplanner/benchmark/api/nonExistingPlannerBenchmarkConfig.xml" ) ; org . optaplanner . benchmark . api .... | org . junit . Assert . assertNotNull ( plannerBenchmark ) |
testConvert ( ) { java . io . File propsFile = java . io . File . createTempFile ( "lingual.test.properties" , null ) ; propsFile . deleteOnExit ( ) ; java . util . Properties testProps = new java . util . Properties ( ) ; testProps . setProperty ( "test1" , "some<sp>value" ) ; testProps . setProperty ( "test2" , "some... | org . junit . Assert . assertEquals ( expected , result ) |
testIsNotSameParentAll ( ) { org . kie . workbench . common . stunner . core . graph . Node parent = new org . kie . workbench . common . stunner . core . graph . impl . NodeImpl ( "parentUUID" ) ; org . kie . workbench . common . stunner . core . graph . Node child1 = new org . kie . workbench . common . stunner . cor... | org . junit . Assert . assertFalse ( isSameParent ) |
testFOrdering2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array1 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 1280 , 128000 ) ; org . nd4j . linalg . api . ndarray . INDArray array2 = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 1280 , 128000 ) ; org . nd4j . linalg . api . ndarray . INDAr... | org . junit . Assert . assertEquals ( array3 , array1 ) |
testConvertAll ( ) { java . lang . Long enrolmentId = 1L ; org . lnu . is . domain . enrolment . Enrolment enrolment = new org . lnu . is . domain . enrolment . Enrolment ( ) ; enrolment . setId ( enrolmentId ) ; java . lang . Long specOfferWaveId = 2L ; org . lnu . is . domain . specoffer . SpecOfferWave specOfferWave... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
paths_bicyclo ( ) { int [ ] [ ] bicyclo = org . openscience . cdk . graph . InitialCyclesTest . bicyclo ( ) ; org . openscience . cdk . graph . VertexShortCycles vsc = new org . openscience . cdk . graph . VertexShortCycles ( bicyclo ) ; int [ ] [ ] paths = vsc . paths ( ) ; int [ ] [ ] expected = new int [ ] [ ] { new... | org . junit . Assert . assertThat ( paths , org . hamcrest . CoreMatchers . is ( expected ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.