input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>Name" ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . resource . employee . type . EmployeeTypeResource source = new org . lnu . is . resource . employee . type . EmployeeTypeResource ( ) ; source . setId ( id... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
testKeytabAction ( ) { final org . apache . nifi . security . krb . KerberosUser user1 = new org . apache . nifi . security . krb . KerberosKeytabUser ( org . apache . nifi . security . krb . KerberosUserIT . principal1 . getName ( ) , org . apache . nifi . security . krb . KerberosUserIT . principal1KeytabFile . getAb... | org . junit . Assert . assertEquals ( "SUCCESS" , resultHolder . get ( ) ) |
noneWarmupStrategyTest ( ) { final java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; createFacade ( WuicFacade . WarmupStrategy . NONE , new java . lang . Runnable ( ) { @ com . github . wuic . test . Override public void run ( ) { count . incrementAnd... | org . junit . Assert . assertEquals ( 0 , count . get ( ) ) |
testFindTemplateSourceContentIsNull ( ) { com . ewcms . publication . service . TemplatePublishServiceable service = mock ( com . ewcms . publication . service . TemplatePublishServiceable . class ) ; when ( service . getTemplateByUniquePath ( any ( java . lang . String . class ) ) ) . thenReturn ( new com . ewcms . co... | org . junit . Assert . assertNull ( source ) |
multi_dimensional_arrays_can_be_created ( ) { com . flextrade . jfixture . JFixture fixture = new com . flextrade . jfixture . JFixture ( ) ; int [ ] [ ] multiArray = fixture . create ( int [ ] [ ] . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . reflect . Type ) { return ( ( T ) ( this . create ( ( ( java ... | org . junit . Assert . assertTrue ( ( multiArray != null ) ) |
testResponse ( ) { int streamId = 10 ; int responderStreamId = 11 ; java . lang . String host = "127.0.0.1" ; io . aeron . Aeron . Context ctx = new io . aeron . Aeron . Context ( ) . publicationConnectionTimeout ( ( - 1 ) ) . availableImageHandler ( AeronUtil :: printAvailableImage ) . unavailableImageHandler ( AeronU... | org . junit . Assert . assertEquals ( expectedResponses , count . get ( ) ) |
test_Aaubv_Abvdu ( ) { org . antlr . v4 . runtime . atn . PredictionContext a = createSingleton ( u ( false ) , 1 ) ; org . antlr . v4 . runtime . atn . PredictionContext b1 = createSingleton ( v ( false ) , 2 ) ; org . antlr . v4 . runtime . atn . PredictionContext b2 = createSingleton ( v ( false ) , 2 ) ; org . antl... | org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) |
parse_ipv6_with_v4 ( ) { final net . ripe . db . whois . query . query . SearchKey searchKey = new net . ripe . db . whois . query . query . SearchKey ( "::ffff:0.0.0.0" ) ; final net . ripe . db . whois . common . ip . IpInterval < ? > ipKeyOrNull = searchKey . getIpKeyOrNull ( ) ; "<AssertPlaceHolder>" ; } getIpKeyOr... | org . junit . Assert . assertNull ( ipKeyOrNull ) |
testGetClusterStatusXML ( ) { org . apache . hadoop . hbase . rest . client . Response response = org . apache . hadoop . hbase . rest . TestStatusResource . client . get ( "/status/cluster" , Constants . MIMETYPE_XML ) ; "<AssertPlaceHolder>" ; org . apache . hadoop . hbase . rest . model . StorageClusterStatusModel m... | org . junit . Assert . assertEquals ( response . getCode ( ) , 200 ) |
testGetYear ( ) { for ( int i = 1 ; i <= ( org . mafagafogigante . dungeon . date . DateTest . MAX_YEAR ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getYear ( ) { return ( ( time ) / ( DungeonTimeUnit . YEAR . milliseconds ) ) + 1 ; } | org . junit . Assert . assertEquals ( i , new org . mafagafogigante . dungeon . date . Date ( i , 1 , 1 ) . getYear ( ) ) |
findIPStartLOOP ( ) { net . ripe . hadoop . pcap . PcapReader xreader = new net . ripe . hadoop . pcap . PcapReader ( PcapReader . LinkType . LOOP ) ; "<AssertPlaceHolder>" ; } findIPStart ( byte [ ] ) { int start = - 1 ; switch ( linkType ) { case NULL : return 4 ; case EN10MB : start = net . ripe . hadoop . pcap . Pc... | org . junit . Assert . assertEquals ( 4 , xreader . findIPStart ( null ) ) |
givenUsersInDB_WhenFindAllWithPageRequestQueryAnnotationJPQL_ThenReturnPageOfUsers ( ) { userRepository . save ( new com . baeldung . domain . user . User ( USER_NAME_ADAM , java . time . LocalDate . now ( ) , USER_EMAIL , ACTIVE_STATUS ) ) ; userRepository . save ( new com . baeldung . domain . user . User ( USER_NAME... | org . junit . Assert . assertThat ( usersPage . getContent ( ) . get ( 0 ) . getName ( ) ) |
testGetHashSetOfRoads ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . RoadMap rm = it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . RoadMap . getRoadMap ( ) ; rm . setID ( ) ; java . util . Map < java . lang... | org . junit . Assert . assertNotNull ( roads ) |
getSelectableMarketplaces_Same ( ) { java . util . List < javax . faces . model . SelectItem > list1 = umpb . getSelectableMarketplaces ( ) ; verify ( msmock , times ( 1 ) ) . getMarketplacesOwned ( ) ; java . util . List < javax . faces . model . SelectItem > list2 = umpb . getSelectableMarketplaces ( ) ; verifyNoMore... | org . junit . Assert . assertSame ( list1 , list2 ) |
hasPermissionToDeleteResourceRelationWhenUserIsAppDeveloperAndResourceIsInstanceOfApplicationResType ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceEntity app = resourceEntityBuilder . mockApplicationEntity ( "app" , appResourceGroup , null ) ; when ( sessionContext . isCallerInRole ( ch .... | org . junit . Assert . assertTrue ( result ) |
testMultipleEmptyIterators ( ) { java . util . List < java . lang . Integer > empty = com . google . common . collect . Lists . newArrayList ( ) ; java . util . List < java . util . Iterator < java . lang . Integer > > iterators = com . google . common . collect . Lists . < java . util . Iterator < java . lang . Intege... | org . junit . Assert . assertFalse ( merged . hasNext ( ) ) |
clean ( ) { org . springframework . batch . core . StepExecution stepExecution = createStepExecution ( ) ; org . springframework . batch . core . StepContribution contrib = new org . springframework . batch . core . StepContribution ( stepExecution ) ; org . springframework . batch . core . scope . context . ChunkConte... | org . junit . Assert . assertEquals ( RepeatStatus . FINISHED , status ) |
testAnd ( ) { for ( int N = 1 ; N < 10 ; ++ N ) { System . out . println ( ( "testAnd<sp>N<sp>=<sp>" + N ) ) ; java . util . Iterator < com . googlecode . javaewah . EWAHCompressedBitmap [ ] > i = com . googlecode . javaewah . IteratorAggregationTest . getCollections ( N , 3 ) ; while ( i . hasNext ( ) ) { com . google... | org . junit . Assert . assertTrue ( x1 . equals ( tanswer ) ) |
testUnmanagedAppListener ( ) { startupServer ( com . sun . sgs . test . impl . kernel . TestKernelAppListeners . UnmanagedAppListener . class ) ; txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . impl . kernel . Exception { ... | org . junit . Assert . assertEquals ( listener . getState ( ) , new java . lang . Integer ( 1 ) ) |
testSignalAllProcesses ( ) { final java . util . concurrent . atomic . AtomicInteger counter = new java . util . concurrent . atomic . AtomicInteger ( ) ; final org . switchyard . component . bpm . service . BPMServiceTests . Holder holder = new org . switchyard . component . bpm . service . BPMServiceTests . Holder ( ... | org . junit . Assert . assertEquals ( "2" , holder . getValue ( ) ) |
testGetProcessStepRollBack ( ) { org . hive2hive . core . network . NetworkManager getter = org . hive2hive . core . processes . common . base . BaseGetProcessStepTest . network . get ( 0 ) ; org . hive2hive . core . network . NetworkManager holder = org . hive2hive . core . processes . common . base . BaseGetProcessSt... | org . junit . Assert . assertNull ( getStepRollBack . getContent ( ) ) |
testCreate ( ) { org . oscarehr . common . model . MsgDemoMap entity = new org . oscarehr . common . model . MsgDemoMap ( ) ; entity . setDemographic_no ( 1 ) ; entity . setMessageID ( 1 ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( entity . getId ( ) ) |
testAttribuutGeautoriseerd ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Leveringsautorisatie leveringsautorisatie1 = nl . bzk . brp . domain . algemeen . TestAutorisaties . metSoortDienst ( SoortDienst . ZOEK_PERSOON ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst dienst = ... | org . junit . Assert . assertTrue ( berichtgegevens . isGeautoriseerdVoorGedeblokkeerdeMeldingen ( ) ) |
emptyCompositeDatabaseFieldSearch ( ) { final java . util . List < java . lang . Integer > docs = new java . util . ArrayList ( ) ; com . yandex . yoctodb . CompositeMmapDatabaseTest . db . execute ( select ( ) . where ( in ( "field1" , from ( ( ( - 2 ) * ( com . yandex . yoctodb . CompositeMmapDatabaseTest . DOCS ) ) ... | org . junit . Assert . assertEquals ( 0 , docs . size ( ) ) |
testOOXMLParseCellValue ( ) { final org . drools . decisiontable . SpreadsheetCompiler converter = new org . drools . decisiontable . SpreadsheetCompiler ( ) ; java . lang . String drl = converter . compile ( "/data/BZ963584.xls" , InputType . XLS ) ; "<AssertPlaceHolder>" ; } compile ( java . sql . ResultSet , org . d... | org . junit . Assert . assertNotNull ( drl ) |
testGetAnnotationFromSuperclassMethod ( ) { java . lang . reflect . Method method = io . joynr . util . AnnotationUtilTest . MyChildClass . class . getMethod ( "getEnumAttributeSuccess" , joynr . tests . testTypes . TestEnum . class , io . joynr . proxy . ReplyContext . class ) ; io . joynr . util . AnnotationUtilTest ... | org . junit . Assert . assertNotNull ( result ) |
fullTextQuery_IndexAllProps ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder defn = newLucenePropertyIndexDefinition ( builder , "test" , of ( "allProps" ) , "async" ) ; defn = org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition . updateDefinition ( defn . getNodeState ( ... | org . junit . Assert . assertNotNull ( planner . getPlan ( ) ) |
shouldParseExportLineCoverageFlag ( ) { final org . pitest . mutationtest . config . ReportOptions actual = parseAddingRequiredArgs ( "--exportLineCoverage" ) ; "<AssertPlaceHolder>" ; } shouldExportLineCoverage ( ) { return this . exportLineCoverage ; } | org . junit . Assert . assertTrue ( actual . shouldExportLineCoverage ( ) ) |
testRoundTrip ( ) { org . apache . flume . sink . elasticsearch . ElasticSearchLogStashEventSerializer fixture = new org . apache . flume . sink . elasticsearch . ElasticSearchLogStashEventSerializer ( ) ; org . apache . flume . Context context = new org . apache . flume . Context ( ) ; fixture . configure ( context ) ... | org . junit . Assert . assertEquals ( parser . parse ( expected . string ( ) ) , parser . parse ( actual . string ( ) ) ) |
testGetLastLeaf ( ) { "<AssertPlaceHolder>" ; } getLastLeaf ( ) { T node = getThis ( ) ; while ( ! ( node . isLeaf ( ) ) ) { node = node . getLastChild ( ) ; } return node ; } | org . junit . Assert . assertEquals ( e , a . getLastLeaf ( ) ) |
testSimpleDoubleHistogramEncoding ( ) { org . HdrHistogram . DoubleHistogram histogram = new org . HdrHistogram . DoubleHistogram ( 100000000L , 3 ) ; histogram . recordValue ( 6.0 ) ; histogram . recordValue ( 1.0 ) ; histogram . recordValue ( 0.0 ) ; java . nio . ByteBuffer targetBuffer = java . nio . ByteBuffer . al... | org . junit . Assert . assertEquals ( histogram , decodedHistogram ) |
testRemoveTagFromLiveDataObject ( ) { java . lang . String testFileName = "testRemoveTagFromLiveDataObject.txt" ; java . lang . String expectedTagName = "testRemoveTagFromLiveDataObject" ; java . lang . String targetIrodsCollection = org . irods . jargon . usertagging . IRODSTaggingServiceTest . testingPropertiesHelper... | org . junit . Assert . assertEquals ( 0 , irodsTaggingService . getTagsOnDataObject ( targetIrodsDataObject ) . size ( ) ) |
jsonToNormalizedNodesTest ( ) { final java . lang . String inputJson = org . opendaylight . yangtools . yang . data . codec . gson . TestUtils . loadTextFile ( "/yang-modeled-anyxml/json/baz.json" ) ; final org . opendaylight . yangtools . yang . data . impl . schema . NormalizedNodeResult result = new org . opendaylig... | org . junit . Assert . assertEquals ( org . opendaylight . yangtools . yang . data . codec . gson . YangModeledAnyXmlSupportTest . data , transformedInput ) |
booleanIterator ( ) { int sum = 0 ; for ( org . eclipse . collections . api . iterator . BooleanIterator iterator = this . iterable . booleanIterator ( ) ; iterator . hasNext ( ) ; ) { sum += ( iterator . next ( ) ) ? 1 : 0 ; } "<AssertPlaceHolder>" ; } next ( ) { T next = this . iterator . next ( ) ; this . procedure ... | org . junit . Assert . assertEquals ( 2 , sum ) |
testLoadLookupOnCoordinatorFailure ( ) { org . apache . druid . query . lookup . LookupConfig lookupConfig = new org . apache . druid . query . lookup . LookupConfig ( temporaryFolder . newFolder ( ) . getAbsolutePath ( ) ) { @ org . apache . druid . query . lookup . Override public int getCoordinatorRetryDelay ( ) { r... | org . junit . Assert . assertEquals ( container , lookupReferencesManager . get ( "testMockForLoadLookupOnCoordinatorFailure" ) ) |
testWrite_07 ( ) { filterStream . write ( ( "<sp>*<sp>$Id" + "$\n<sp>*\n" ) . getBytes ( ) ) ; filterStream . flush ( ) ; java . lang . String res = new java . lang . String ( result . toByteArray ( ) ) ; java . lang . String expected = "<sp>*\n" ; "<AssertPlaceHolder>" ; } toByteArray ( ) { return this . buf ; } | org . junit . Assert . assertEquals ( expected , res ) |
shouldNotRemoveTagImg ( ) { java . lang . String html = "<img<sp>src=\"myimage.png\"<sp>alt=\"chrome\"<sp>/>" ; java . lang . String sanitized = htmlSanitizer . sanitize ( html ) . getText ( ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; } | org . junit . Assert . assertEquals ( html , sanitized ) |
testCompletion ( ) { com . google . common . util . concurrent . Service service = new org . apache . twill . internal . ServicesTest . DummyService ( "s1" , new java . util . concurrent . atomic . AtomicBoolean ( ) ) ; com . google . common . util . concurrent . ListenableFuture < com . google . common . util . concur... | org . junit . Assert . assertTrue ( false ) |
testGetUnmetEntityAccessRequirementsOwnerNonFile ( ) { ar = org . sagebionetworks . repo . manager . AccessRequirementManagerImplAutoWiredTest . newEntityAccessRequirement ( entityId ) ; ar = accessRequirementManager . createAccessRequirement ( adminUserInfo , ar ) ; org . sagebionetworks . repo . model . RestrictableO... | org . junit . Assert . assertEquals ( 1 , ars . size ( ) ) |
testNoMatchMondrianUserSessionUserRoleListMapper ( ) { final org . pentaho . platform . plugin . action . mondrian . mapper . MondrianUserSessionUserRoleListMapper mapper = new org . pentaho . platform . plugin . action . mondrian . mapper . MondrianUserSessionUserRoleListMapper ( ) ; mapper . setSessionProperty ( "rol... | org . junit . Assert . assertNull ( roles ) |
testTwoExistingAuthorizerProfileMatch2 ( ) { profile . setId ( org . pac4j . core . authorization . checker . VALUE ) ; profile . addRole ( org . pac4j . core . authorization . checker . ROLE ) ; final org . pac4j . core . authorization . checker . List < org . pac4j . core . authorization . authorizer . Authorizer > a... | org . junit . Assert . assertTrue ( checker . isAuthorized ( null , profiles , authorizers ) ) |
testRemoveGroupsNull ( ) { java . util . List < java . lang . String > tenants = com . vmware . admiral . common . util . QueryUtil . removeGroups ( null ) ; "<AssertPlaceHolder>" ; } removeGroups ( java . util . List ) { if ( ( tenantLinks == null ) || ( tenantLinks . isEmpty ( ) ) ) { return tenantLinks ; } return te... | org . junit . Assert . assertNull ( tenants ) |
selectMapOnValue ( ) { com . gs . collections . api . map . MutableMap < java . lang . String , java . lang . String > map = com . gs . collections . impl . map . mutable . UnifiedMap . newWithKeysValues ( "1" , "2" , "2" , "1" , "3" , "3" ) ; com . gs . collections . api . map . MutableMap < java . lang . String , jav... | org . junit . Assert . assertEquals ( com . gs . collections . impl . map . mutable . UnifiedMap . newWithKeysValues ( "2" , "1" ) , resultMap ) |
testNoSuchPress ( ) { final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . press . Delete ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplicationAPICaller ( ) ; final java . util . Map < java . lang . String , java . lang ... | org . junit . Assert . assertNotNull ( theResult ) |
testAbortedTransactionPutAndGet ( ) { transactionContext . start ( ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( co . cask . tephra . hbase10cdh . TransactionAwareHTableTest . TestBytes . row ) ; put . add ( co . cask . tephra . hbase10cdh . TransactionAwareHT... | org . junit . Assert . assertArrayEquals ( value , null ) |
testSetIsEdgeRouter ( ) { config . setIsEdgeRouter ( false ) ; "<AssertPlaceHolder>" ; } isEdgeRouter ( ) { java . lang . String isEdgeRouter = get ( org . onosproject . segmentrouting . config . SegmentRoutingDeviceConfig . EDGE , null ) ; return isEdgeRouter != null ? java . lang . Boolean . valueOf ( isEdgeRouter ) ... | org . junit . Assert . assertThat ( config . isEdgeRouter ( ) , org . hamcrest . Matchers . is ( false ) ) |
testMessageFilteredByBeginAndEnd ( ) { org . apache . metron . profiler . spark . function . MessageRouterFunction function = new org . apache . metron . profiler . spark . function . MessageRouterFunction ( profile ( ) , getGlobals ( ) ) . withBegin ( ( ( messageTimestamp ) + 1000 ) ) . withEnd ( ( ( messageTimestamp ... | org . junit . Assert . assertEquals ( 0 , routes . size ( ) ) |
replaceDuplicatePunctuation ( ) { java . lang . String badText = "My<sp>father,,<sp>the<sp>duplicate,<sp>has<sp>three<sp>sons!!!<sp>and<sp>he<sp>never<sp>--<sp>that<sp>is,<sp>never!!!<sp>---<sp>uses<sp>ellipses....<sp>So<sp>THere??" ; java . lang . String cleanText = edu . illinois . cs . cogcomp . core . utilities . T... | org . junit . Assert . assertEquals ( true , isGood ) |
testInheritedHierarchyWalking ( ) { java . util . List < java . lang . Class < ? > > expectedClassHierarchy = java . util . Arrays . asList ( com . liferay . petra . reflect . AnnotationLocatorTest . TestClass . class , com . liferay . petra . reflect . AnnotationLocatorTest . SuperClass . class , com . liferay . petra... | org . junit . Assert . assertEquals ( expectedClassHierarchy , actualClassHierarchy ) |
testEmptyLiteralStringFieldConstraints ( ) { org . drools . workbench . models . datamodel . rule . FactPattern f1 = new org . drools . workbench . models . datamodel . rule . FactPattern ( "Applicant" ) ; f1 . setBoundName ( "$a" ) ; org . drools . workbench . models . datamodel . rule . SingleFieldConstraint constrai... | org . junit . Assert . assertTrue ( validator . isValid ( ) ) |
shouldNotRemoveTagH2 ( ) { java . lang . String html = "<h2>Title</h2>" ; java . lang . String sanitized = htmlSanitizer . sanitize ( html ) . getText ( ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; } | org . junit . Assert . assertEquals ( html , sanitized ) |
testParentScopeId ( ) { java . lang . Long parentScopeId = createSubScope ( java . util . Optional . empty ( ) , java . util . Optional . empty ( ) ) ; jsRecords = transactor . query ( ( db ) -> { for ( int i = 0 ; i < 5 ; ++ i ) { com . rapleaf . jack . store . executors . jackStore . record ( parentScopeId ) . create... | org . junit . Assert . assertEquals ( parentScopeId , jsRecords . getParentRecordId ( ) ) |
testSimpleNullScan ( ) { com . jitlogic . zorka . core . perfmon . TraceOutputJmxScanner scanner = perfmon . scanner ( "TEST" , new com . jitlogic . zorka . core . perfmon . QueryDef ( "test" , "test:type=XXX,*" , "name" ) . get ( "Nom" ) . metric ( perfmon . metric ( "" , "test" , "test" , "test" ) ) ) ; com . jitlogi... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
getObjectDouble ( ) { org . mockito . Mockito . when ( resultSet . getObject ( 1 ) ) . thenReturn ( 0.1 ) ; org . mockito . Mockito . when ( resultSet . getDouble ( 1 ) ) . thenReturn ( 0.1 ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( resultSet ) . getDouble ( 1 ) ; } getObject ( java . lang . Class ,... | org . junit . Assert . assertEquals ( 0.1 , com . cloud . utils . db . GenericDaoBase . getObject ( com . cloud . utils . db . Double . class , resultSet , 1 ) , 0.1 ) |
testGetInitString ( ) { java . lang . String initString = new com . basho . riak . hadoop . keylisters . BucketKeyLister ( com . basho . riak . hadoop . keylisters . BucketKeyListerTest . BUCKET_NAME ) . getInitString ( ) ; "<AssertPlaceHolder>" ; testLister ( new com . basho . riak . hadoop . keylisters . BucketKeyLis... | org . junit . Assert . assertEquals ( com . basho . riak . hadoop . keylisters . BucketKeyListerTest . BUCKET_NAME , initString ) |
testGetEvent ( ) { java . util . List < com . zendesk . maxwell . row . RowMap > list ; java . lang . String [ ] input = new java . lang . String [ ] { "insert<sp>into<sp>minimal<sp>set<sp>account_id<sp>=<sp>1,<sp>text_field='hello'" } ; list = getRowsForSQL ( input ) ; "<AssertPlaceHolder>" ; } size ( ) { return colum... | org . junit . Assert . assertThat ( list . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testGetMenuCategories ( ) { System . out . println ( "getMenuCategories" ) ; kg . apc . jmeter . vizualizers . AggregateReportGui instance = new kg . apc . jmeter . vizualizers . AggregateReportGui ( ) ; java . util . Collection result = instance . getMenuCategories ( ) ; "<AssertPlaceHolder>" ; } getMenuCategories ( )... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
flyScale ( ) { org . sejda . sambox . pdmodel . interactive . pagenavigation . PDTransition transition = new org . sejda . sambox . pdmodel . interactive . pagenavigation . PDTransition ( ) ; transition . setFlyScale ( 4 ) ; "<AssertPlaceHolder>" ; } getFlyScale ( ) { return getCOSObject ( ) . getFloat ( COSName . SS ,... | org . junit . Assert . assertEquals ( 4 , transition . getFlyScale ( ) , 0 ) |
constructorNormal ( ) { com . aliyuncs . auth . AlibabaCloudCredentials credentials = mock ( com . aliyuncs . auth . AlibabaCloudCredentials . class ) ; com . aliyuncs . auth . StaticCredentialsProvider provider = new com . aliyuncs . auth . StaticCredentialsProvider ( credentials ) ; "<AssertPlaceHolder>" ; } getCrede... | org . junit . Assert . assertEquals ( credentials , provider . getCredentials ( ) ) |
testRemove ( ) { com . liferay . portal . kernel . model . Team newTeam = addTeam ( ) ; _persistence . remove ( newTeam ) ; com . liferay . portal . kernel . model . Team existingTeam = _persistence . fetchByPrimaryKey ( newTeam . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryI... | org . junit . Assert . assertNull ( existingTeam ) |
shouldReturnTrueIfCurrentFPMethodOfTheECIsFemaleSterilization ( ) { boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "currentMethod" , "female_sterilization" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; retu... | org . junit . Assert . assertTrue ( didRuleSucceed ) |
bug62275_empty_1arg ( ) { try ( org . apache . poi . ss . usermodel . Workbook wb = new org . apache . poi . xssf . usermodel . XSSFWorkbook ( ) ) { org . apache . poi . ss . usermodel . Sheet sheet = wb . createSheet ( ) ; org . apache . poi . ss . usermodel . Row row = sheet . createRow ( 0 ) ; org . apache . poi . s... | org . junit . Assert . assertFalse ( value . getBooleanValue ( ) ) |
testCapitalizeFirstLetterWithNull ( ) { "<AssertPlaceHolder>" ; } capitalizeFirstLetter ( java . lang . String ) { if ( au . gov . ga . earthsci . worldwind . common . util . Util . isBlank ( s ) ) { return s ; } return ( s . substring ( 0 , 1 ) . toUpperCase ( ) ) + ( s . substring ( 1 ) ) ; } | org . junit . Assert . assertEquals ( null , au . gov . ga . earthsci . worldwind . common . util . Util . capitalizeFirstLetter ( null ) ) |
testToSerializedString ( ) { metric . startOperation ( "test" , true , "a" , "b" ) ; metric . stopOperation ( 123 , true ) ; java . lang . String serializedString = metric . toSerializedString ( ) ; java . lang . String match = "[0-9]+<sp>[0-9]+<sp>test<sp>a:b:<sp>[0-9]+<sp>[0-9]+<sp>[0-9]+<sp>[0-9]+<sp>[0-9]+<sp>true<... | org . junit . Assert . assertEquals ( true , serializedString . matches ( match ) ) |
canWritePitchFileDefault ( ) { java . io . StringWriter sw = new java . io . StringWriter ( ) ; pt . writeTo ( sw ) ; java . lang . String newFile = sw . toString ( ) ; marytts . util . data . text . PraatPitchTier newPT = new marytts . util . data . text . PraatPitchTier ( new java . io . StringReader ( newFile ) ) ; ... | org . junit . Assert . assertEquals ( pt . getPitchTargets ( ) . length , newPT . getPitchTargets ( ) . length ) |
testCase81 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase81 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) ) |
get_all_tables ( ) { when ( primaryMapping . transformInboundDatabaseName ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ) . thenReturn ( "inbound" ) ; java . util . List < java . lang . String > tables = com . google . common . collect . Lists . newArrayList ( "table1" ) ; when ( primar... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( tables ) ) |
checkCreation ( ) { info . smart_tools . smartactors . testing . interfaces . itest_runner . ITestRunner runner = new info . smart_tools . smartactors . testing . test_runner . ChainTestRunner ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( runner ) |
getRevenueShareData_MpoAndTypeSupplier ( ) { container . login ( supplierUser . getKey ( ) , org . oscm . billingservice . service . ROLE_MARKETPLACE_OWNER ) ; byte [ ] data = bs . getRevenueShareData ( java . lang . Long . valueOf ( org . oscm . billingservice . service . BillingServiceGetShareDataIT . PERIOD_START_MO... | org . junit . Assert . assertEquals ( 0 , data . length ) |
constructorShouldCopyCollection ( ) { io . cereebro . core . Dependency a = io . cereebro . core . Dependency . on ( io . cereebro . core . TestHelper . componentA ( ) ) ; java . util . List < io . cereebro . core . Relationship > originalCollection = new java . util . ArrayList ( ) ; originalCollection . add ( a ) ; i... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldPreferEliminationOfTypeWithMoreRelationships ( ) { java . util . Map < com . graphaware . common . description . relationship . DetachedRelationshipDescription , java . lang . Integer > cachedCounts = new java . util . HashMap ( ) ; cachedCounts . put ( literal ( "T1" , com . graphaware . module . relcount . comp... | org . junit . Assert . assertTrue ( ( ( literal ( "T3" , com . graphaware . module . relcount . compact . OUTGOING ) . with ( "k1" , any ( ) ) . with ( "k2" , equalTo ( "v1" ) ) . equals ( result ) ) || ( literal ( "T3" , com . graphaware . module . relcount . compact . OUTGOING ) . with ( "k1" , any ( ) ) . with ( "k2... |
testMatchExactlyDlSrcErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "in_node" , "node01" ) ; put ( "in_port" , "port01" ) ; put ( "eth_src" , "dl_src" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow ... | org . junit . Assert . assertThat ( target . matchExactly ( match ) , org . hamcrest . CoreMatchers . is ( false ) ) |
getName ( ) { java . lang . String securityName = "securityName" ; java . lang . String accessId = "user:realm/uniqueId" ; java . security . Principal principal = new com . ibm . ws . security . authentication . principals . WSPrincipal ( securityName , accessId , WSPrincipal . AUTH_METHOD_PASSWORD ) ; "<AssertPlaceHol... | org . junit . Assert . assertEquals ( "getName()<sp>should<sp>be<sp>the<sp>securityName<sp>specified<sp>in<sp>the<sp>constructor" , securityName , principal . getName ( ) ) |
testSerial ( ) { org . apache . commons . math4 . fraction . FractionField field = org . apache . commons . math4 . fraction . FractionField . getInstance ( ) ; "<AssertPlaceHolder>" ; } serializeAndRecover ( java . lang . Object ) { try { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ... | org . junit . Assert . assertTrue ( ( field == ( org . apache . commons . math4 . TestUtils . serializeAndRecover ( field ) ) ) ) |
loadCatchesInvalidDocument ( ) { doReturn ( null ) . when ( this . patient ) . getXDocument ( ) ; org . phenotips . data . PatientData < java . util . Map < java . lang . String , java . lang . String > > result = this . mocker . getComponentUnderTest ( ) . load ( this . patient ) ; verify ( this . mocker . getMockedLo... | org . junit . Assert . assertNull ( result ) |
testRequiresSelectionWithSingleItem ( ) { selectionMode . add ( o1 ) ; "<AssertPlaceHolder>" ; } requiresAutoSelection ( ) { return ( requiresSelection ) && ( ( selection ) == null ) ; } | org . junit . Assert . assertFalse ( selectionMode . requiresAutoSelection ( ) ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . WebDAVProps . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . l... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testValidateVat5 ( ) { boolean result = org . oscm . validator . ADMValidator . isVat ( java . math . BigDecimal . valueOf ( 1000 ) ) ; "<AssertPlaceHolder>" ; } isVat ( java . math . BigDecimal ) { return ( ( ( value != null ) && ( ( value . compareTo ( java . math . BigDecimal . valueOf ( 100 ) ) ) <= 0 ) ) && ( ( va... | org . junit . Assert . assertFalse ( result ) |
testApplicationStartupFail ( ) { System . out . println ( "--><sp>OpenRate<sp>startup<sp>failure:<sp>Properties<sp>not<sp>found" ) ; int expResult = - 5 ; java . lang . String [ ] args = new java . lang . String [ 2 ] ; args [ 0 ] = "-p" ; args [ 1 ] = "DoesNotExist.properties.xml" ; appl = OpenRate . OpenRate . getApp... | org . junit . Assert . assertEquals ( expResult , status ) |
testDoScheduledTask0Negative ( ) { java . lang . String info = "#<sp>Server\n" + ( ( ( ( ( ( "redis_version:2.8.19\n" + "redis_git_sha1:cd114f7e\n" ) + "redis_git_dirty:0\n" ) + "redis_build_id:c8fc0834f9ecab75\n" ) + "redis_mode:standalone\n" ) + "os:Darwin<sp>17.5.0<sp>x86_64\n" ) + "arch_bits:64\n" ) ; action . setI... | org . junit . Assert . assertFalse ( action . isCheckPassed ( ) ) |
filters_values ( ) { final java . lang . String indicatorVal = "val2" ; org . apache . metron . enrichment . converter . EnrichmentKey lookupKey = new org . apache . metron . enrichment . converter . EnrichmentKey ( "testenrichment" , indicatorVal ) ; org . apache . metron . enrichment . converter . EnrichmentValue loo... | org . junit . Assert . assertThat ( extracted , org . hamcrest . CoreMatchers . equalTo ( new org . apache . metron . dataloads . extractor . ArrayList ( ) ) ) |
loadWithGuestOwner ( ) { org . phenotips . data . permissions . EntityPermissionsManager permissions = this . mocker . getInstance ( org . phenotips . data . permissions . EntityPermissionsManager . class ) ; org . phenotips . data . permissions . EntityAccess access = mock ( org . phenotips . data . permissions . Enti... | org . junit . Assert . assertNull ( result ) |
testDecompressorNotReturnSameInstance ( ) { org . apache . hadoop . io . compress . Decompressor decomp = org . apache . hadoop . io . compress . CodecPool . getDecompressor ( codec ) ; org . apache . hadoop . io . compress . CodecPool . returnDecompressor ( decomp ) ; org . apache . hadoop . io . compress . CodecPool ... | org . junit . Assert . assertEquals ( 10 , decompressors . size ( ) ) |
convertToStringWhenNull ( ) { java . lang . String syntaxId = this . mocker . getComponentUnderTest ( ) . convert ( java . lang . String . class , null ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . reflect . Type , java . lang . Object ) { return this . converter . convert ( targetType , sourceValue ) ; } | org . junit . Assert . assertNull ( syntaxId ) |
shouldSupportSyncEndpointHandler ( ) { com . spotify . apollo . route . Route < com . spotify . apollo . route . AsyncHandler < java . lang . String > > route = com . spotify . apollo . route . Route . sync ( "GET" , "/foo" , ( requestContext ) -> "this<sp>is<sp>the<sp>best<sp>response" ) ; java . lang . String actual ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . equalTo ( "this<sp>is<sp>the<sp>best<sp>response" ) ) |
gpReverseGeocodingSimpleTest ( ) { com . google . maps . model . GeocodingResult [ ] results = gpGeocodingService . newRequest ( ) . latlng ( new com . google . maps . model . LatLng ( 46.1413888888889 , 12.2144444444444 ) ) . await ( ) ; "<AssertPlaceHolder>" ; org . geosdi . geoplatform . support . google . services ... | org . junit . Assert . assertNotNull ( results ) |
testNonexistingSwitchDisconnected ( ) { net . floodlightcontroller . core . IOFSwitchBackend sw = createMock ( net . floodlightcontroller . core . IOFSwitchBackend . class ) ; expect ( sw . getId ( ) ) . andReturn ( net . floodlightcontroller . core . internal . OFSwitchManagerTest . DATAPATH_ID_1 ) . anyTimes ( ) ; ne... | org . junit . Assert . assertNull ( switchManager . getSwitch ( net . floodlightcontroller . core . internal . OFSwitchManagerTest . DATAPATH_ID_1 ) ) |
testMessage ( ) { java . lang . String message = "Error!" ; java . lang . Exception e = new org . kocakosm . pitaya . net . URNSyntaxException ( message ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( message , e . getMessage ( ) ) |
testGetUrlWithoutPathRef ( ) { org . nuxeo . ecm . platform . url . codec . DocumentPathCodec codec = new org . nuxeo . ecm . platform . url . codec . DocumentPathCodec ( ) ; org . nuxeo . ecm . core . api . DocumentLocation docLoc = new org . nuxeo . ecm . core . api . impl . DocumentLocationImpl ( "demo" , null ) ; j... | org . junit . Assert . assertEquals ( url , codec . getUrlFromDocumentView ( docView ) ) |
testOrMultiThreeMixSubPathNegate ( ) { java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "a.txt" , "sub1.txt" , "sub1/suba/a.txt" , "sub2/suba/a.txt" ) ; org . eclipse . jgit . treewalk . filter . TreeFilter [ ] tf = new org . eclipse . jgit . treewalk . filter . TreeFilter [ ] { or... | org . junit . Assert . assertEquals ( expected , paths ) |
miscDistributedPersistentLock ( ) { com . emc . storageos . coordinator . client . service . DistributedPersistentLockTest . _logger . info ( "***<sp>miscDistributedPersistentLock<sp>start" ) ; java . util . concurrent . ExecutorService clients = java . util . concurrent . Executors . newFixedThreadPool ( NUMCLIENTS ) ... | org . junit . Assert . assertNull ( e ) |
test_WithValueMismatch ( ) { ctx . request ( ) . setQueryString ( "myParameter=bar" ) ; extension . activate ( configWithRequestParameterValues ) ; boolean actual = extension . accepts ( ctx . request ( ) , null , extension . getAllowedKeyValues ( ) ) ; "<AssertPlaceHolder>" ; } activate ( java . util . Map ) { this . ... | org . junit . Assert . assertFalse ( actual ) |
testSubDirectoryNonRecursive ( ) { org . provebit . merkle . FileMerkle m = new org . provebit . merkle . FileMerkle ( org . provebit . merkle . HashType . SHA256 ) ; m . addTracking ( daemonDir , false ) ; org . apache . commons . io . FileUtils . forceMkdir ( daemonSubDir ) ; org . apache . commons . io . FileUtils .... | org . junit . Assert . assertEquals ( 0 , daemon . getEvents ( ) ) |
givenUsingCustomDeserializer_whenFieldNotMatchesCriteria_thenIgnored ( ) { final org . baeldung . gson . serialization . SourceClass sourceObject = new org . baeldung . gson . serialization . SourceClass ( ( - 1 ) , "minus<sp>1" ) ; final com . google . gson . GsonBuilder gsonBuildr = new com . google . gson . GsonBuil... | org . junit . Assert . assertEquals ( expectedResult , jsonString ) |
testGetTableDataInMapException ( ) { boolean exceptionThrown = false ; try { wd . open ( org . finra . jtaf . ewd . widget . element . html . TableTest . url ) ; org . finra . jtaf . ewd . widget . ITable table = new org . finra . jtaf . ewd . widget . element . html . Table ( badTableLocator ) ; table . getTableDataIn... | org . junit . Assert . assertTrue ( exceptionThrown ) |
handlePausedFlow_NotPausedExecutionTest ( ) { io . cloudslang . score . facade . entities . Execution exe = new io . cloudslang . score . facade . entities . Execution ( 111L , 0L , 0L , new java . util . HashMap < java . lang . String , java . lang . String > ( ) , null ) ; exe . getSystemContext ( ) . setBranchId ( "... | org . junit . Assert . assertFalse ( result ) |
hasNoActiveMemberships_shouldReturnTrueIfNoneExists ( ) { java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . add ( Calendar . DAY_OF_YEAR , 1 ) ; java . util . Date endDateLater = calendar . getTime ( ) ; calendar . add ( Calendar . DAY_OF_YEAR , ( - 2 ) ) ; java . util . Date endDa... | org . junit . Assert . assertTrue ( cohort . hasNoActiveMemberships ( ) ) |
retryOn429WithoutRetryAfter ( ) { client = com . treasuredata . client . TDClient . newBuilder ( ) . setRetryMaxIntervalMillis ( 100 ) . setRetryLimit ( 3 ) . build ( ) . httpClient ; int requests = failWith429 ( com . google . common . base . Optional . < java . lang . String > absent ( ) , com . google . common . bas... | org . junit . Assert . assertThat ( requests , org . hamcrest . Matchers . is ( 4 ) ) |
testGetViolationsWithPolicy1 ( ) { eu . atos . sla . datamodel . IPolicy policy ; System . out . println ( "---testEvaluateWithPolicy1()---" ) ; java . util . List < eu . atos . sla . monitoring . IMonitoringMetric > metrics = setUpWithPolicies ( null , null ) ; policy = newPolicy ( "LATENCY" , 2 , new java . util . Da... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
testRequestWithNullStateQueries ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withStatesQuery ( null ) . build ( ) ; org . apache . hadoop . yarn . api . protocolr... | org . junit . Assert . assertEquals ( expectedRequest , request ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.