input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testReadCount ( ) { final org . apache . camel . component . olingo4 . Olingo4AppAPITest . TestOlingo4ResponseHandler < java . lang . Long > countHandler = new org . apache . camel . component . olingo4 . Olingo4AppAPITest . TestOlingo4ResponseHandler < > ( ) ; org . apache . camel . component . olingo4 . Olingo4AppAPI... | org . junit . Assert . assertEquals ( 20 , count . intValue ( ) ) |
testResourceImplSizeNotSet ( ) { java . io . InputStream is ; try { is = new java . io . FileInputStream ( content ) ; ddf . catalog . resource . impl . ResourceImpl ri = new ddf . catalog . resource . impl . ResourceImpl ( is , mimeType , ddf . catalog . resource . ResourceImplTest . TEST_NAME ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( ( - 1 ) , ri . getSize ( ) ) |
testPostThing ( ) { javax . ws . rs . client . Invocation . Builder request = org . jboss . resteasy . test . rx . RxCompletionStageServerAsyncTest . client . target ( org . jboss . resteasy . test . rx . RxCompletionStageServerAsyncTest . generateURL ( "/post/thing" ) ) . request ( ) ; org . jboss . resteasy . test . ... | org . junit . Assert . assertEquals ( new org . jboss . resteasy . test . rx . resource . Thing ( "a" ) , t ) |
runThread ( ) { "<AssertPlaceHolder>" ; for ( int i = 0 ; i < 10 ; i ++ ) { com . li3huo . netty . ExecutorServiceTest . executor . execute ( new com . li3huo . netty . ExecutorServiceTest . SampleThread ( i ) ) ; } } | org . junit . Assert . assertNotNull ( com . li3huo . netty . ExecutorServiceTest . executor ) |
testMultipleThreadsWithSharedConnection ( ) { java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1000 ) ; java . util . concurrent . atomic . AtomicInteger value = new java . util . concurrent . atomic . AtomicInteger ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { service . e... | org . junit . Assert . assertThat ( count , org . hamcrest . core . Is . is ( 1000 ) ) |
testAttributeInitializer ( ) { org . infinispan . commons . configuration . attributes . AttributeDefinition < java . util . Properties > def = org . infinispan . commons . configuration . attributes . AttributeDefinition . builder ( "props" , null , java . util . Properties . class ) . initializer ( new org . infinisp... | org . junit . Assert . assertTrue ( ( ( attribute1 . get ( ) ) != ( attribute2 . get ( ) ) ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . Region newRegion = addRegion ( ) ; com . liferay . portal . kernel . model . Region existingRegion = _persistence . findByPrimaryKey ( newRegion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; } | org . junit . Assert . assertEquals ( existingRegion , newRegion ) |
testMirrorVertical ( ) { final net . sf . latexdraw . model . api . shape . Point pos = ShapeFactory . INST . createPoint ( shape . getPosition ( ) ) ; shape . mirrorVertical ( shape . getGravityCentre ( ) . getY ( ) ) ; "<AssertPlaceHolder>" ; } getPosition ( ) { return getPtAt ( 0 ) ; } | org . junit . Assert . assertEquals ( pos , shape . getPosition ( ) ) |
testNullRow ( ) { java . lang . String [ ] argv = getArgv ( true , "nullRowT" , "nullRowF" , true , null ) ; java . lang . String [ ] types = new java . lang . String [ ] { "INT" , "INT" } ; java . lang . String [ ] vals = new java . lang . String [ ] { "0" , "null" } ; createTableWithColTypes ( types , vals ) ; runImp... | org . junit . Assert . assertEquals ( 0 , rowCount ) |
testStorageQueryFileInfoCommand ( ) { com . github . tobato . fastdfs . domain . fdfs . StorePath path = uploadDefaultFile ( ) ; com . github . tobato . fastdfs . domain . proto . storage . StorageQueryFileInfoCommand command = new com . github . tobato . fastdfs . domain . proto . storage . StorageQueryFileInfoCommand... | org . junit . Assert . assertNotNull ( fileInfo ) |
serverInfoXMLRequestTest ( ) { requestBuilder = org . springframework . test . web . servlet . request . MockMvcRequestBuilders . get ( "/info/serverInfo.xml" ) ; org . springframework . test . web . servlet . MvcResult mvc = this . mockMvc . perform ( requestBuilder ) . andReturn ( ) ; "<AssertPlaceHolder>" ; checkMod... | org . junit . Assert . assertEquals ( 200 , mvc . getResponse ( ) . getStatus ( ) ) |
testGetLocale ( ) { final com . amazon . speech . speechlet . IntentRequest request = io . klerch . alexa . tellask . ModelFactory . givenIntentRequest ( "intentName" ) ; final com . amazon . speech . speechlet . Session session = io . klerch . alexa . tellask . ModelFactory . givenSession ( ) ; final com . amazon . sp... | org . junit . Assert . assertEquals ( io . klerch . alexa . tellask . model . AlexaInputTest . LOCALE , input . getLocale ( ) ) |
fillAllFields_confUrl_TEMPLATE_SUBSCRIPTION ( ) { org . oscm . domobjects . Product subscriptionToTemplate = product . copyForSubscription ( supplier , new org . oscm . domobjects . Subscription ( ) ) ; org . oscm . internal . vo . VOService service = new org . oscm . internal . vo . VOService ( ) ; org . oscm . servic... | org . junit . Assert . assertEquals ( product . getConfiguratorUrl ( ) , service . getConfiguratorUrl ( ) ) |
addAccessibleServices ( ) { final org . oscm . domobjects . UserGroup userGroup = runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . UserGroup > ( ) { @ org . oscm . usergroupservice . bean . Override public org . oscm . domobjects . UserGroup call ( ) throws org . oscm . usergroupservice . bea... | org . junit . Assert . assertTrue ( result ) |
testArrayValueInequalityRange ( ) { setUpQueryTests ( ) ; com . google . cloud . datastore . Query < com . google . cloud . datastore . Entity > query = com . google . cloud . datastore . Query . newEntityQueryBuilder ( ) . setKind ( "Task" ) . setFilter ( com . google . cloud . datastore . StructuredQuery . CompositeF... | org . junit . Assert . assertFalse ( results . hasNext ( ) ) |
getAuthority ( ) { when ( stream . getAuthority ( ) ) . thenReturn ( "fooapi.googleapis.com" ) ; "<AssertPlaceHolder>" ; verify ( stream ) . getAuthority ( ) ; } getAuthority ( ) { throw new java . lang . AssertionError ( "Should<sp>not<sp>be<sp>called" ) ; } | org . junit . Assert . assertEquals ( "fooapi.googleapis.com" , call . getAuthority ( ) ) |
test_getUri__host_and_port ( ) { java . lang . String expected = "amqp://rabbit.example.com:11111" ; java . lang . String actual = rabbitmq . mgmt . model . AmqpUri . builder ( ) . host ( "rabbit.example.com" ) . port ( 11111 ) . build ( ) . getUri ( ) ; "<AssertPlaceHolder>" ; } getUri ( ) { java . lang . StringBuilde... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetReferencedFields ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "item" } ; doReturn ( expected ) . when ( reportPreProcessorCore ) . getReferencedFields ( metaData , element , null ) ; java . lang . String [ ] result = metaData . getReferencedFields ( element , null ) ; "<AssertPlaceHol... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
givenValue_whenRemoveValue_thenRemoveMatchingMapEntry ( ) { org . apache . commons . collections4 . BidiMap < java . lang . String , java . lang . String > map = new org . apache . commons . collections4 . bidimap . DualHashBidiMap ( ) ; map . put ( "key1" , "value1" ) ; map . put ( "key2" , "value2" ) ; map . removeVa... | org . junit . Assert . assertFalse ( map . containsKey ( "key2" ) ) |
testIsToTest_LastestGenerationFailed ( ) { org . evosuite . xsd . Project project = new org . evosuite . xsd . Project ( ) ; project . setTotalNumberOfTestableClasses ( org . evosuite . xsd . XSDUtils . convert ( 1 ) ) ; org . evosuite . xsd . CUT cut = new org . evosuite . xsd . CUT ( ) ; cut . setFullNameOfTargetClas... | org . junit . Assert . assertTrue ( data . isToTest ( "foo.Bar" , 3 ) ) |
cardIsHashedInAWayToAllowCardsToBeUsedAsKeys ( ) { com . clinkworks . solitaire . datatype . Card ace1 = newAceOfSpades ( ) ; com . clinkworks . solitaire . datatype . Card ace2 = newAceOfSpades ( ) ; java . util . Map < com . clinkworks . solitaire . datatype . Card , java . lang . Object > referenceTestMap = com . go... | org . junit . Assert . assertEquals ( objectForReference , referenceTestMap . get ( ace2 ) ) |
cellCtlnullNullPointerException ( ) { com . fujitsu . dc . core . model . impl . es . accessor . EntitySetAccessor cellCtl = com . fujitsu . dc . core . model . impl . es . EsModel . cellCtl ( null , "TypeStringForTest" ) ; "<AssertPlaceHolder>" ; } cellCtl ( com . fujitsu . dc . core . model . Cell , java . lang . Str... | org . junit . Assert . assertNotNull ( cellCtl ) |
testListSecurityGroupsRequest ( ) { try { com . fit2cloud . aliyun . ecs . model . request . ListSecurityGroupsRequest r = new com . fit2cloud . aliyun . ecs . model . request . ListSecurityGroupsRequest ( "cn-qingdao" ) ; r . setPageSize ( 2 ) ; r . setPageNumber ( 2 ) ; com . fit2cloud . aliyun . ecs . model . respon... | org . junit . Assert . assertTrue ( ( ( response . getTotalCount ( ) ) > 0 ) ) |
testAlgorithmLoadingExceptionString ( ) { java . lang . String expectedMessage = "some<sp>message" ; java . lang . String actualMessage ; try { throw new de . metanome . backend . algorithm_loading . AlgorithmLoadingException ( expectedMessage ) ; } catch ( de . metanome . backend . algorithm_loading . AlgorithmLoading... | org . junit . Assert . assertEquals ( expectedMessage , actualMessage ) |
testSetAlpha ( ) { int alpha = 10 ; mRoundedColorDrawable . setAlpha ( alpha ) ; verify ( mCallback ) . invalidateDrawable ( mRoundedColorDrawable ) ; "<AssertPlaceHolder>" ; } getAlpha ( ) { return mAlpha ; } | org . junit . Assert . assertEquals ( alpha , mRoundedColorDrawable . getAlpha ( ) ) |
excelReadAsTextTest ( ) { cn . hutool . poi . excel . ExcelReader reader = cn . hutool . poi . excel . ExcelUtil . getReader ( cn . hutool . core . io . resource . ResourceUtil . getStream ( "aaa.xlsx" ) ) ; "<AssertPlaceHolder>" ; } readAsText ( boolean ) { final org . apache . poi . ss . extractor . ExcelExtractor ex... | org . junit . Assert . assertNotNull ( reader . readAsText ( false ) ) |
shouldBeRevoked ( ) { net . ripe . rpki . commons . validation . objectvalidators . CertificateRepositoryObjectValidationContext context = new net . ripe . rpki . commons . validation . objectvalidators . CertificateRepositoryObjectValidationContext ( net . ripe . rpki . commons . crypto . cms . manifest . ManifestCmsT... | org . junit . Assert . assertTrue ( subject . isRevoked ( ) ) |
whenCreatedFromMapWithoutDomainNamespaces_hasEmptyString ( ) { oracle . kubernetes . operator . helm . HelmOperatorValues values = new oracle . kubernetes . operator . helm . HelmOperatorValues ( com . google . common . collect . ImmutableMap . of ( ) ) ; "<AssertPlaceHolder>" ; } getTargetNamespaces ( ) { return oracl... | org . junit . Assert . assertThat ( values . getTargetNamespaces ( ) , org . hamcrest . Matchers . equalTo ( "" ) ) |
shouldOverrideSmallPageCacheMemorySettingContainingUnit ( ) { long overridden = parseLongWithUnit ( "10m" ) ; org . neo4j . kernel . configuration . Config dbConfig = org . neo4j . kernel . configuration . Config . defaults ( pagecache_memory , java . lang . String . valueOf ( overridden ) ) ; org . neo4j . unsafe . im... | org . junit . Assert . assertEquals ( overridden , memory ) |
testSucces ( ) { final nl . bzk . brp . bijhouding . bericht . model . BijhoudingVerzoekBericht bericht = nl . bzk . brp . bijhouding . bericht . model . VerzoekBerichtBuilder . maakSuccesEindeHuwelijkInNederlandBericht ( ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > me... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
givenNoPrefixSet_whenLoggerEmitsEvent_thenAppenderReceivesNoEvent ( ) { rootLogger . info ( "Test<sp>from<sp>{}" , this . getClass ( ) . getSimpleName ( ) ) ; com . baeldung . logback . MapAppender appender = ( ( com . baeldung . logback . MapAppender ) ( rootLogger . getAppender ( "badMap" ) ) ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( appender . getEventMap ( ) . size ( ) , 0 ) |
addSettings ( ) { testCleanDatabase ( ) ; addSetting ( "TestName1" , "TestValue1" ) ; addSetting ( "TestName2" , "TestValue2" ) ; java . util . Collection < org . nhindirect . config . store . Setting > settings = settingDao . getAll ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , settings . size ( ) ) |
testDeclaredTypeExtendingInnerClass ( ) { java . lang . String str = ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp>);\n" 1 + ( org . drools . compiler . integrationtests . Misc2Test . StaticPerson . class . getCanonicalName ( ) ) ) + "\n" ) + "declare<sp>StaticPerson<sp>end\n" ) + "declare<sp>Student<sp>extends<sp>StaticPerson<sp>end... | org . junit . Assert . assertEquals ( 2 , ksession . fireAllRules ( ) ) |
valuePut ( ) { simplePut ( org . exist . util . hashtable . AbstractHashtableTest . keyEquiv ( 12345 ) , valEquiv ( 54321 ) ) ; "<AssertPlaceHolder>" ; } simpleGet ( java . lang . Long ) { return map . get ( k ) ; } | org . junit . Assert . assertEquals ( simpleGet ( org . exist . util . hashtable . AbstractHashtableTest . keyEquiv ( 12345 ) ) , valEquiv ( 54321 ) ) |
testIterator ( ) { final org . scijava . object . ObjectIndex < java . lang . Object > objectIndex = new org . scijava . object . ObjectIndex ( java . lang . Object . class ) ; final java . lang . Object [ ] objects = new java . lang . Object [ ] { new java . lang . Integer ( 5 ) , new java . lang . Float ( 2.5F ) , ne... | org . junit . Assert . assertSame ( objects [ i ] , o ) |
testGlobStatusFilterWithNoMatchingPathsAndNonTrivialFilter ( ) { org . apache . hadoop . fs . Path [ ] testDirs = new org . apache . hadoop . fs . Path [ ] { getTestRootPath ( org . apache . hadoop . fs . FileContextMainOperationsBaseTest . fc , org . apache . hadoop . fs . FileContextMainOperationsBaseTest . TEST_DIR_... | org . junit . Assert . assertEquals ( 0 , filteredPaths . length ) |
testIsTermAlreadyUsedInConcept_NotUsed ( ) { fr . mcc . ginco . beans . ThesaurusTerm fakeThesaurusTerm = getFakeThesaurusTermWithNonMandatoryEmptyFields ( "fakeTerm1" ) ; when ( thesaurusTermDAO . getTermByLexicalValueThesaurusIdLanguageId ( fr . mcc . ginco . tests . services . Mockito . anyString ( ) , fr . mcc . gi... | org . junit . Assert . assertFalse ( thesaurusTermService . isTermAlreadyUsedInConcept ( fakeThesaurusTerm ) ) |
equals_shouldReturnFalseIfGivenObjHasNullUuid ( ) { org . openmrs . BaseOpenmrsObject o = new org . openmrs . BaseOpenmrsObjectTest . BaseOpenmrsObjectMock ( ) ; org . openmrs . BaseOpenmrsObject obj = new org . openmrs . BaseOpenmrsObjectTest . BaseOpenmrsObjectMock ( ) ; obj . setUuid ( null ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertFalse ( o . equals ( obj ) ) |
write_four_chunks ( ) { final java . util . concurrent . atomic . AtomicInteger numWrites = new java . util . concurrent . atomic . AtomicInteger ( ) ; final org . apache . commons . io . output . ByteArrayOutputStream baos = getByteArrayOutputStream ( numWrites ) ; final org . apache . commons . io . output . ChunkedO... | org . junit . Assert . assertEquals ( 4 , numWrites . get ( ) ) |
testCheckForNonExclusion ( ) { edu . cornell . mannlib . vitro . webapp . searchindex . exclusions . ExcludeBasedOnType ebot = new edu . cornell . mannlib . vitro . webapp . searchindex . exclusions . ExcludeBasedOnType ( ) ; ebot . addTypeToExclude ( "http://xmlns.com/foaf/0.1/Person" ) ; edu . cornell . mannlib . vit... | org . junit . Assert . assertNull ( excludeResult ) |
testNoRepeatsIndex ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz . ... | org . junit . Assert . assertEquals ( expecting , found ) |
testShowItem_NoScroll ( ) { org . eclipse . nebula . widgets . grid . GridItem [ ] items = org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 20 , 3 ) ; grid . setTopIndex ( 12 ) ; grid . showItem ( items [ 14 ] ) ; "<AssertPlaceHolder>" ; } getTopIndex ( ) { checkWidget ( ) ; if ( ( topI... | org . junit . Assert . assertEquals ( 12 , grid . getTopIndex ( ) ) |
test000_Setup ( ) { if ( org . apache . bookkeeper . tests . integration . utils . BookKeeperClusterUtils . metadataFormatIfNeeded ( docker , currentVersion ) ) { org . apache . bookkeeper . tests . integration . utils . BookKeeperClusterUtils . formatAllBookies ( docker , currentVersion ) ; } "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertTrue ( org . apache . bookkeeper . tests . integration . utils . BookKeeperClusterUtils . startAllBookiesWithVersion ( docker , currentVersion ) ) |
testGetElement ( ) { System . out . println ( "getElement" ) ; long value = 100L ; kg . apc . charting . rows . GraphRowOverallAverages instance = new kg . apc . charting . rows . GraphRowOverallAverages ( ) ; kg . apc . charting . AbstractGraphPanelChartElement expResult = new kg . apc . charting . elements . GraphPan... | org . junit . Assert . assertTrue ( ( ( instance . getElement ( value ) . getValue ( ) ) == ( expResult . getValue ( ) ) ) ) |
canSetAndGetValueOfNewParameter ( ) { java . lang . String newParameterName = "newOne" ; com . eviware . soapui . impl . rest . support . RestParamProperty restParamProperty = parametersHolder . addProperty ( newParameterName ) ; java . lang . String parameterValue = "theValue" ; restParamProperty . setValue ( paramete... | org . junit . Assert . assertThat ( parametersHolder . getProperty ( newParameterName ) . getValue ( ) , org . hamcrest . CoreMatchers . is ( parameterValue ) ) |
testInvalidateDisposesDisplay ( ) { final org . eclipse . rap . rwt . service . UISession uiSession = org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) ; org . eclipse . swt . widgets . Display display = new org . eclipse . swt . widgets . Display ( ) ; lifeCycle . execute ( ) ; runInT... | org . junit . Assert . assertTrue ( display . isDisposed ( ) ) |
shouldRecognizeCommentedLines ( ) { java . lang . String commandLine = "#<sp>This<sp>is<sp>a<sp>comment" ; com . inventage . tools . versiontiger . internal . impl . Command command = new com . inventage . tools . versiontiger . internal . impl . Command ( commandLine ) ; "<AssertPlaceHolder>" ; } isComment ( ) { retur... | org . junit . Assert . assertTrue ( command . isComment ( ) ) |
testTranslateImageCaptionNotranslation ( ) { java . lang . String result = im . translateImageCaption ( "Flower<sp>photo" ) ; java . lang . String expResult = null ; "<AssertPlaceHolder>" ; } translateImageCaption ( java . lang . String ) { java . lang . String translation = null ; try { translation = imageCaptions . g... | org . junit . Assert . assertEquals ( expResult , result ) |
testSetStatus ( ) { com . bixly . pastevid . recorders . RecorderTest . log ( "setStatus" ) ; com . bixly . pastevid . recorders . RecorderStatus status = RecorderStatus . STOPPED ; com . bixly . pastevid . recorders . Recorder instance = new com . bixly . pastevid . recorders . Recorder ( null ) ; instance . setStatus... | org . junit . Assert . assertEquals ( expResult , result ) |
handle_shouldUnsetTheVoider ( ) { org . openmrs . api . handler . UnvoidHandler < org . openmrs . Voidable > handler = new org . openmrs . api . handler . BaseUnvoidHandler ( ) ; org . openmrs . Voidable voidable = new org . openmrs . Person ( ) ; voidable . setVoided ( true ) ; voidable . setVoidedBy ( new org . openm... | org . junit . Assert . assertNull ( voidable . getVoidedBy ( ) ) |
getGenreReturnsV1TagsGenreIfV2TagsGenreIsNegativeOne ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; id3v1Tag . setGenre ( 10 ) ; com . mpatric . mp3agic . ID3v2 id3v2Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v2TagForTesting ( ) ; id... | org . junit . Assert . assertEquals ( 10 , wrapper . getGenre ( ) ) |
testNewPacket ( ) { org . pcap4j . packet . IcmpV6HomeAgentAddressDiscoveryReplyPacket p ; try { p = org . pcap4j . packet . IcmpV6HomeAgentAddressDiscoveryReplyPacket . newPacket ( packet . getRawData ( ) , 0 , packet . getRawData ( ) . length ) ; "<AssertPlaceHolder>" ; } catch ( org . pcap4j . packet . IllegalRawDat... | org . junit . Assert . assertEquals ( packet , p ) |
case5 ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedRecords = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalance... | org . junit . Assert . assertEquals ( 2 , mergedRecords . size ( ) ) |
testInferComponentTypeWhenItReturnsRange ( ) { final org . kie . workbench . common . dmn . api . definition . v1_1 . ConstraintType expectedType = RANGE ; final org . kie . workbench . common . dmn . api . definition . v1_1 . ConstraintType actualType = modal . inferComponentType ( "(1..3]" ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( expectedType , actualType ) |
testFromBeamSchema ( ) { org . apache . beam . sdk . schemas . Schema beamSchema = getBeamSchema ( ) ; org . apache . avro . Schema avroSchema = org . apache . beam . sdk . schemas . utils . AvroUtils . toAvroSchema ( beamSchema ) ; "<AssertPlaceHolder>" ; } getAvroSchema ( ) { java . util . List < org . apache . avro ... | org . junit . Assert . assertEquals ( getAvroSchema ( ) , avroSchema ) |
testCompareCheckpointsWithSameCheckpointId ( ) { org . apache . flink . api . common . JobID jobID1 = new org . apache . flink . api . common . JobID ( ) ; org . apache . flink . api . common . JobID jobID2 = new org . apache . flink . api . common . JobID ( ) ; org . apache . flink . runtime . checkpoint . CompletedCh... | org . junit . Assert . assertFalse ( org . apache . flink . runtime . checkpoint . CompletedCheckpoint . checkpointsMatch ( checkpoints1 , checkpoints2 ) ) |
getOrCreateBean_multipleBeansGivenButCanInstantiate_noException ( ) { org . springframework . context . ApplicationContext context = org . mockito . Mockito . mock ( org . springframework . context . ApplicationContext . class , Mockito . RETURNS_DEEP_STUBS ) ; org . mockito . Mockito . when ( context . getBeanNamesFor... | org . junit . Assert . assertEquals ( "string" , bean ) |
testGetDIOValueSuccess ( ) { com . digi . xbee . api . models . ATCommandResponse mockedResponse = org . mockito . Mockito . mock ( com . digi . xbee . api . models . ATCommandResponse . class ) ; org . mockito . Mockito . when ( mockedResponse . getResponseStatus ( ) ) . thenReturn ( ATCommandStatus . OK ) ; org . moc... | org . junit . Assert . assertEquals ( IOValue . HIGH , ioValue ) |
testRemove ( ) { com . liferay . push . notifications . model . PushNotificationsDevice newPushNotificationsDevice = addPushNotificationsDevice ( ) ; _persistence . remove ( newPushNotificationsDevice ) ; com . liferay . push . notifications . model . PushNotificationsDevice existingPushNotificationsDevice = _persisten... | org . junit . Assert . assertNull ( existingPushNotificationsDevice ) |
testGetRestrictionForEmpty ( ) { javax . jcr . Value val = createEntry ( ) . getRestriction ( AccessControlConstants . REP_GLOB ) ; "<AssertPlaceHolder>" ; } getRestriction ( java . lang . String ) { return entry . getRestriction ( s ) ; } | org . junit . Assert . assertNull ( val ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . site . navigation . model . SiteNavigationMenuItem > siteNavigationMenuItems = _persisten... | org . junit . Assert . assertTrue ( siteNavigationMenuItems . isEmpty ( ) ) |
toOSFilePath1 ( ) { java . lang . String filePath = "java/lang/String" ; java . lang . String localResult = ( "java/lang/String" . replace ( '/' , File . separatorChar ) ) + ( java . io . File . separatorChar ) ; java . lang . String normalizedPath = org . ebayopensource . turmeric . tools . codegen . util . CodeGenUti... | org . junit . Assert . assertEquals ( localResult , normalizedPath ) |
testGeefFragmentFiles_FileBestaat ( ) { java . io . File fragmentFile = new java . io . File ( folder . getRoot ( ) , java . lang . String . format ( "selectietaak_%d_%d/fragment/test.fragment" , nl . bzk . brp . delivery . selectie . fileaccess . SelectieFileServiceImplTest . SELECTIE_TAAK_ID , nl . bzk . brp . delive... | org . junit . Assert . assertTrue ( ( ( files . size ( ) ) == 1 ) ) |
transactionNumber ( ) { final com . arangodb . model . TransactionOptions options = new com . arangodb . model . TransactionOptions ( ) . params ( 5 ) ; final java . lang . Integer result = db . transaction ( "function<sp>(params)<sp>{return<sp>params;}" , com . arangodb . Integer . class , options ) ; "<AssertPlaceHol... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( 5 ) ) |
testSetTupleMapping ( ) { org . pentaho . hbase . shim . api . Mapping mapping = getMapping ( ) ; mapping . setTupleMapping ( true ) ; "<AssertPlaceHolder>" ; } setTupleMapping ( boolean ) { m_tupleMapping = t ; } | org . junit . Assert . assertTrue ( mapping . m_tupleMapping ) |
setContentViewWithViewAllowsFindById ( ) { final int viewId = 1234 ; final android . app . Dialog dialog = new android . app . Dialog ( context ) ; final android . view . View view = new android . view . View ( context ) ; view . setId ( viewId ) ; dialog . setContentView ( view ) ; "<AssertPlaceHolder>" ; } findViewBy... | org . junit . Assert . assertSame ( view , dialog . findViewById ( viewId ) ) |
fillupTest ( ) { org . apache . directmemory . memory . MemoryManager . clear ( ) ; org . apache . directmemory . memory . MemoryManagerTest . logger . info ( ( "payload<sp>size=" + ( org . apache . directmemory . measures . Ram . inKb ( payload . length ) ) ) ) ; long howMany = ( org . apache . directmemory . memory .... | org . junit . Assert . assertNotNull ( p ) |
allocateDiskThatHasInfo ( ) { org . jenkinsci . plugins . ewm . definitions . Disk disk1 = org . jenkinsci . plugins . ewm . TestUtil . createDisk ( new org . jenkinsci . plugins . ewm . providers . NoDiskInfo ( ) ) ; org . jenkinsci . plugins . ewm . definitions . Disk disk2 = org . jenkinsci . plugins . ewm . TestUti... | org . junit . Assert . assertThat ( allocatedDisk , org . hamcrest . Matchers . is ( disk2 ) ) |
testGetEnergy ( ) { org . openscience . cdk . smsd . helper . BondEnergy instance = new org . openscience . cdk . smsd . helper . BondEnergy ( "H" , "I" , org . openscience . cdk . interfaces . IBond . Order . SINGLE , 295 ) ; int expResult = 295 ; int result = instance . getEnergy ( ) ; "<AssertPlaceHolder>" ; } getEn... | org . junit . Assert . assertEquals ( expResult , result ) |
parseBadOption ( ) { org . eclipse . xtext . xbase . lib . Procedures . Procedure1 < java . lang . String > err = createMock ( org . eclipse . xtext . xbase . lib . Procedures . Procedure1 . class ) ; err . apply ( "Unknown<sp>command-line<sp>option:<sp>'-bad'" ) ; java . lang . Object [ ] mocks = new java . lang . Obj... | org . junit . Assert . assertNotNull ( options ) |
testRowVectorGemm ( ) { org . nd4j . linalg . api . ndarray . INDArray linspace = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray other = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 16 , 16 ) . reshape ( 4 , 4 ) ; org . nd4j . linalg . api . ndarr... | org . junit . Assert . assertEquals ( assertion , result ) |
whenSearchingByBasicQuery_thenAllMatchingItemsShouldAvialble ( ) { com . baeldung . solr . fulltext . search . service . ItemSearchServiceLiveTest . itemSearchService . index ( "hm0001" , "Brand1<sp>Washing<sp>Machine" , "Home<sp>Appliances" , 450.0F ) ; com . baeldung . solr . fulltext . search . service . ItemSearchS... | org . junit . Assert . assertEquals ( 3 , items . size ( ) ) |
failed ( ) { loghub . Stats . reset ( ) ; todo = ( ) -> future . setSuccess ( Boolean . TRUE ) ; onsucces = ( e , v ) -> { return false ; } ; loghub . Event e = loghub . Tools . getEvent ( ) ; loghub . processors . TestPausingEvent . SleepingProcessor sp = new loghub . processors . TestPausingEvent . SleepingProcessor ... | org . junit . Assert . assertEquals ( 1 , e . get ( "a" ) ) |
shouldSplitMultipleEntries ( ) { java . util . List < com . github . markusbernhardt . proxy . util . UriFilter > l = this . parser . parseWhiteList ( "*.mynet.com;<sp>*.rossi.invalid;<sp>junit*" ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . selectors . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , l . size ( ) ) |
buildTargetPathForFolderInAnotherDirectoryTest ( ) { org . uberfire . backend . vfs . Path originalPath = createFolder ( "parent/folder" ) ; org . uberfire . backend . vfs . Path targetParentDirectory = createFolder ( "new-parent" ) ; java . lang . String targetFileName = "new-folder" ; org . uberfire . backend . vfs .... | org . junit . Assert . assertEquals ( ( ( ( targetParentDirectory . toURI ( ) ) + "/" ) + targetFileName ) , targetPath . toURI ( ) ) |
testEqualsWithSameHeadersOrderAndValues ( ) { java . util . List < java . lang . String > tableHeaders = java . util . Arrays . asList ( new java . lang . String [ ] { "col1" , "col2" } ) ; java . util . List < java . lang . String > otherTableHeaders = java . util . Arrays . asList ( new java . lang . String [ ] { "co... | org . junit . Assert . assertTrue ( table . equals ( otherTable ) ) |
testLookupBase ( ) { final java . lang . Object obj = store . lookup ( new javax . naming . CompositeName ( ) ) ; "<AssertPlaceHolder>" ; } lookup ( java . lang . String ) { final org . jboss . as . naming . deployment . ContextNames . BindInfo bindInfo = org . jboss . as . naming . deployment . ContextNames . bindInfo... | org . junit . Assert . assertNotNull ( obj ) |
noErrorsByDefault ( ) { java . lang . String html = "<p>One</p<sp>href='no'>&arrgh;<font<sp>/><br<sp>/><foo" ; com . itextpdf . styledxmlparser . jsoup . parser . Parser parser = com . itextpdf . styledxmlparser . jsoup . parser . Parser . htmlParser ( ) ; com . itextpdf . styledxmlparser . jsoup . nodes . Document doc... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
testBuildWithDisabledDefaultConstraintWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . address . type . AddressType context = new org . lnu . is . domain . address . type . AddressType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagi... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGetMapAndMessagesByDemographicNo ( ) { "<AssertPlaceHolder>" ; } getMapAndMessagesByDemographicNo ( java . lang . Integer ) { java . lang . String sql = "FROM<sp>MsgDemoMap<sp>map,<sp>MessageTbl<sp>m<sp>" + ( ( "WHERE<sp>m.id<sp>=<sp>map.messageID<sp>" + "AND<sp>map.demographic_no<sp>=<sp>:demoNo<sp>" ) + "ORDER<sp... | org . junit . Assert . assertNotNull ( dao . getMapAndMessagesByDemographicNo ( 100 ) ) |
shouldReturnDefaultVersionIfMissVdcVersion ( ) { java . util . List < com . emc . storageos . db . client . model . VdcVersion > geoVersions = new java . util . ArrayList < com . emc . storageos . db . client . model . VdcVersion > ( ) ; java . util . List < java . net . URI > vdcIds = new java . util . ArrayList < jav... | org . junit . Assert . assertEquals ( expectedVdcVersion , minialVdcVersion ) |
getPageMarkdown ( ) { java . util . Set < java . lang . String > versions = com . google . common . collect . Sets . newHashSet ( "commit1" , "commit2" , "nonexistent" ) ; java . util . Map < java . lang . String , java . lang . String > markdown = com . google . common . collect . Maps . newHashMap ( ) ; markdown . pu... | org . junit . Assert . assertEquals ( markdown , result ) |
testComputeLatLonFromStringWithNull ( ) { "<AssertPlaceHolder>" ; } computeLatLonFromString ( java . lang . String ) { return au . gov . ga . earthsci . worldwind . common . util . Util . computeLatLonFromString ( coordString , null ) ; } | org . junit . Assert . assertEquals ( null , au . gov . ga . earthsci . worldwind . common . util . Util . computeLatLonFromString ( null ) ) |
testIsSerializable ( ) { sash . setSize ( 1 , 2 ) ; org . eclipse . swt . widgets . Sash deserializedSash = serializeAndDeserialize ( sash ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return size ; } | org . junit . Assert . assertEquals ( sash . getSize ( ) , deserializedSash . getSize ( ) ) |
collectShort ( ) { org . eclipse . collections . api . list . primitive . ShortList expected = org . eclipse . collections . impl . collector . Collectors2AdditionalTest . SMALL_INTERVAL . collectShort ( ( each ) -> ( ( short ) ( each % Short . MAX_VALUE ) ) , ShortLists . mutable . empty ( ) ) ; org . eclipse . collec... | org . junit . Assert . assertEquals ( expected , actual ) |
testInsertAndGetSingleRecord ( ) { org . smartdata . model . BackUpInfo backUpInfo = new org . smartdata . model . BackUpInfo ( ) ; backUpInfo . setRid ( 1 ) ; backUpInfo . setPeriod ( 1 ) ; backUpInfo . setDest ( "" ) ; backUpInfo . setSrc ( "" ) ; backUpInfoDao . insert ( backUpInfo ) ; "<AssertPlaceHolder>" ; } getB... | org . junit . Assert . assertTrue ( backUpInfoDao . getByRid ( 1 ) . equals ( backUpInfo ) ) |
testGetTopicSearchService ( ) { org . silverpeas . components . kmelia . search . TopicSearchService result = org . silverpeas . components . kmelia . search . KmeliaSearchServiceProvider . getTopicSearchService ( ) ; "<AssertPlaceHolder>" ; } getTopicSearchService ( ) { return org . silverpeas . core . util . ServiceP... | org . junit . Assert . assertNotNull ( result ) |
testBuyButton ( ) { java . lang . String json = "{\"sender\":{\"id\":\"1158621824216736\"},\"recipient\":{\"id\":\"1226565047419159\"},\"timestamp\":1490832021661,\"message\":{\"mid\":\"mid.$cAAUPCFn4ymdhTcignVbHH3rzpKd_\",\"seq\":844819,\"text\":\"buy<sp>button\"}}" ; co . aurasphere . botmill . fb . model . incoming ... | org . junit . Assert . assertNotNull ( envelope ) |
testNonNameExpressionLiteral ( ) { org . geotools . styling . PointSymbolizer p = org . geotools . factory . CommonFactoryFinder . getStyleFactory ( ) . createPointSymbolizer ( ) ; org . opengis . filter . expression . Expression expression = org . geotools . factory . CommonFactoryFinder . getFilterFactory2 ( ) . lite... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( "test" ) ) |
testWithMapOfMapValue ( ) { java . io . File file = new java . io . File ( ( ( ( ( net . openhft . chronicle . map . ChronicleMapImportExportTest . TMP ) + "/chronicle-map-" ) + ( java . lang . System . nanoTime ( ) ) ) + ".json" ) ) ; file . deleteOnExit ( ) ; System . out . println ( file . getAbsoluteFile ( ) ) ; ne... | org . junit . Assert . assertEquals ( expected , actual ) |
saveOperatorRevenueShare ( ) { org . oscm . domobjects . RevenueShareModel revenueToBeUpdated = givenRevenueShareModel ( 1L , RevenueShareModelType . OPERATOR_REVENUE_SHARE ) ; revenueToBeUpdated . setRevenueShare ( java . math . BigDecimal . valueOf ( 10L ) ) ; org . oscm . domobjects . Product product = givenProduct ... | org . junit . Assert . assertEquals ( java . math . BigDecimal . valueOf ( 20L ) , revenueToBeUpdated . getRevenueShare ( ) ) |
testPutAllReplaceOnlyIfPresent ( ) { java . util . HashMap < java . lang . Object , java . lang . Object > map = new java . util . HashMap < java . lang . Object , java . lang . Object > ( ) ; map . put ( "key1" , "value1" ) ; map . put ( "key2" , "value2" ) ; unwrap ( service . putAll ( map , null , MemcacheService . ... | org . junit . Assert . assertFalse ( unwrap ( service . contains ( entry . getKey ( ) ) ) ) |
testSanitizerAddCloseTags ( ) { java . lang . String input = "<ul><li>unclosed<sp>li<li>second<sp>unclosed<sp>li</ul>" ; java . lang . String expected = "<ul><li>unclosed<sp>li</li><li>second<sp>unclosed<sp>li</li></ul>" ; "<AssertPlaceHolder>" ; } sanitize ( java . lang . String ) { return com . github . bordertech . ... | org . junit . Assert . assertEquals ( expected , com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( input ) ) |
notEmpty_filledMap_isValid ( ) { final java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "key" , "value" ) ; final java . util . Map < java . lang . String , java . lang . String > nonEmptyMap = net . sf . ... | org . junit . Assert . assertSame ( map , nonEmptyMap ) |
testMatchFalse ( ) { java . lang . String [ ] values = new java . lang . String [ ] { "TEST1" , "TEST2" , "ABC" } ; filter . setValues ( new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( values ) ) ) ; "<AssertPlaceHolder>" ; } matches ( de . kobv . marcel . beans . Record ) { for ( d... | org . junit . Assert . assertFalse ( filter . matches ( record ) ) |
testBasicMultiply ( ) { final org . kitesdk . morphline . api . MorphlineContext context = new org . kitesdk . morphline . api . MorphlineContext . Builder ( ) . build ( ) ; com . stratio . morphlines . commons . Collector collectorParent = new com . stratio . morphlines . commons . Collector ( ) ; com . stratio . morp... | org . junit . Assert . assertEquals ( records . size ( ) , 1 ) |
testHostLabels ( ) { startDefaultMaster ( ) ; startDefaultAgent ( testHost ( ) , "--labels" , "role=foo" , "xyz=123" ) ; final java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > labels = com . spotify . helios . Polling . await ( com . spotify . helios . syste... | org . junit . Assert . assertThat ( labels , org . hamcrest . CoreMatchers . equalTo ( expectedLabels ) ) |
testIsPurposeForNoApiProvided ( ) { java . util . HashMap < java . lang . String , java . lang . Object > tokenVals = new java . util . HashMap ( ) ; tokenVals . put ( NhincConstants . WS_SOAP_TARGET_HOME_COMMUNITY_ID , "1.1" ) ; tokenVals . put ( SamlConstants . ACTION_PROP , NhincConstants . PATIENT_DISCOVERY_SERVICE... | org . junit . Assert . assertTrue ( ( ! ( decider . isPurposeFor ( properties ) ) ) ) |
testInt ( ) { org . apache . rocketmq . mysql . schema . column . IntColumnParser parser = new org . apache . rocketmq . mysql . schema . column . IntColumnParser ( "int" , "int(10)<sp>unsigned" ) ; java . lang . Long v1 = ( ( java . lang . Long ) ( parser . getValue ( Integer . MIN_VALUE ) ) ) ; java . lang . Long v2 ... | org . junit . Assert . assertEquals ( v1 , v2 ) |
testServiceLevelTokenOK ( ) { System . out . println ( "Testing<sp>KeyStoneBackendImpl.serviceLevelToken" ) ; java . lang . String token = "" ; System . out . println ( "------<sp>Setting<sp>token<sp>TTL<sp>to<sp>1<sp>minute<sp>" ) ; keyStoneUtils . setTokenTimeToLive ( 1 ) ; try { System . out . println ( ( ( "------<... | org . junit . Assert . assertTrue ( ( ! ( token . equals ( "" ) ) ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.