input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testAuthenticateFailsNull ( ) { final org . apache . sshd . server . session . ServerSession mockServerSession = context . mock ( org . apache . sshd . server . session . ServerSession . class ) ; final com . asolutions . scmsshd . ldap . LDAPBindingProvider ldapBinding = context . mock ( com . asolutions . scmsshd . l... | org . junit . Assert . assertNull ( auth . authenticate ( com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . USERNAME , com . asolutions . scmsshd . authenticators . LDAPAuthenticatorTest . PASSWORD , mockServerSession ) ) |
testGetMessages ( ) { sut . getMessages ( testId , org . eurekastreams . server . service . opensocial . spi . MessageServiceTest . TEST_MESSAGE_COLL_ID , new java . util . HashSet < java . lang . String > ( ) , new java . util . ArrayList < java . lang . String > ( ) , testCollectionOptions , org . eurekastreams . ser... | org . junit . Assert . assertTrue ( true ) |
testFilterGeheimeAfnemerindicatie ( ) { final int leveringAutorisatieId = 1 ; org . mockito . Mockito . when ( leveringsautorisatieService . geefLeveringautorisatie ( leveringAutorisatieId ) ) . thenReturn ( bouwLeveringsautorisatieGeheim ( leveringAutorisatieId ) ) ; final nl . bzk . brp . domain . leveringmodel . per... | org . junit . Assert . assertFalse ( berichtgegevens . isGeautoriseerd ( afnemerIndicatie ) ) |
testEmptyQuery ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass ... | org . junit . Assert . assertEquals ( 3 , list . size ( ) ) |
testReclaimPolicy ( ) { pv . setReclaimPolicy ( "Recycle" ) ; java . lang . String policy = pv . getReclaimPolicy ( ) ; "<AssertPlaceHolder>" ; } getReclaimPolicy ( ) { return asString ( com . openshift . internal . restclient . model . volume . PersistentVolume . PV_RECLAIM_POLICY ) ; } | org . junit . Assert . assertEquals ( policy , "Recycle" ) |
shouldNotInjectFlushAfterExplicitFlushBeforeReadConfig ( ) { org . kaazing . k3po . lang . internal . ast . AstScriptNode expectedScriptNode = new org . kaazing . k3po . lang . internal . ast . builder . AstScriptNodeBuilder ( ) . addConnectStream ( ) . addConnectedEvent ( ) . done ( ) . addFlushCommand ( ) . done ( ) ... | org . junit . Assert . assertEquals ( expectedScriptNode , actualScriptNode ) |
testExceptions1 ( ) { java . lang . String imei = "" ; try { imei = edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . taintedString ( "abcd" ) ; throw new java . lang . RuntimeException ( ) ; } catch ( java . lang . RuntimeException ex ) { "<AssertPlaceHolder>" ; } } getTaint ( java . lang . String... | org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchIntTagITCase . getTaint ( imei ) ) != 0 ) ) |
runTestReflection3 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "Reflection/Reflection3.apk" , null , enableReflectionCallback ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
equalDoesNotDependsOnMethodAndHref ( ) { final org . apache . isis . viewer . restfulobjects . applib . LinkRepresentation link = new org . apache . isis . viewer . restfulobjects . applib . LinkRepresentation ( ) . withHref ( "http://localhost:8080/objects/ABC:123" ) . withMethod ( RestfulHttpMethod . GET ) . withRel ... | org . junit . Assert . assertThat ( link , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( link2 ) ) ) |
parseWithProtocolAndHostAndPathAndTwoQueryParameters ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "https://www.bing.com/image.gif?a=1&b=2" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; } | org . junit . Assert . assertEquals ( "https://www.bing.com/image.gif?a=1&b=2" , builder . toString ( ) ) |
get_foreign_keys ( ) { com . hotels . bdp . waggledance . client . CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory . newInstance ( delegate ) ; org . apache . hadoop . hive . metastore . api . ForeignKeysRequest foreignKeysRequest = new org . apache . hadoop . hive . metastore . api . ForeignKeysRe... | org . junit . Assert . assertThat ( foreignKeysResponse , org . hamcrest . CoreMatchers . is ( new org . apache . hadoop . hive . metastore . api . ForeignKeysResponse ( java . util . Collections . emptyList ( ) ) ) ) |
testToBuilder ( ) { com . google . cloud . datastore . NullValue value = com . google . cloud . datastore . NullValue . of ( ) ; "<AssertPlaceHolder>" ; } toBuilder ( ) { return ( this ) == ( com . google . firestore . admin . v1 . DeleteIndexRequest . DEFAULT_INSTANCE ) ? new com . google . firestore . admin . v1 . De... | org . junit . Assert . assertEquals ( value , value . toBuilder ( ) . build ( ) ) |
debieraObtenerPuesto ( ) { mx . edu . um . mateo . rh . dao . PuestoDaoTest . log . debug ( "Debiera<sp>obtener<sp>puesto" ) ; mx . edu . um . mateo . general . model . Organizacion organizacion = new mx . edu . um . mateo . general . model . Organizacion ( "tst-01" , "test-01" , "test-01" ) ; currentSession ( ) . save... | org . junit . Assert . assertEquals ( "tst-01" , result . getDescripcion ( ) ) |
testUpdateEntity_noEvent ( ) { handler . addRequest ( false , "><Value>Closed</Value></Field></Fields></Entity>" 1 , "><Value>Closed</Value></Field></Fields></Entity>" 0 , 200 ) . expectXmlBody ( "<Entity<sp>Type=\"defect\"><Fields><Field<sp>Name=\"status\"><Value>Closed</Value></Field></Fields></Entity>" ) . content (... | org . junit . Assert . assertEquals ( 86 , updated . getId ( ) ) |
testIsNewOnNewFile_shouldReturnTrue ( ) { initGitFileSystem ( ) ; writeToGfs ( "/test_file.txt" ) ; com . beijunyi . parallelgit . filesystem . io . GitFileAttributes attributes = readGitAttributes ( "/test_file.txt" ) ; "<AssertPlaceHolder>" ; } isNew ( ) { return origin . isMissing ( ) ; } | org . junit . Assert . assertTrue ( attributes . isNew ( ) ) |
hasChangedWhenPropertyIsUnchangedShouldReturnFalse ( ) { java . lang . String value = "value" ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withValue ( value ) . build ( ) ; boolean hasChanged = resourceEditProperty . hasChanged ( ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertFalse ( hasChanged ) |
getColumnWidth_Locale ( ) { user . setRemoteLdapAttributes ( java . util . Arrays . asList ( org . oscm . ui . beans . LDAP_ATTR_LOCALE ) ) ; java . lang . String expected = ( java . lang . String . valueOf ( ( ( UserImportBean . BASE_WIDTH ) / 4 ) ) ) + ( org . oscm . ui . beans . UserImportBeanTest . UNIT ) ; "<Asser... | org . junit . Assert . assertEquals ( expected , bean . getColumnWidth ( ) ) |
servicesWithNoConfigsInitialValue ( ) { org . apache . ambari . server . stack . StackModule sm = org . apache . ambari . server . stack . StackModuleTest . createStackModule ( "FooBar" , "2.4" , com . google . common . base . Optional . absent ( ) , com . google . common . collect . Lists . newArrayList ( repoInfo ( "... | org . junit . Assert . assertEquals ( servicesWithNoConfigs . size ( ) , 0 ) |
testAfter_before ( ) { final org . apache . rya . api . function . temporal . AfterTemporalInstant function = new org . apache . rya . api . function . temporal . AfterTemporalInstant ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apache... | org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . AfterTemporalFunctionsTest . VF . createLiteral ( false ) , rez ) |
testSpecialCase ( ) { org . spf4j . io . PipedOutputStreamTest . test ( "101" , 2 , true ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String , int , boolean ) { final org . spf4j . io . PipedOutputStream pos = new org . spf4j . io . PipedOutputStream ( buffSize ) ; final java . io . InputStream pis ; if ( buffere... | org . junit . Assert . assertTrue ( true ) |
whenNameSet_buildLocation ( ) { com . graphhopper . jsprit . core . problem . Location l = Location . Builder . newInstance ( ) . setName ( "mystreet<sp>6a" ) . setIndex ( 1 ) . build ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return null ; } | org . junit . Assert . assertEquals ( "mystreet<sp>6a" , l . getName ( ) ) |
testTrain_RegressionDataSet_ExecutorService ( ) { System . out . println ( "train" ) ; jsat . regression . RegressionDataSet trainSet = jsat . FixedProblems . getSimpleRegression1 ( 2000 , jsat . utils . random . RandomUtil . getRandom ( ) ) ; jsat . regression . RegressionDataSet testSet = jsat . FixedProblems . getSi... | org . junit . Assert . assertTrue ( ( ( errors / ( testSet . size ( ) ) ) < 1 ) ) |
iremove7 ( ) { org . roaringbitmap . buffer . MappeableContainer rc = new org . roaringbitmap . buffer . MappeableRunContainer ( ) ; rc . iadd ( 0 , 10 ) ; rc . iremove ( 0 , 15 ) ; "<AssertPlaceHolder>" ; } getCardinality ( ) { return ( ( int ) ( getLongCardinality ( ) ) ) ; } | org . junit . Assert . assertEquals ( 0 , rc . getCardinality ( ) ) |
test1 ( ) { "<AssertPlaceHolder>" ; } getByCode ( java . lang . String ) { return com . neovisionaries . i18n . LanguageAlpha3Code . getByCode ( code , true ) ; } | org . junit . Assert . assertNull ( com . neovisionaries . i18n . LanguageAlpha3Code . getByCode ( null ) ) |
testListWithDefaultFormattedDates ( ) { java . lang . String uriTemplate = "http://dummy/default/persons" ; java . nio . file . Path expectedResultFilePath = java . nio . file . Paths . get ( com . epimorphics . lda . tests . TestJSONFormatterUsesISOFormatting . TEST_BASE , "testPersonListWithDefaultFormattedDates.json... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldCreateWhiteMana ( ) { mage . Mana mana = mage . Mana . WhiteMana ( 1 ) ; "<AssertPlaceHolder>" ; } getWhite ( ) { return white ; } | org . junit . Assert . assertEquals ( 1 , mana . getWhite ( ) ) |
shouldNotValidate_singleCondition ( ) { java . lang . String assertion = "'toto'<sp>==<sp>'tata'" ; io . gravitee . gateway . services . healthcheck . eval . assertion . AssertionEvaluation evaluation = new io . gravitee . gateway . services . healthcheck . eval . assertion . AssertionEvaluation ( assertion ) ; boolean... | org . junit . Assert . assertFalse ( result ) |
getNextExecution_shouldGetTheCorrectRepeatInterval ( ) { java . util . Calendar startTime = java . util . Calendar . getInstance ( ) ; java . lang . Long repeatInterval = ( ( long ) ( 4 * 60 ) ) ; org . openmrs . scheduler . TaskDefinition taskDefinition = new org . openmrs . scheduler . TaskDefinition ( ) ; taskDefini... | org . junit . Assert . assertEquals ( startTime . getTime ( ) , nextTime ) |
testBuildEffectiveAuthorization_Same ( ) { de . persosim . simulator . protocols . ta . Authorization auth1 = new de . persosim . simulator . protocols . ta . Authorization ( field1 ) ; de . persosim . simulator . protocols . ta . Authorization auth2 = new de . persosim . simulator . protocols . ta . Authorization ( fi... | org . junit . Assert . assertEquals ( auth1 , effectiveAuth ) |
testDateParsing ( ) { java . lang . String start = "1970-01-01T05:00:00Z" ; java . util . Date date = toDate ( start ) ; "<AssertPlaceHolder>" ; print ( date . toString ( ) ) ; } toDate ( java . lang . String ) { java . text . SimpleDateFormat input_format = new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss'Z... | org . junit . Assert . assertTrue ( ( date != null ) ) |
testGetCar ( ) { org . springframework . context . support . ClassPathXmlApplicationContext ctx = new org . springframework . context . support . ClassPathXmlApplicationContext ( "com/brianway/learning/spring/ioc/factorybean/beans-factorybean.xml" ) ; com . brianway . learning . spring . ioc . factorybean . Car car1 = ... | org . junit . Assert . assertTrue ( ( car1 == car2 ) ) |
testGetScannerAndAppender ( ) { org . apache . tajo . catalog . Schema schema = new org . apache . tajo . catalog . Schema ( ) ; schema . addColumn ( "id" , TajoDataTypes . Type . INT4 ) ; schema . addColumn ( "age" , TajoDataTypes . Type . INT4 ) ; schema . addColumn ( "name" , TajoDataTypes . Type . TEXT ) ; org . ap... | org . junit . Assert . assertEquals ( 4 , i ) |
testGetActiveTreatmentNoAttributes ( ) { final io . rtr . alchemy . identities . Identity identity = mock ( io . rtr . alchemy . identities . Identity . class ) ; doReturn ( io . rtr . alchemy . identities . AttributesMap . empty ( ) ) . when ( identity ) . computeAttributes ( ) ; final io . rtr . alchemy . models . Ex... | org . junit . Assert . assertNull ( experiments . getActiveTreatment ( "exp" , identity ) ) |
testGetTitle ( ) { classUnderTest . setTitle ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return org . firebirdsql . squirrel . tab . IndexInfoTab . s_stringMgr . getString ( "IndexInfoTab.title" ) ; } | org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getTitle ( ) ) |
testGetStringBundler ( ) { com . liferay . petra . io . unsync . UnsyncStringWriter unsyncStringWriter = new com . liferay . petra . io . unsync . UnsyncStringWriter ( true ) ; com . liferay . petra . string . StringBundler stringBundler = ( ( com . liferay . petra . string . StringBundler ) ( com . liferay . petra . i... | org . junit . Assert . assertSame ( stringBundler , unsyncStringWriter . getStringBundler ( ) ) |
testKnownPaths ( ) { com . cloudera . labs . envelope . validate . Validation v = new com . cloudera . labs . envelope . validate . FilesystemPathAccessibleValidation ( "hello" ) ; "<AssertPlaceHolder>" ; } getKnownPaths ( ) { return com . google . common . collect . Sets . newHashSet ( ) ; } | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "hello" ) , v . getKnownPaths ( ) ) |
copyRAINoOutputTest ( ) { @ net . imagej . ops . copy . SuppressWarnings ( "unchecked" ) net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . real . DoubleType > output = ( ( net . imglib2 . RandomAccessibleInterval < net . imglib2 . type . numeric . real . DoubleType > ) ( ops . run ( net . imag... | org . junit . Assert . assertEquals ( inc . get ( ) . get ( ) , outRA . get ( ) . get ( ) , 0.0 ) |
testGetRelatedSuggestionsWithEmptyList ( ) { setUpSearchedKeywords ( "q" , "a<sp>b" ) ; java . util . List < com . liferay . portal . search . web . internal . suggestions . display . context . SuggestionDisplayContext > suggestionDisplayContexts = buildRelatedQueriesSuggestions ( java . util . Collections . emptyList ... | org . junit . Assert . assertTrue ( suggestionDisplayContexts . isEmpty ( ) ) |
canCreateMigrationPlanFromTenantToNoTenant ( ) { org . camunda . bpm . engine . repository . ProcessDefinition sharedDefinition = testHelper . deployAndGetDefinition ( ProcessModels . ONE_TASK_PROCESS ) ; org . camunda . bpm . engine . repository . ProcessDefinition tenantDefinition = testHelper . deployForTenantAndGet... | org . junit . Assert . assertNotNull ( migrationPlan ) |
generateDateOfBirthShouldGenerateValidDates ( ) { org . mafagafogigante . dungeon . date . Date now = new org . mafagafogigante . dungeon . date . Date ( 1000 , 1 , 1 ) ; for ( int age = 0 ; age < 100 ; age ++ ) { org . mafagafogigante . dungeon . entity . creatures . DateOfBirthGenerator dateOfBirthGenerator = new org... | org . junit . Assert . assertTrue ( ( ( duration . getSeconds ( ) ) < maximumSeconds ) ) |
testDeselectWithWrongIndex ( ) { combo . add ( "item1" ) ; combo . add ( "item2" ) ; combo . add ( "item3" ) ; combo . select ( 1 ) ; combo . deselect ( 0 ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells . size ( ) ) != 0 ) { r... | org . junit . Assert . assertEquals ( 1 , combo . getSelectionIndex ( ) ) |
when_setAllDatasets_then_insituFilterActive ( ) { org . n52 . io . request . IoParameters parameters = org . n52 . io . request . IoParameters . createDefaults ( ) ; org . n52 . io . request . FilterResolver resolver = createResolver ( parameters ) ; "<AssertPlaceHolder>" ; } hasInsituFilter ( ) { return ( parameters .... | org . junit . Assert . assertFalse ( resolver . hasInsituFilter ( ) ) |
testGetBodyLength ( ) { org . apache . rocketmq . jms . domain . message . JmsBytesMessage bytesMessage = new org . apache . rocketmq . jms . domain . message . JmsBytesMessage ( receiveData ) ; System . out . println ( bytesMessage . getBodyLength ( ) ) ; "<AssertPlaceHolder>" ; } getBodyLength ( ) { return getData ( ... | org . junit . Assert . assertEquals ( bytesMessage . getBodyLength ( ) , receiveData . length ) |
testComplexTypes ( ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper util = new com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper ( dynamo ) ; com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . ComplexTypeIntegrationTest . ComplexClass ... | org . junit . Assert . assertEquals ( obj , loaded ) |
extractFromPage229 ( ) { if ( ( this . getClass ( ) ) != ( com . itextpdf . layout . SimpleTextExtractionStrategyTest . class ) ) return ; com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( ( ( com . itextpdf . layo... | org . junit . Assert . assertEquals ( text1 , text2 ) |
testValueOf ( ) { for ( org . jscep . transaction . PkiStatus status : org . jscep . transaction . PkiStatus . values ( ) ) { "<AssertPlaceHolder>" ; } } valueOf ( int ) { for ( org . jscep . transaction . PkiStatus status : org . jscep . transaction . PkiStatus . values ( ) ) { if ( ( status . getValue ( ) ) == value ... | org . junit . Assert . assertSame ( status , org . jscep . transaction . PkiStatus . valueOf ( status . getValue ( ) ) ) |
trackNeedsTobeEncodedToStandardInputMovExtensionOnlyMp4AllowedReturnsTrue ( ) { org . opencastproject . mediapackage . Track track = org . easymock . EasyMock . createMock ( org . opencastproject . mediapackage . Track . class ) ; org . easymock . EasyMock . expect ( track . getURI ( ) ) . andReturn ( new java . net . ... | org . junit . Assert . assertTrue ( result ) |
testVisibility ( ) { org . jboss . shrinkwrap . api . spec . JavaArchive module = org . jboss . shrinkwrap . api . ShrinkWrap . create ( org . jboss . shrinkwrap . api . spec . JavaArchive . class , "biz.wiz.quiz-1.0.0.GA.car" ) ; module . addClasses ( biz . wiz . quiz . $module_ . class , biz . wiz . quiz . run_ . cla... | org . junit . Assert . assertTrue ( defaultFile . exists ( ) ) |
containsCorrectFilterForOrientation1 ( ) { net . coobird . thumbnailator . tasks . io . URLImageSource source = new net . coobird . thumbnailator . tasks . io . URLImageSource ( new java . net . URL ( "file:test-resources/Exif/source_1.jpg" ) ) ; net . coobird . thumbnailator . ThumbnailParameter param = new net . coob... | org . junit . Assert . assertTrue ( param . getImageFilters ( ) . isEmpty ( ) ) |
defaultLastDownloadedWhenSingleAssetMarkedAsDownloaded ( ) { org . sonatype . nexus . repository . storage . Bucket bucket = createBucket ( org . sonatype . nexus . repository . search . DefaultComponentMetadataProducerTest . REPO_NAME ) ; org . sonatype . nexus . repository . storage . Component component = createDeta... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected . lastDownloaded ( ) ) ) |
testGoodName ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; java . lang . Class < ? > test = org . apache . hadoop . io . WritableName . getClass ( "long" , conf ) ; "<AssertPlaceHolder>" ; } getClass ( java . lang . String , org . apache . hadoop . conf... | org . junit . Assert . assertTrue ( ( test != null ) ) |
testAccessUpdateUserWithoutRights ( ) { net . maritimecloud . identityregistry . model . database . entities . User user = new net . maritimecloud . identityregistry . model . database . entities . User ( ) ; user . setMrn ( "urn:mrn:mcl:user:dma:thc" ) ; user . setFirstName ( "Thomas" ) ; user . setLastName ( "ROLE_SE... | org . junit . Assert . assertTrue ( false ) |
testFindAll ( ) { org . oscarehr . common . model . SecPrivilege secPrivilege1 = new org . oscarehr . common . model . SecPrivilege ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( secPrivilege1 ) ; secPrivilege1 . setPrivilege ( "alpha" ) ; dao . persist ( secPrivileg... | org . junit . Assert . assertTrue ( true ) |
testCreateKeyForMetricValuesByIpAndDate ( ) { java . lang . String actual = metricDAO . createKeyForMetricValuesByIpAndDate ( "someip" , java . lang . System . currentTimeMillis ( ) ) ; java . lang . String date = new java . text . SimpleDateFormat ( "ddMMyyyy" ) . format ( new java . util . Date ( java . lang . System... | org . junit . Assert . assertEquals ( expected , actual ) |
typedObjectFromDoubleAndDouble ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "double" ) ; java . lang . Double jsonValue = 1.2345678901234567E9 ; java . lang . Object result = com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndField ( jso... | org . junit . Assert . assertEquals ( jsonValue , result ) |
whenNoBreaks_thenGoThroughBlocks ( ) { java . lang . String animal = "DOG" ; "<AssertPlaceHolder>" ; } forgetBreakInSwitch ( java . lang . String ) { java . lang . String result ; switch ( animal ) { case "DOG" : System . out . println ( "domestic<sp>animal" ) ; result = "domestic<sp>animal" ; default : System . out . ... | org . junit . Assert . assertEquals ( "unknown<sp>animal" , s . forgetBreakInSwitch ( animal ) ) |
testLocalRepoExplicit ( ) { java . util . Hashtable < java . lang . String , java . lang . Object > config = new java . util . Hashtable ( ) ; config . put ( "org.ops4j.pax.url.mvn.localRepository" , "foo/bar" ) ; "<AssertPlaceHolder>" ; } getLocalRepoFromConfig ( java . util . Dictionary ) { java . lang . String path ... | org . junit . Assert . assertEquals ( "foo/bar" , org . apache . karaf . bundle . core . internal . MavenConfigService . getLocalRepoFromConfig ( config ) ) |
parse ( ) { net . openhft . chronicle . wire . LongConverter c = Base95LongConverter . INSTANCE ; System . out . println ( c . asString ( ( - 1L ) ) ) ; for ( java . lang . String s : ",a,ab,abc,abcd,ab.de,123+56,1234567,12345678,123456789,z23456789,0z23456789,<8S@[|bcnB" . split ( "," ) ) { long v = c . parse ( s ) ; ... | org . junit . Assert . assertEquals ( s , sb . toString ( ) ) |
shouldNotBeAnAdmin ( ) { org . candlepin . auth . UserPrincipal up = new org . candlepin . auth . UserPrincipal ( "notadmin" , null , false ) ; "<AssertPlaceHolder>" ; } hasFullAccess ( ) { return true ; } | org . junit . Assert . assertFalse ( up . hasFullAccess ( ) ) |
removeDriftTest_2d_WithGaps ( ) { de . biomedical_imaging . traJ . Trajectory t = new de . biomedical_imaging . traJ . Trajectory ( 2 ) ; de . biomedical_imaging . traJ . Trajectory tWithDrift = new de . biomedical_imaging . traJ . Trajectory ( 2 ) ; int z = 0 ; double [ ] drift = new double [ ] { 1 , 2 , 0 } ; for ( i... | org . junit . Assert . assertArrayEquals ( t . getPositionsAsArray ( ) , tCorrected . getPositionsAsArray ( ) ) |
testGetValue_1 ( ) { com . impetus . ankush . agent . action . impl . Property fixture = new com . impetus . ankush . agent . action . impl . Property ( ) ; fixture . setDescription ( "" ) ; fixture . setName ( "" ) ; fixture . setValue ( "" ) ; java . lang . String result = fixture . getValue ( ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( "" , result ) |
testExistingGetter ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "class<sp>Foo<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "@Property<sp>int<sp>foo" ) ; _builder . newLine... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 5 ) , getFoo . invoke ( instance ) ) |
testTimeoutResultAndTimeoutSetTooHigh ( ) { setupTask ( new com . sun . sgs . app . TransactionTimeoutException ( "timed<sp>out" ) ) ; org . easymock . EasyMock . expect ( task . getTryCount ( ) ) . andStubReturn ( ( ( NowOrLaterRetryPolicy . DEFAULT_RETRY_BACKOFF_THRESHOLD ) + 1 ) ) ; org . easymock . EasyMock . expec... | org . junit . Assert . assertEquals ( SchedulerRetryAction . RETRY_LATER , action ) |
shouldReturnNullIfIntegerFieldIsNull ( ) { defaultEntity . setField ( com . qcadoo . model . internal . DefaultEntityTest . INTEGER_FIELD_NAME , null ) ; java . lang . Integer result = defaultEntity . getIntegerField ( com . qcadoo . model . internal . DefaultEntityTest . INTEGER_FIELD_NAME ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertNull ( result ) |
testGetWithHit ( ) { final edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "jpg" ) ; final edu . illinois . library . cantaloupe . image . Info info = new edu . illinois . library . cantaloupe . image . Info ( ) ; instance . put ( ... | org . junit . Assert . assertEquals ( info , actualInfo ) |
testS13ClientSessionStartsIdleState ( ) { org . jdiameter . api . s13 . ClientS13Session session = getAppSession ( org . jdiameter . api . s13 . ClientS13Session . class , new org . jdiameter . common . impl . app . s13 . S13SessionFactoryImpl ( org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . se... | org . junit . Assert . assertEquals ( state . IDLE , state ) |
validate_shouldPassValidationIfAllValuesPresent ( ) { org . openmrs . Obs obs = new org . openmrs . Obs ( ) ; obs . setPerson ( org . openmrs . api . context . Context . getPersonService ( ) . getPerson ( 2 ) ) ; obs . setConcept ( org . openmrs . api . context . Context . getConceptService ( ) . getConcept ( 5089 ) ) ... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
shouldBeSatisfiedByCorrectIngredients ( ) { com . manning . siia . kitchen . domain . Ingredient ingredient = mock ( com . manning . siia . kitchen . domain . Ingredient . class ) ; com . manning . siia . kitchen . domain . Product product = mock ( com . manning . siia . kitchen . domain . Product . class ) ; given ( i... | org . junit . Assert . assertThat ( recipe . isSatisfiedBy ( java . util . Arrays . asList ( product ) ) , org . hamcrest . Matchers . is ( true ) ) |
testGetValidatedEntityContextsNoEntitiesInList ( ) { org . slc . sli . api . config . EntityDefinition def = createEntityDef ( "student" ) ; org . slc . sli . domain . Entity student1 = createEntity ( "student" , 1 ) ; org . mockito . Mockito . when ( edOrgHelper . getDirectEdorgs ( org . mockito . Mockito . eq ( stude... | org . junit . Assert . assertTrue ( validatedEntityContexts . isEmpty ( ) ) |
testSimpleLowerPriorityAddition ( ) { com . killeent . PriorityQueue . PriorityQueue < java . lang . String > heap = new com . killeent . PriorityQueue . Heap < java . lang . String > ( new com . killeent . HeapTest . StringComparator ( ) ) ; heap . add ( "b" ) ; heap . add ( "a" ) ; "<AssertPlaceHolder>" ; } peek ( ) ... | org . junit . Assert . assertEquals ( "a" , heap . peek ( ) ) |
testMultipleStages ( ) { final org . openimaj . hadoop . mapreduce . MultiStagedJob mjob = new org . openimaj . hadoop . mapreduce . MultiStagedJob ( initialFile . getAbsolutePath ( ) , outputFile . getAbsolutePath ( ) , new java . lang . String [ ] { } ) ; mjob . queueStage ( new org . openimaj . hadoop . mapreduce . ... | org . junit . Assert . assertTrue ( ( aint == ( cint + 1 ) ) ) |
test_getUrl ( ) { java . lang . String string = browser . getUrl ( ) ; "<AssertPlaceHolder>" ; } getUrl ( ) { if ( ( ( url ) == null ) || ( ( url . length ( ) ) == 0 ) ) return WebKit . ABOUT_BLANK ; return url ; } | org . junit . Assert . assertNotNull ( string ) |
testIsSpecMatchConfigSpecWithCurrentShapingPolicyDisabled ( ) { int currentNumPorts = 512 ; int currentvlanId = 100 ; boolean currentAutoExpand = true ; com . vmware . vim25 . DVSTrafficShapingPolicy currentTrafficShapingPolicy = new com . vmware . vim25 . DVSTrafficShapingPolicy ( ) ; com . vmware . vim25 . BoolPolicy... | org . junit . Assert . assertFalse ( specCompareResult ) |
testMonthNameDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>MONTHNAME(d)<sp>as<sp>\"MONTHNAME\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuer... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testWeightAndJsonWithTensorflowScope ( ) { org . deeplearning4j . nn . multilayer . MultiLayerNetwork model = loadModel ( "modelimport/keras/tfscope/model.json.with.tensorflow.scope" , "modelimport/keras/tfscope/model.weight.with.tensorflow.scope" ) ; "<AssertPlaceHolder>" ; } loadModel ( java . lang . String , java . ... | org . junit . Assert . assertNotNull ( model ) |
testCustomFormatSerialization ( ) { java . time . format . DateTimeFormatter formatter = java . time . format . DateTimeFormatter . ofPattern ( "HH:mm:ss" ) ; com . owlike . genson . Genson genson = createFormatterGenson ( formatter , java . time . LocalTime . class ) ; java . time . LocalTime dt = java . time . LocalT... | org . junit . Assert . assertEquals ( toJsonQuotedString ( formattedValue ) , genson . serialize ( dt ) ) |
checkOtherDriverCompatibility ( ) { org . mariadb . jdbc . UrlParser jdbc = org . mariadb . jdbc . UrlParser . parse ( "jdbc:h2:mem:RZM;DB_CLOSE_DELAY=-1" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return org . mariadb . jdbc . UrlParser . parse ( url , new java . util . Properties ( ) ) ; } | org . junit . Assert . assertTrue ( ( jdbc == null ) ) |
testSetArrayStart ( ) { final org . apache . commons . lang3 . builder . ToStringStyle style = new org . apache . commons . lang3 . builder . ToStringStyleTest . ToStringStyleImpl ( ) ; style . setArrayStart ( null ) ; "<AssertPlaceHolder>" ; } getArrayStart ( ) { return arrayStart ; } | org . junit . Assert . assertEquals ( "" , style . getArrayStart ( ) ) |
createPRPA201306ForPatientNotFoundSenderNull ( ) { org . hl7 . v3 . PRPAIN201306UV02 result ; gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms transforms = new gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms ( ) ; result = transforms . createPRPA201306ForPatientNotFound ( ... | org . junit . Assert . assertNull ( result ) |
testMarshalUnmarshallDes ( ) { final javax . crypto . KeyGenerator generator = javax . crypto . KeyGenerator . getInstance ( "DES" ) ; final org . apache . camel . converter . crypto . CryptoDataFormat cryptoFormat = new org . apache . camel . converter . crypto . CryptoDataFormat ( "DES" , generator . generateKey ( ) ... | org . junit . Assert . assertEquals ( "password" , result . trim ( ) ) |
invalidStringLessOrEqualConstraintShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createLessOrEqualDefinition ( ToscaTypes . STRING . toString ( ) , "value" ) , alien4... | org . junit . Assert . assertEquals ( 2 , violations . size ( ) ) |
testJndiJdbcPool ( ) { com . enioka . jqm . test . helpers . CreationTools . createDatabaseProp ( "jmxEnabled" 3 , "org.hsqldb.jdbcDriver" , "jmxEnabled" 7 , "SA" , "jmxEnabled" 1 , cnx , "jmxEnabled" 0 , null ) ; cnx . runUpdate ( "jmxEnabled" 2 , "true" , "jmxEnabled" ) ; cnx . commit ( ) ; addAndStartEngine ( ) ; co... | org . junit . Assert . assertEquals ( 0 , nb ) |
testBadGet ( ) { org . easymock . EasyMock . replay ( s3Client , s3Transfer ) ; org . opencastproject . assetmanager . impl . storage . StoragePath path = new org . opencastproject . assetmanager . impl . storage . StoragePath ( org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ORG_ID , org . open... | org . junit . Assert . assertFalse ( streamOpt . isSome ( ) ) |
headsWithQueryParametersFrom1_0OriginsViaExplicitProxiesCanNotBeCacheableEvenWithExpires ( ) { policy = new org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy ( 0 , true , true , true ) ; request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "HEAD" , "/foo?s=bar" ) ; respo... | org . junit . Assert . assertFalse ( policy . isResponseCacheable ( request , response ) ) |
testSerial ( ) { org . apache . commons . math4 . stat . descriptive . moment . VectorialCovariance stat = new org . apache . commons . math4 . stat . descriptive . moment . VectorialCovariance ( points [ 0 ] . length , true ) ; "<AssertPlaceHolder>" ; } serializeAndRecover ( java . lang . Object ) { try { java . io . ... | org . junit . Assert . assertEquals ( stat , org . apache . commons . math4 . TestUtils . serializeAndRecover ( stat ) ) |
postProcessTokensCut ( ) { jetbrains . jetpad . base . Value < java . util . List < jetbrains . jetpad . hybrid . parser . Token > > lastSeenTokens = installTrackingPostProcessor ( true ) ; jetbrains . jetpad . hybrid . BaseHybridEditorEditingTest . type ( "1" ) ; selectLeft ( 1 ) ; jetbrains . jetpad . hybrid . BaseHy... | org . junit . Assert . assertTrue ( lastSeenTokens . get ( ) . isEmpty ( ) ) |
getGroupDisplayName ( ) { java . lang . String group = "vmmgrp1" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_CustomLDAPTest . c , "getGroupDisplayName" , "Checking<sp>with<sp>a<sp>valid<sp>group." ) ; "<AssertPlaceHolder>" ; } getGroupDisplay... | org . junit . Assert . assertEquals ( "vmmgrp1" , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_CustomLDAPTest . servlet . getGroupDisplayName ( group ) ) |
testIsTableExistsNull ( ) { com . j256 . ormlite . support . DatabaseConnectionProxy proxy = new com . j256 . ormlite . support . DatabaseConnectionProxy ( null ) ; "<AssertPlaceHolder>" ; proxy . close ( ) ; } isTableExists ( java . lang . String ) { if ( ( proxy ) == null ) { return false ; } else { return proxy . is... | org . junit . Assert . assertFalse ( proxy . isTableExists ( "foo" ) ) |
testCountActiveWatingListNames ( ) { java . lang . String isHistory = "Y" ; java . lang . String isNotHistory = "N" ; org . oscarehr . common . model . WaitingListName waitingListName1 = new org . oscarehr . common . model . WaitingListName ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTes... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testScan_ts_same ( ) { recreateTable ( ) ; java . util . Date ts = parse ( "2000-01-01" , "yyyy-MM-dd" ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( rowKey_ForTest ) ; put . add ( allen . studyhbase . ColumnFamilyNameBytes , allen . studyhbase . QName1 , ts . ... | org . junit . Assert . assertTrue ( ( ( resultRowKeys . size ( ) ) == 0 ) ) |
a03_returnInt ( ) { "<AssertPlaceHolder>" ; } returnInt ( ) { return 1 ; } | org . junit . Assert . assertEquals ( 1 , proxy . returnInt ( ) ) |
test91getXAuditMapSearchCount ( ) { org . apache . ranger . common . SearchCriteria testSearchCriteria = createsearchCriteria ( ) ; testSearchCriteria . addParam ( "xUserId" , org . apache . ranger . biz . TestXUserMgr . userId ) ; org . apache . ranger . view . VXAuditMap vXAuditMap = getVXAuditMap ( ) ; java . util .... | org . junit . Assert . assertEquals ( vXLong . getValue ( ) , vXLong1 . getValue ( ) ) |
testInjectContext ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( context ) |
testHighlightWithLinkInParagraph ( ) { java . lang . String term = "Bart<sp>Simpson" ; java . lang . String publication = "<p>Bart<sp>Simpson<sp>is<sp>the<sp>cooleast<sp>sk8ter<sp>in<sp>the<sp>world.<sp>Miss<sp>Krabappel<sp>doesn\'t<sp>see<sp>le<sp>good<sp>part<sp>in<sp><a<sp>href=\"www.simpson.com\"<sp>id=\"Bart<sp>Si... | org . junit . Assert . assertEquals ( expResult , result ) |
testStepBroadcasted ( ) { final int [ ] bshape = new int [ ] { 1 , 5 , 1 } ; final int [ ] shape = new int [ ] { 4 , 5 , 6 } ; org . eclipse . january . dataset . ILazyDataset ld = org . eclipse . january . dataset . Random . lazyRand ( Dataset . INT32 , "Metadata1" , bshape ) ; org . eclipse . january . metadata . int... | org . junit . Assert . assertEquals ( slicedStep . getShape ( ) [ 1 ] , lazyDataset . getShape ( ) [ 1 ] ) |
testMissedInvertedMatch ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "^foo" ) ; rule . setInverted ( true ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "foobar" ) ; org . graylog2 . streams . matchers . StreamRuleMa... | org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) ) |
testExpandValueSetPropertySearchWithRegexExcludeNoFilter ( ) { createLoincSystemWithSomeCodes ( ) ; java . util . List < java . lang . String > codes ; ca . uhn . fhir . jpa . provider . dstu3 . ValueSet vs ; ca . uhn . fhir . jpa . provider . dstu3 . ValueSet outcome ; ca . uhn . fhir . jpa . provider . dstu3 . ValueS... | org . junit . Assert . assertThat ( codes , org . hamcrest . Matchers . empty ( ) ) |
incrementStatistic ( ) { com . madgnome . jira . plugins . jirachievements . data . ao . StatisticRefEnum statRef = com . madgnome . jira . plugins . jirachievements . data . ao . StatisticRefEnum . CREATED_ISSUE_COUNT ; createStatisticRef ( statRef ) ; com . madgnome . jira . plugins . jirachievements . data . ao . Us... | org . junit . Assert . assertEquals ( daoService . get ( userWrapper , statRef ) . getValue ( ) , 3 ) |
getConnectionFromStatement ( ) { try ( io . sniffy . sql . Connection connection = io . sniffy . sql . DriverManager . getConnection ( "sniffy:jdbc:h2:mem:" , "sa" , "sa" ) ; io . sniffy . sql . Statement statement = connection . createStatement ( ) ) { "<AssertPlaceHolder>" ; } } getConnection ( ) { if ( null == ( dat... | org . junit . Assert . assertEquals ( connection , statement . getConnection ( ) ) |
testListing ( ) { java . util . List < org . libreplan . business . orders . entities . Order > orderList = orderDAO . getOrders ( ) ; org . libreplan . business . orders . entities . Order newOrder = createValidOrder ( ) ; orderDAO . save ( newOrder ) ; "<AssertPlaceHolder>" ; } getOrders ( ) { return new org . librep... | org . junit . Assert . assertThat ( orderDAO . getOrders ( ) . size ( ) , org . hamcrest . CoreMatchers . equalTo ( ( ( orderList . size ( ) ) + 1 ) ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.