input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSingletonAnnotationResultsInCacheProperty ( ) { com . picocontainer . MutablePicoContainer mpc = new com . picocontainer . containers . JSR330PicoContainer ( ) . addComponent ( com . picocontainer . containers . JSR330PicoContainerTestCase . TestSingletonAnnotation . class ) ; "<AssertPlaceHolder>" ; } getComponent... | org . junit . Assert . assertSame ( mpc . getComponent ( com . picocontainer . containers . JSR330PicoContainerTestCase . TestSingletonAnnotation . class ) , mpc . getComponent ( com . picocontainer . containers . JSR330PicoContainerTestCase . TestSingletonAnnotation . class ) ) |
getStatementByShortName ( ) { org . apache . ibatis . session . Configuration configuration = getConfiguration ( ) ; org . apache . ibatis . mapping . MappedStatement selectPet = configuration . getMappedStatement ( "selectPet" ) ; "<AssertPlaceHolder>" ; } getMappedStatement ( java . lang . String ) { return this . ge... | org . junit . Assert . assertNotNull ( selectPet ) |
testScanFilterAndTrue ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . filter ( builder . call ( Sq... | org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) ) |
testDelegateIsAccessible ( ) { com . picocontainer . behaviors . AbstractBehavior . AbstractChangedBehavior componentAdapter = ( ( com . picocontainer . behaviors . AbstractBehavior . AbstractChangedBehavior ) ( createComponentFactory ( ) . createComponentAdapter ( new com . picocontainer . monitors . NullComponentMoni... | org . junit . Assert . assertNotNull ( componentAdapter . getDelegate ( ) ) |
testFormatCount ( ) { "<AssertPlaceHolder>" ; } formatCount ( ) { if ( ( org . openscience . cdk . io . WriterFactory . formats ) == null ) loadFormats ( ) ; return org . openscience . cdk . io . WriterFactory . formats . size ( ) ; } | org . junit . Assert . assertTrue ( ( ( factory . formatCount ( ) ) > 0 ) ) |
testPolicyCtorByteArray ( ) { byte [ ] testInput = "this<sp>is<sp>a<sp>test" . getBytes ( org . hyperledger . fabric . sdk . UTF_8 ) ; org . hyperledger . fabric . sdk . ChaincodeEndorsementPolicy fakePolicy = new org . hyperledger . fabric . sdk . ChaincodeEndorsementPolicy ( ) ; fakePolicy . fromBytes ( testInput ) ;... | org . junit . Assert . assertEquals ( fakePolicy . getChaincodeEndorsementPolicyAsBytes ( ) , testInput ) |
testConnection ( ) { org . eclipse . birt . report . data . oda . jdbc . Connection conn = new org . eclipse . birt . report . data . oda . jdbc . Connection ( ) ; "<AssertPlaceHolder>" ; } isOpen ( ) { return isOpen ; } | org . junit . Assert . assertFalse ( conn . isOpen ( ) ) |
testVarAndArgs_Disabled ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( ( ( "<cffunction<sp>name=\"test\">\r\n" + "<sp>" ) + "<!---CFLINT-DISABLE<sp>ARG_DEFAULT_MISSING<sp>--->" ) + "<cfargument<sp>name=\"xyz\">\r\n" ) + "</cffunction>\r\n" ) + "</cfcomponent>" ) ; com . cflint . api . CFLintResul... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
shouldBuildGlobalTableWithQueryaIbleStoreName ( ) { final org . apache . kafka . streams . kstream . internals . MaterializedInternal < java . lang . String , java . lang . String , org . apache . kafka . streams . state . KeyValueStore < org . apache . kafka . common . utils . Bytes , byte [ ] > > materializedInternal... | org . junit . Assert . assertEquals ( "globalTable" , table1 . queryableStoreName ( ) ) |
getOrNull_A$ ( ) { com . m3 . scalaflavor4j . None < java . lang . Object > none = new com . m3 . scalaflavor4j . None < java . lang . Object > ( ) ; java . lang . Object actual = none . getOrNull ( ) ; java . lang . Object expected = null ; "<AssertPlaceHolder>" ; } getOrNull ( ) { return null ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testExtraConfig ( ) { java . lang . String key = "test.extra.config" ; java . lang . String oldValue = "old<sp>value" ; java . lang . String newValue = "new<sp>value" ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . set ( ( ( org . apache . hadoop . tra... | org . junit . Assert . assertEquals ( newValue , wrapped . get ( key ) ) |
testStatisticsPairOnEmptyStream ( ) { io . reactivex . Flowable < java . lang . Integer > nums = io . reactivex . Flowable . empty ( ) ; boolean isEmpty = nums . compose ( com . github . davidmoten . rx2 . flowable . Transformers . collectStats ( com . github . davidmoten . rx2 . Functions . < java . lang . Integer > i... | org . junit . Assert . assertTrue ( isEmpty ) |
testEvaluates ( ) { org . pentaho . big . data . kettle . plugins . job . AbstractJobEntryTest . TestJobEntry jobEntry = new org . pentaho . big . data . kettle . plugins . job . AbstractJobEntryTest . TestJobEntry ( ) ; "<AssertPlaceHolder>" ; } evaluates ( ) { return true ; } | org . junit . Assert . assertTrue ( jobEntry . evaluates ( ) ) |
testConvertFoo ( ) { java . sql . Timestamp result = underTest . convert ( "foo" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( va... | org . junit . Assert . assertNull ( result ) |
topicPolicyIsCorrectlyRetrieved ( ) { java . lang . String topicName = com . google . cloud . examples . pubsub . snippets . ITTopicAdminClientSnippets . topics [ 0 ] ; com . google . cloud . examples . pubsub . snippets . ITTopicAdminClientSnippets . topicAdminClientSnippets . createTopic ( topicName ) ; com . google ... | org . junit . Assert . assertNotNull ( policy ) |
testDataSourceIsBound ( ) { javax . sql . DataSource ds = ( ( javax . sql . DataSource ) ( context . lookup ( "java:jboss/datasources/MyDS" ) ) ) ; "<AssertPlaceHolder>" ; } lookup ( java . lang . String ) { return new org . wildfly . swarm . microprofile . faulttolerance . deployment . MicroProfileFaultToleranceExtens... | org . junit . Assert . assertNotNull ( ds ) |
testUsesSecure_True ( ) { com . eclipsesource . jaxrs . provider . security . impl . SecurityContextImpl context = new com . eclipsesource . jaxrs . provider . security . impl . SecurityContextImpl ( javax . ws . rs . core . SecurityContext . BASIC_AUTH , mock ( java . security . Principal . class ) , true , null ) ; b... | org . junit . Assert . assertTrue ( secure ) |
testLeeg ( ) { final nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder builder = new nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . model . hisvolledig ... | org . junit . Assert . assertTrue ( ( ( brpInhoud . size ( ) ) == 0 ) ) |
testSignDataOnToken ( ) { final java . lang . String pkcs11ProvName = org . nhindirect . common . util . TestUtils . setupSafeNetToken ( ) ; if ( ! ( org . apache . commons . lang . StringUtils . isEmpty ( pkcs11ProvName ) ) ) { final java . security . KeyStore ks = java . security . KeyStore . getInstance ( "PKCS11" )... | org . junit . Assert . assertNotNull ( theSignature ) |
shouldFailIfCmsObjectDoesNotContainAnyCACertificate ( ) { net . ripe . rpki . commons . validation . ValidationResult validationResult = net . ripe . rpki . commons . validation . ValidationResult . withLocation ( "n/a" ) ; net . ripe . rpki . commons . provisioning . cms . ProvisioningCmsObjectBuilder builder = new ne... | org . junit . Assert . assertTrue ( validationResult . hasFailures ( ) ) |
multiThreadedInitialization ( ) { org . slf4j . impl . MultithreadedInitializationTest . LoggerAccessingThread [ ] accessors = org . slf4j . impl . MultithreadedInitializationTest . harness ( ) ; for ( org . slf4j . impl . MultithreadedInitializationTest . LoggerAccessingThread accessor : accessors ) { org . slf4j . im... | org . junit . Assert . assertEquals ( org . slf4j . impl . MultithreadedInitializationTest . EVENT_COUNT . get ( ) , events . size ( ) ) |
isValid ( ) { final java . time . LocalDate beginDatum = java . time . LocalDate . of ( 2010 , 1 , 1 ) ; final java . time . LocalDate eindDatum = java . time . LocalDate . of ( 2015 , 1 , 1 ) ; final nl . bzk . brp . beheer . service . selectie . SelectiePeriodeDTO selectiePeriodeDTO = new nl . bzk . brp . beheer . se... | org . junit . Assert . assertTrue ( selectiePeriodeDTO . isValid ( ) ) |
test15_BafterC_CbeforeB ( ) { java . util . List < com . liferay . faces . util . config . internal . FacesConfigDescriptor > facesConfigDescriptors = new java . util . ArrayList < com . liferay . faces . util . config . internal . FacesConfigDescriptor > ( ) ; com . liferay . faces . util . xml . OrderingTest . parseC... | org . junit . Assert . assertTrue ( message , assertion ) |
testEmptyValidators ( ) { setupComponentValidator ( ) ; setupBeanValidator ( ) ; "<AssertPlaceHolder>" ; controller . verify ( ) ; } checkValidator ( ) { controller . replay ( ) ; java . util . Collection < org . richfaces . validator . ValidatorDescriptor > validators = behavior . getValidators ( behaviorContext ) ; r... | org . junit . Assert . assertTrue ( checkValidator ( ) . isEmpty ( ) ) |
shouldAcceptGoodIpv4Address ( ) { host = new org . openstack . atlas . docs . loadbalancers . api . management . v1 . Host ( ) ; host . setIpv4Public ( "1.2.3.4" ) ; res = hv . validate ( host , org . openstack . atlas . api . mgmt . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . open... | org . junit . Assert . assertTrue ( resultMessage ( res , org . openstack . atlas . api . mgmt . validation . validators . PUT ) , res . passedValidation ( ) ) |
compareTo_shouldReturnPositiveIfStartDatesEqualAndThisEndDateNull ( ) { org . openmrs . PatientState patientState = new org . openmrs . PatientState ( ) ; patientState . setStartDate ( leftRange ) ; patientState . setEndDate ( null ) ; patientState . setVoided ( false ) ; org . openmrs . PatientState patientState2 = ne... | org . junit . Assert . assertTrue ( ( result > 0 ) ) |
testGetElement ( ) { final elemental2 . dom . HTMLElement expectedElement = mock ( elemental2 . dom . HTMLElement . class ) ; when ( view . getElement ( ) ) . thenReturn ( expectedElement ) ; final elemental2 . dom . HTMLElement actualElement = cardsGrid . getElement ( ) ; "<AssertPlaceHolder>" ; } getElement ( ) { ret... | org . junit . Assert . assertEquals ( expectedElement , actualElement ) |
testJsPay ( ) { me . hao0 . wepay . model . pay . JsPayRequest request = new me . hao0 . wepay . model . pay . JsPayRequest ( ) ; request . setBody ( "" ) ; request . setClientIp ( "127.0.0.1" ) ; request . setTotalFee ( 1 ) ; request . setNotifyUrl ( "http://www.xxx.com/notify" ) ; request . setOpenId ( openId ) ; req... | org . junit . Assert . assertNotNull ( resp ) |
testGetInstance ( ) { System . out . println ( "getInstance" ) ; java . lang . String mime = "image/gif" ; org . krysalis . barcode4j . output . bitmap . BitmapEncoder result = org . krysalis . barcode4j . output . bitmap . BitmapEncoderRegistry . getInstance ( mime ) ; "<AssertPlaceHolder>" ; try { org . krysalis . ba... | org . junit . Assert . assertNotNull ( result ) |
testRemovalOfNonJoinCritWithReference ( ) { java . lang . String proc = "" ; java . lang . String sql = "" ; sql += "SELECT<sp>" + ( ( ( ( ( ( ( ( "<sp>pm1.g1.e1<sp>AS<sp>pm1g1e1,<sp>" + "<sp>pm2.g2.e1<sp>AS<sp>pm2g2e1,<sp>" ) + "First" 7 ) + "SELECT<sp>" 2 ) + "FROM<sp>" ) + "First" 3 ) + "First" 8 ) + "SELECT<sp>" 5 ... | org . junit . Assert . assertTrue ( ( ! ( plan . requiresTransaction ( false ) ) ) ) |
testCreate_uuid ( ) { org . mitre . uma . model . PermissionTicket perm = permissionService . createTicket ( rs1 , scopes1 ) ; java . util . UUID uuid = java . util . UUID . fromString ( perm . getTicket ( ) ) ; "<AssertPlaceHolder>" ; } getTicket ( ) { return ticket ; } | org . junit . Assert . assertNotNull ( uuid ) |
testSetValue ( ) { root . addChild ( "foo" , org . kaazing . netx . http . internal . auth . NodeTest . NodeType . TEST ) ; DefaultDispatchChallengeHandler . Node < java . lang . String , org . kaazing . netx . http . internal . auth . NodeTest . NodeType > foo = root . getChild ( "foo" ) ; foo . appendValues ( "VALUE"... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "VALUE" ) , foo . getValues ( ) ) |
testUnsettableAttributeUnset ( ) { org . eclipselabs . mongoemf . junit . model . PrimaryObject primaryObject = ModelFactory . eINSTANCE . createPrimaryObject ( ) ; saveObject ( primaryObject ) ; org . eclipse . emf . ecore . resource . ResourceSet resourceSet = createResourceSet ( ) ; org . eclipse . emf . ecore . res... | org . junit . Assert . assertFalse ( object . isSetUnsettableAttribute ( ) ) |
testRetryFailOverDisabled ( ) { com . ctrip . platform . dal . dao . ha . HATest . hints = new com . ctrip . platform . dal . dao . ha . DalHints ( ) ; try { com . ctrip . platform . dal . dao . ha . HATest . database2 . query ( sql , new com . ctrip . platform . dal . dao . ha . StatementParameters ( ) , com . ctrip .... | org . junit . Assert . assertTrue ( true ) |
testLoadGeoIpDatabase ( ) { java . io . File dbPlainTextFile = new java . io . File ( ( ( remoteDir . getAbsolutePath ( ) ) + "/MaxmindDbEnrichmentLoaderTest.mmdb" ) ) ; org . apache . metron . integration . utils . TestUtils . write ( dbPlainTextFile , "hello<sp>world" ) ; java . io . File dbFile = new java . io . Fil... | org . junit . Assert . assertTrue ( fs . exists ( new org . apache . hadoop . fs . Path ( ( ( ( remoteDir ) + "/" ) + ( dbFile . getName ( ) ) ) ) ) ) |
changeAwayShouldShowPrivateSystemMessageWhenAway ( ) { me . setAwayMsg ( "monkey" ) ; final net . usikkert . kouchat . misc . User user1 = new net . usikkert . kouchat . misc . User ( "User1" , 1 ) ; final net . usikkert . kouchat . misc . User user2 = new net . usikkert . kouchat . misc . User ( "User2" , 2 ) ; final ... | org . junit . Assert . assertNull ( user2 . getPrivchat ( ) ) |
testProcessAckPerResponder ( ) { int timeoutMs = 5000 ; org . mockito . ArgumentCaptor < java . lang . Integer > timeoutCaptor = org . mockito . ArgumentCaptor . forClass ( io . github . tcdl . msb . collector . Integer . class ) ; io . github . tcdl . msb . collector . Collector < io . github . tcdl . msb . api . mess... | org . junit . Assert . assertThat ( timeoutCaptor . getValue ( ) ) |
equalsWithNullReturnsFalse ( ) { com . rackspacecloud . blueflood . types . BluefloodTimerRollup . Percentile value = new com . rackspacecloud . blueflood . types . BluefloodTimerRollup . Percentile ( ( ( java . lang . Number ) ( 123L ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( other in... | org . junit . Assert . assertFalse ( value . equals ( null ) ) |
whenCalculateDistanceBetweenTwoPointsResultTen ( ) { vkaretko . Task_3_1 . Point a = new vkaretko . Task_3_1 . Point ( 0.0 , 5.0 ) ; vkaretko . Task_3_1 . Point b = new vkaretko . Task_3_1 . Point ( 10.0 , 5.0 ) ; "<AssertPlaceHolder>" ; } distanceTo ( vkaretko . Task_3_1 . Point ) { return java . lang . Math . sqrt ( ... | org . junit . Assert . assertThat ( a . distanceTo ( b ) , org . hamcrest . core . Is . is ( 10.0 ) ) |
shouldDetectBothUberJars ( ) { org . infinispan . commons . util . uberjar . ManifestUberJarDuplicatedJarsWarner scanner = new org . infinispan . commons . util . uberjar . ManifestUberJarDuplicatedJarsWarner ( ) { @ org . infinispan . commons . util . uberjar . Override java . util . List < java . lang . String > getB... | org . junit . Assert . assertFalse ( isClasspathCorrect ) |
testTaskStartTimes ( ) { org . apache . hadoop . mapreduce . v2 . api . records . TaskId taskId = mock ( org . apache . hadoop . mapreduce . v2 . api . records . TaskId . class ) ; org . apache . hadoop . mapreduce . jobhistory . JobHistoryParser . TaskInfo taskInfo = mock ( org . apache . hadoop . mapreduce . jobhisto... | org . junit . Assert . assertTrue ( ( ( report . getStartTime ( ) ) == 10 ) ) |
throwsIfClosedOnPublish ( ) { try ( io . nats . client . NatsTestServer ts = new io . nats . client . NatsTestServer ( false ) ; io . nats . client . Connection nc = io . nats . client . Nats . connect ( ts . getURI ( ) ) ) { nc . close ( ) ; nc . publish ( "subject" , "replyto" , null ) ; "<AssertPlaceHolder>" ; } } p... | org . junit . Assert . assertFalse ( true ) |
testGetNodeUrl ( ) { net . holmes . core . business . configuration . ConfigurationManager configurationManager = new net . holmes . core . business . configuration . ConfigurationManagerImpl ( new net . holmes . core . test . TestConfigurationDao ( ) ) ; net . holmes . core . business . media . ResourceBundle resource... | org . junit . Assert . assertNotNull ( result ) |
testSimpleWithListener ( ) { try ( org . datavec . api . records . reader . impl . jdbc . JDBCRecordReader reader = getInitializedReader ( "SELECT<sp>*<sp>FROM<sp>Coffee" ) ) { org . datavec . api . records . listener . RecordListener recordListener = new org . datavec . api . records . listener . impl . LogRecordListe... | org . junit . Assert . assertTrue ( recordListener . invoked ( ) ) |
createTableSelectAllWithMultiPartitionTest ( ) { org . verdictdb . core . sqlobject . BaseTable base = new org . verdictdb . core . sqlobject . BaseTable ( "tpch" , "nation" , "t" ) ; org . verdictdb . core . sqlobject . SelectQuery relation = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Ar... | org . junit . Assert . assertEquals ( expected , actual ) |
testCoreRowTypeSet ( ) { org . gbif . ipt . model . Resource resource = new org . gbif . ipt . model . Resource ( ) ; org . gbif . ipt . model . ExtensionMapping mapping = new org . gbif . ipt . model . ExtensionMapping ( ) ; org . gbif . ipt . model . Extension ext = new org . gbif . ipt . model . Extension ( ) ; ext ... | org . junit . Assert . assertEquals ( Constants . DWC_ROWTYPE_TAXON , resource . getCoreRowType ( ) ) |
expiredLicenseTest ( ) { com . emc . vipr . model . sys . licensing . LicenseFeature license = new com . emc . vipr . model . sys . licensing . LicenseFeature ( ) ; java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . add ( Calendar . DATE , ( - 1 ) ) ; java . util . Date nowMinusOneDay = cal .... | org . junit . Assert . assertTrue ( license . isExpired ( ) ) |
testBackpressureFastPathNotInitiatedTwice ( ) { com . github . davidmoten . rtree3d . Entry < java . lang . Object , com . github . davidmoten . rtree3d . geometry . Box > e3 = com . github . davidmoten . rtree3d . RTreeTest . e ( 3 ) ; com . github . davidmoten . rtree3d . RTree < java . lang . Object , com . github .... | org . junit . Assert . assertEquals ( expected , found ) |
testVisitConcatFunction ( ) { es . ieci . tecdoc . fwktd . sql . node . expression . StringValue value1 = new es . ieci . tecdoc . fwktd . sql . node . expression . StringValue ( "String1<sp>con<sp>'<sp>simple" ) ; es . ieci . tecdoc . fwktd . sql . node . expression . StringValue value2 = new es . ieci . tecdoc . fwkt... | org . junit . Assert . assertNotNull ( concat . getSqlString ( ) ) |
testFormatStringBuilderObjectArrayIso8601 ( ) { final org . apache . logging . log4j . core . pattern . DatePatternConverter converter = org . apache . logging . log4j . core . pattern . DatePatternConverter . newInstance ( org . apache . logging . log4j . core . pattern . DatePatternConverterTest . ISO8601_FORMAT_OPTI... | org . junit . Assert . assertEquals ( expected , sb . toString ( ) ) |
test271c ( ) { org . apache . commons . jexl3 . JexlEngine jexl = createEngine ( ) ; org . apache . commons . jexl3 . JexlScript base = jexl . createScript ( "(x,<sp>y,<sp>z)->{<sp>2<sp>+<sp>x<sp>+<sp>y<sp>+<sp>z<sp>};" ) ; org . apache . commons . jexl3 . JexlScript y = base . curry ( 1 ) ; java . lang . Object result... | org . junit . Assert . assertEquals ( 8 , result ) |
testSetInternalEntryCurrentDirectoryWithFilename ( ) { org . pentaho . di . trans . TransMeta transMetaTest = new org . pentaho . di . trans . TransMeta ( ) ; transMetaTest . setFilename ( "hasFilename" ) ; transMetaTest . setVariable ( Const . INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY , "Original<sp>value<sp>defined<s... | org . junit . Assert . assertEquals ( "file:///C:/SomeFilenameDirectory" , transMetaTest . getVariable ( Const . INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY ) ) |
testGetSampleStructuredContent ( ) { java . lang . String xml = com . liferay . dynamic . data . mapping . test . util . DDMStructureTestUtil . getSampleStructuredContent ( "name" , "Joe<sp>Bloggs" ) ; java . lang . String content = ( ( java . lang . String ) ( _transformMethod . invoke ( null , null , getTokens ( ) , ... | org . junit . Assert . assertEquals ( "Joe<sp>Bloggs" , content ) |
testCrashBetweenSyncLogAndPersistPaxosData ( ) { org . apache . hadoop . hdfs . qjournal . server . JournalFaultInjector faultInjector = org . apache . hadoop . hdfs . qjournal . server . JournalFaultInjector . instance = org . mockito . Mockito . mock ( org . apache . hadoop . hdfs . qjournal . server . JournalFaultIn... | org . junit . Assert . assertTrue ( ( recovered >= 4 ) ) |
testVideoClassification ( ) { java . lang . Class klass = org . apache . streams . youtube . serializer . YoutubeEventClassifier . detectClass ( testVideo ) ; "<AssertPlaceHolder>" ; } detectClass ( java . lang . String ) { java . util . Objects . requireNonNull ( json ) ; com . google . common . base . Preconditions .... | org . junit . Assert . assertEquals ( klass , com . google . api . services . youtube . model . Video . class ) |
testNoAuthBearerOnly ( ) { org . keycloak . representations . adapters . config . AdapterConfig aConfig = config . readAdapterConfig ( ) ; aConfig . setBearerOnly ( true ) ; config . writeAdapterConfig ( aConfig ) ; org . geoserver . security . keycloak . GeoServerKeycloakFilter filter = new org . geoserver . security ... | org . junit . Assert . assertNull ( authn ) |
testGetProviderGroups ( ) { java . util . List < org . oscarehr . common . model . MyGroup > groups = dao . getProviderGroups ( "1" ) ; "<AssertPlaceHolder>" ; } getProviderGroups ( java . lang . String ) { javax . persistence . Query query = entityManager . createQuery ( "SELECT<sp>g<sp>FROM<sp>MyGroup<sp>g<sp>WHERE<s... | org . junit . Assert . assertNotNull ( groups ) |
testMatch03 ( ) { boolean matchResult = simpleNamePatternMatcher . matchesEndToEnd ( "a" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; } | org . junit . Assert . assertTrue ( matchResult ) |
noEventsShouldBeFetchedWhenThereAreNoEventsInTheRange ( ) { com . graphaware . module . timetree . domain . TimeInstant timeInstant1 = com . graphaware . module . timetree . domain . TimeInstant . instant ( dateToMillis ( 2012 , 11 , 2 ) ) . with ( Resolution . MILLISECOND ) ; com . graphaware . module . timetree . dom... | org . junit . Assert . assertEquals ( 0 , events . size ( ) ) |
unmarshallsRootElementToDynamicallyImplementedRootType ( ) { com . sjl . dsl4xml . LegacyDocumentReader < com . sjl . dsl4xml . sax . DynamicImplementationTestBase . Root > _r = newRootOnlyUnmarshaller ( ) ; com . sjl . dsl4xml . sax . DynamicImplementationTestBase . Root _root = _r . read ( get ( "root-1.xml" ) , "utf... | org . junit . Assert . assertNotNull ( _root ) |
shouldReadErrorEvent ( ) { org . kaazing . k3po . control . internal . event . ErrorEvent expectedError = new org . kaazing . k3po . control . internal . event . ErrorEvent ( ) ; expectedError . setSummary ( "summary<sp>text" ) ; expectedError . setDescription ( "description<sp>text" ) ; mockery . checking ( new org . ... | org . junit . Assert . assertEquals ( expectedError , error ) |
userPermissionCheck_UserRemote ( ) { pUser . getOrganization ( ) . setRemoteLdapActive ( true ) ; passwordRecoverybean . verifyUserPermission ( pUser , marketplaceId ) ; verify ( passwordRecoverybean , times ( 1 ) ) . sendPasswordRecoveryMails ( eq ( pUser ) , eq ( EmailType . RECOVERPASSWORD_FAILED_LDAP ) , urlCaptor ... | org . junit . Assert . assertEquals ( marketplaceId , urlCaptor . getValue ( ) ) |
testSnsapiUserInfo ( ) { java . lang . String accessToken = java . lang . System . getProperty ( "weixin.atoken" ) ; java . lang . String openId = java . lang . System . getProperty ( "weixin.openid" ) ; com . belerweb . social . bean . Result < com . belerweb . social . weixin . bean . User > result = weixin . getUser... | org . junit . Assert . assertTrue ( result . success ( ) ) |
app_simulateWindowsFailure ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . String > path = new java . util . concurrent . atomic . AtomicReference < java . lang . String > ( ) ; final java . lang . String envpath = "c:/Windows;c:/Windows/System32;c:/Java" ; @ com . microsoft . alm . auth... | org . junit . Assert . assertEquals ( false , result ) |
testNaturalInnerJoin ( ) { org . meridor . perspective . sql . impl . parser . DataSource dataSource = prepareJoinDataSource ( ( ds ) -> { ds . setJoinType ( JoinType . INNER ) ; ds . setNaturalJoin ( true ) ; return ds ; } ) ; org . meridor . perspective . sql . impl . task . strategy . DataSourceStrategy strategy = g... | org . junit . Assert . assertThat ( rowsAsValues ( rows ) , equalTo ( correctData ) ) |
cascadeFromGenericMethodDefinedTwoLevelsDeepInInheritanceHierarchy ( mockit . CascadingWithGenericsTest$NonGenericInterface ) { mockit . CascadingWithGenericsTest . Bar cascadedResult = mock . genericMethod ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( cascadedResult ) |
testReduction ( ) { eu . stamp_project . Utils . getInputConfiguration ( ) . setMaxTestAmplified ( 2 ) ; final spoon . reflect . declaration . CtMethod methodString = eu . stamp_project . Utils . findMethod ( "fr.inria.amp.LiteralMutation" , "methodString" ) ; final spoon . reflect . declaration . CtMethod methodIntege... | org . junit . Assert . assertEquals ( 2 , reduce . size ( ) ) |
collectLongParallel ( ) { org . eclipse . collections . api . list . primitive . LongList expected = org . eclipse . collections . impl . collector . Collectors2AdditionalTest . LARGE_INTERVAL . collectLong ( Integer :: longValue , LongLists . mutable . empty ( ) ) ; org . eclipse . collections . api . list . primitive... | org . junit . Assert . assertEquals ( expected , actual ) |
testFailingInstanciation ( ) { org . orbisgis . coremap . renderer . se . parameter . real . RealParameter vf = new org . orbisgis . coremap . renderer . se . parameter . real . Recode2Real ( new org . orbisgis . coremap . renderer . se . parameter . real . RealLiteral ( 2.0 ) , new org . orbisgis . coremap . renderer ... | org . junit . Assert . assertTrue ( true ) |
testGetAllAtomMapping ( ) { org . openscience . cdk . interfaces . IAtom atomSource = new org . openscience . cdk . Atom ( "R" ) ; org . openscience . cdk . interfaces . IAtom atomTarget = new org . openscience . cdk . Atom ( "R" ) ; org . openscience . cdk . interfaces . IAtomContainer source = new org . openscience .... | org . junit . Assert . assertNotNull ( instance . getAllAtomMapping ( ) ) |
testNonInvertible ( ) { org . hipparchus . optim . nonlinear . vector . leastsquares . LinearProblem problem = new org . hipparchus . optim . nonlinear . vector . leastsquares . LinearProblem ( new double [ ] [ ] { new double [ ] { 1 , 2 , - 3 } , new double [ ] { 2 , 1 , 3 } , new double [ ] { - 3 , 0 , - 9 } } , new ... | org . junit . Assert . assertEquals ( expected , actual , org . hipparchus . optim . nonlinear . vector . leastsquares . TOl ) |
testDivFunction ( ) { com . googlecode . aviator . runtime . function . system . BinaryFunction fun = new com . googlecode . aviator . runtime . function . system . BinaryFunction ( com . googlecode . aviator . lexer . token . OperatorType . DIV ) ; com . googlecode . aviator . runtime . type . AviatorObject result = f... | org . junit . Assert . assertEquals ( 0 , ( ( java . lang . Long ) ( result . getValue ( null ) ) ) , 0.0 ) |
testDelete ( ) { final net . violet . platform . datamodel . VObject myRecord = Factories . VOBJECT . find ( 31 ) ; try { final long event_id = Factories . EVENT . insert ( myRecord . getId ( ) . intValue ( ) , 100 , 100 , 100 ) ; net . violet . platform . datamodel . Event theEvent = Factories . EVENT . find ( event_i... | org . junit . Assert . assertNull ( theEvent ) |
testProxyBaseURLFlagSetWithTemplateNoHeaders ( ) { createAppContext ( "http://${X-Forwarded-Host}/${X-Forwarded-Path}/geoserver" , true , null , null , null , null , null , null ) ; java . lang . StringBuilder baseURL = new java . lang . StringBuilder ( ) ; this . mangler . mangleURL ( baseURL , new java . lang . Strin... | org . junit . Assert . assertEquals ( "" , baseURL . toString ( ) ) |
testTwoConditions ( ) { org . apache . uima . jcas . JCas jcas = makeJCasOneSentence ( ) ; org . apache . uima . cas . CAS cas = jcas . getCas ( ) ; java . util . List < de . tudarmstadt . ukp . dkpro . core . api . segmentation . type . Token > tokens = new java . util . ArrayList ( select ( jcas , de . tudarmstadt . ... | org . junit . Assert . assertEquals ( 0 , possibleValues . size ( ) ) |
createDirectoryNotExitingTest ( ) { com . github . hermannpencole . nifi . config . service . List < java . lang . String > branch = com . github . hermannpencole . nifi . config . service . Arrays . asList ( "root" , "elt2" ) ; com . github . hermannpencole . nifi . config . service . ProcessGroupFlowEntity responseRo... | org . junit . Assert . assertEquals ( "idElt2" , response . getProcessGroupFlow ( ) . getId ( ) ) |
isDefinedAt_A$int_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( ) ; for ( int i = - 3 ; i < 3 ; i ++ ) { boolean actual = seq . isDefinedAt ( i ) ; boolean expected = false ; "<AssertPlaceHolder>" ; } } isDefinedAt ( java . lang . Object ) { return get... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testEquals_differentOpenInterest ( ) { com . sumzerotrading . data . BarData [ ] bars = getEqualBars ( ) ; bars [ 0 ] . setOpenInterest ( 0 ) ; "<AssertPlaceHolder>" ; } getEqualBars ( ) { java . time . LocalDateTime cal = java . time . LocalDateTime . now ( ) ; java . math . BigDecimal open = new java . math . BigDeci... | org . junit . Assert . assertFalse ( bars [ 0 ] . equals ( bars [ 1 ] ) ) |
get_returnsValue ( ) { array . add ( 23 ) ; org . eclipse . rap . json . JsonValue value = array . get ( 0 ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return new org . eclipse . rap . json . JsonNumber ( java . lang . Integer . toString ( value , 10 ) ) ; } | org . junit . Assert . assertEquals ( org . eclipse . rap . json . JsonValue . valueOf ( 23 ) , value ) |
should_set_reason_in_flag_with_type_other ( ) { org . mamute . model . Flag flag = flag ( FlagType . OTHER , user ( "author" , "author@brutal.com" ) ) ; java . lang . String reason = "blabla" ; flag . setReason ( reason ) ; "<AssertPlaceHolder>" ; } getReason ( ) { return reason ; } | org . junit . Assert . assertEquals ( reason , flag . getReason ( ) ) |
testDeleteOrganizationSiteOnlyRemovesSiteRoles ( ) { com . liferay . portal . kernel . model . Organization organization = com . liferay . portal . kernel . service . OrganizationLocalServiceUtil . addOrganization ( com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) , OrganizationConstants ... | org . junit . Assert . assertEquals ( 1 , com . liferay . portal . kernel . service . UserGroupRoleLocalServiceUtil . getUserGroupRolesCount ( user . getUserId ( ) , organizationSite . getGroupId ( ) ) ) |
isValidLoraGatewayReturnsFalseForTooBigLoraPort ( ) { final io . vertx . core . json . JsonObject gateway = getValidGateway ( ) ; final io . vertx . core . json . JsonObject loraConfig = org . eclipse . hono . adapter . lora . providers . LoraUtils . getLoraConfigFromLoraGatewayDevice ( gateway ) ; loraConfig . put ( "... | org . junit . Assert . assertFalse ( org . eclipse . hono . adapter . lora . providers . LoraUtils . isValidLoraGateway ( gateway ) ) |
testIsIntersectsSphere ( ) { org . parallax3d . parallax . math . Sphere a = new org . parallax3d . parallax . math . Sphere ( org . parallax3d . parallax . math . SphereTest . one3 , 1 ) ; org . parallax3d . parallax . math . Sphere b = new org . parallax3d . parallax . math . Sphere ( org . parallax3d . parallax . ma... | org . junit . Assert . assertTrue ( a . isIntersectsSphere ( b ) ) |
convertToLongNull ( ) { java . lang . Long out = converter . toLong ( null ) ; "<AssertPlaceHolder>" ; } toLong ( java . lang . Long ) { return value != null ? new java . lang . Long ( value ) : null ; } | org . junit . Assert . assertNull ( out ) |
testNormalizeNone ( ) { ch . cyberduck . core . transfer . normalizer . CopyRootPathsNormalizer normalizer = new ch . cyberduck . core . transfer . normalizer . CopyRootPathsNormalizer ( ) ; final java . util . HashMap < ch . cyberduck . core . Path , ch . cyberduck . core . Path > files = new java . util . HashMap < c... | org . junit . Assert . assertEquals ( files , normalizer . normalize ( files ) ) |
testBuildWithParameters ( ) { org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; org . lnu . is . domain . education . type . EducationType addressType = new org . lnu . is . domain . education . type . EducationType ( ) ; org . lnu . is . domain . person . paper . Pe... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testItself ( ) { java . lang . String smiles = "C1CCCCCCC1CC" ; org . openscience . cdk . isomorphism . matchers . QueryAtomContainer query = org . openscience . cdk . isomorphism . matchers . QueryAtomContainerCreator . createAnyAtomContainer ( new org . openscience . cdk . smiles . SmilesParser ( org . openscience . ... | org . junit . Assert . assertTrue ( matched ) |
loadCert ( ) { java . io . InputStream is = null ; try { is = io . grpc . testing . TlsTesting . loadCert ( "ca.key" ) ; "<AssertPlaceHolder>" ; } finally { if ( is != null ) { is . close ( ) ; } } } loadCert ( java . lang . String ) { return io . grpc . testing . TestUtils . class . getResourceAsStream ( ( "/certs/" +... | org . junit . Assert . assertNotNull ( is ) |
setIpAddressAsHostOption2 ( ) { java . net . URI webserviceURI = new java . net . URI ( ( ( ( ( "coap://" + ( de . uzl . itm . ncoap . communication . codec . AllowDefaultOptionValues . HOST ) ) + ":" ) + ( de . uzl . itm . ncoap . message . options . OptionValue . URI_PORT_DEFAULT ) ) + "/registry" ) ) ; de . uzl . it... | org . junit . Assert . assertTrue ( false ) |
validFloatGreaterThanConstraintShouldNotCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createGreaterThanDefinition ( ToscaTypes . FLOAT . toString ( ) , 42.456F ) , alien4c... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
testGetOrientation_onPopupMenu ( ) { org . eclipse . swt . widgets . Menu menu = new org . eclipse . swt . widgets . Menu ( shell , org . eclipse . swt . SWT . POP_UP ) ; menu . setOrientation ( SWT . RIGHT_TO_LEFT ) ; "<AssertPlaceHolder>" ; } getOrientation ( ) { if ( ( ( getCurSide ( ) ) == ( org . eclipse . swt . S... | org . junit . Assert . assertEquals ( SWT . RIGHT_TO_LEFT , menu . getOrientation ( ) ) |
testIndexTwo ( ) { java . lang . String regex = "^/([^/]+)/([^/]+)" ; org . apache . druid . query . extraction . ExtractionFn extractionFn = new org . apache . druid . query . extraction . RegexDimExtractionFn ( regex , 2 , true , null ) ; java . util . Set < java . lang . String > extracted = new java . util . Linked... | org . junit . Assert . assertEquals ( expected , extracted ) |
testSecuredFeatureTypeInfoMetadata ( ) { org . geoserver . security . decorators . SecuredFeatureTypeInfo ro = new org . geoserver . security . decorators . SecuredFeatureTypeInfo ( states , org . geoserver . security . WrapperPolicy . metadata ( null ) ) ; try { ro . getFeatureSource ( null , null ) ; org . junit . As... | org . junit . Assert . assertTrue ( ( ( org . geoserver . security . decorators . SecuredDataStoreInfo ) ( store ) ) . policy . isMetadata ( ) ) |
testCsvDoesNotExist ( ) { java . util . List < java . util . List < java . lang . String > > data = org . pentaho . platform . dataaccess . datasource . wizard . service . impl . utils . DatasourceServiceHelper . getCsvDataSample ( "target/test-classes/doesnotexist.csv" , true , "," , "\"" , 10 ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( 0 , data . size ( ) ) |
testInvertedNullFieldShouldMatch ( ) { final java . lang . String fieldName = "nullfield" ; final org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setField ( fieldName ) ; rule . setInverted ( true ) ; final org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( ... | org . junit . Assert . assertTrue ( matcher . match ( msg , rule ) ) |
findsLongestNameByReduce ( ) { com . insightfullogic . java8 . examples . chapter1 . Artist artist = com . insightfullogic . java8 . exercises . chapter5 . LongestName . byReduce ( com . insightfullogic . java8 . examples . chapter1 . SampleData . getThreeArtists ( ) ) ; "<AssertPlaceHolder>" ; } getThreeArtists ( ) { ... | org . junit . Assert . assertEquals ( SampleData . johnColtrane , artist ) |
userInfoTableUpdatesOperatorStatus ( ) { saveUserOne ( ) ; com . djrapitops . plan . db . CommonDBTest . db . executeTransaction ( new com . djrapitops . plan . db . OperatorStatusTransaction ( playerUUID , true ) ) ; com . djrapitops . plan . db . List < com . djrapitops . plan . db . UserInfo > userInfo = com . djrap... | org . junit . Assert . assertEquals ( expected , userInfo ) |
testNoCommonReturnTypeFails ( ) { try { final org . apache . calcite . rex . RexNode node = coalesce ( vVarchar ( 1 ) , vInt ( 2 ) ) ; org . junit . Assert . fail ( ( "expected<sp>exception,<sp>got<sp>" + node ) ) ; } catch ( java . lang . IllegalArgumentException e ) { final java . lang . String expected = "Cannot<sp>... | org . junit . Assert . assertThat ( e . getMessage ( ) , org . hamcrest . CoreMatchers . is ( expected ) ) |
testJson ( ) { org . nd4j . shade . jackson . databind . ObjectMapper om = new org . nd4j . shade . jackson . databind . ObjectMapper ( ) ; om . configure ( DeserializationFeature . FAIL_ON_UNKNOWN_PROPERTIES , false ) ; om . configure ( SerializationFeature . FAIL_ON_EMPTY_BEANS , false ) ; om . configure ( MapperFeat... | org . junit . Assert . assertEquals ( s , fromJson ) |
testQueryTopAllShardsWithSorter ( ) { try { com . ctrip . platform . dal . dao . shard . DalHints hints = new com . ctrip . platform . dal . dao . shard . DalHints ( ) ; java . util . List < java . lang . Short > result = queryTopInAllShard ( hints . sortBy ( new com . ctrip . platform . dal . dao . shard . DalQueryDao... | org . junit . Assert . assertEquals ( 4 , result . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.