input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testReadBySimpleQuery ( ) { org . apache . eagle . storage . operation . RawQuery rawQuery = new org . apache . eagle . storage . operation . RawQuery ( ) ; rawQuery . setQuery ( "TestTimeSeriesAPIEntity[@cluster=\"c4ut\"]{*}" ) ; System . out . println ( org . apache . eagle . common . DateTimeUtil . millisecondsToHum... | org . junit . Assert . assertNotNull ( result ) |
testCleanedNonSerializable ( ) { org . apache . flink . api . java . functions . MapCreator creator = new org . apache . flink . api . java . functions . NonSerializableMapCreator ( ) ; org . apache . flink . api . common . functions . MapFunction < java . lang . Integer , java . lang . Integer > map = creator . getMap... | org . junit . Assert . assertEquals ( result , 4 ) |
test_suppression_spam_report__email__get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method ... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
totalCapacityLimited ( ) { com . iota . iri . controllers . TipsViewModel tipsVM = new com . iota . iri . controllers . TipsViewModel ( ) ; int capacity = TipsViewModel . MAX_TIPS ; for ( int i = 0 ; i <= ( capacity * 4 ) ; i ++ ) { com . iota . iri . model . Hash hash = com . iota . iri . TransactionTestUtils . getRan... | org . junit . Assert . assertEquals ( ( capacity * 2 ) , tipsVM . size ( ) ) |
ignoresSamplesOutsideOfSpecifiedNanosecondWindow ( ) { impl = new org . fishwife . jrugged . SampledQuantile ( ( 60 * 1000000000L ) , java . util . concurrent . TimeUnit . NANOSECONDS ) ; long now = java . lang . System . currentTimeMillis ( ) ; impl . addSample ( 7 , ( now - ( 90 * 1000L ) ) ) ; impl . addSample ( 42 ... | org . junit . Assert . assertEquals ( 42 , impl . getPercentile ( 50 , ( now + 1 ) ) ) |
testRepublicationConfigUpdate ( ) { org . easymock . EasyMock . reset ( ) ; synchronized ( updateLock ) { this . updateFromConfig = null ; } final cern . c2mon . server . common . datatag . DataTag tag = cern . c2mon . server . test . CacheObjectCreation . createTestDataTag3 ( ) ; java . util . List < cern . c2mon . se... | org . junit . Assert . assertTrue ( ( ( this . updateFromConfig ) == null ) ) |
AnnotationDependency ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AnnotationDependency" ; java . lang . String toClass = "Technology.Direct.Dao.SettingsAnnotation" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind .... | org . junit . Assert . assertFalse ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , false ) ) |
withConfigDescriptionURI_shouldSetConfigDescriptionURI ( ) { org . eclipse . smarthome . core . thing . type . ChannelType channelType = stateBuilder . withConfigDescriptionURI ( org . eclipse . smarthome . core . thing . type . ChannelTypeBuilderTest . CONFIGDESCRIPTION_URI ) . build ( ) ; "<AssertPlaceHolder>" ; } ge... | org . junit . Assert . assertThat ( channelType . getConfigDescriptionURI ( ) , org . hamcrest . CoreMatchers . is ( org . eclipse . smarthome . core . thing . type . ChannelTypeBuilderTest . CONFIGDESCRIPTION_URI ) ) |
shouldSetDescriptionToNullWithEmptyString ( ) { final java . lang . String description = "" ; entry . setDescription ( description ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return this . description ; } | org . junit . Assert . assertThat ( entry . getDescription ( ) , org . hamcrest . core . Is . is ( description ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . Company newCompany = addCompany ( ) ; com . liferay . portal . kernel . model . Company existingCompany = _persistence . fetchByPrimaryKey ( newCompany . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntry... | org . junit . Assert . assertEquals ( existingCompany , newCompany ) |
testTimestamp ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . ... | org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) ) |
testDeleteDrugInfoShouldDeleteDrugInfo ( ) { org . openmrs . Drug drug = new org . openmrs . Drug ( ) ; drug . setId ( 3 ) ; org . raxa . module . raxacore . DrugInfo drugInfo = new org . raxa . module . raxacore . DrugInfo ( ) ; drugInfo . setDrug ( drug ) ; drugInfo . setId ( 2 ) ; drugInfo . setName ( "TestDrugInfo2... | org . junit . Assert . assertEquals ( null , result ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . wiki . model . WikiPage newWikiPage = addWikiPage ( ) ; com . liferay . wiki . model . WikiPage existingWikiPage = _persistence . findByPrimaryKey ( newWikiPage . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; } | org . junit . Assert . assertEquals ( existingWikiPage , newWikiPage ) |
proceedFromDelegateMethodOnRegularMockedClass ( mockit . DelegateInvocationProceedTest$ClassToBeMocked ) { new mockit . Expectations ( ) { { mocked . methodToBeMocked ( ) ; result = new mockit . Delegate ( ) { @ mockit . Mock boolean delegate ( mockit . Invocation inv ) { return inv . proceed ( ) ; } } ; } } ; "<Assert... | org . junit . Assert . assertTrue ( mocked . methodToBeMocked ( ) ) |
testSimpleString ( ) { java . lang . String s = docClient . simpleStringReturn ( ) ; "<AssertPlaceHolder>" ; } simpleStringReturn ( ) { return "simple" ; } | org . junit . Assert . assertEquals ( "simple" , s ) |
updateDefinition_NonUniqueBK ( ) { voDef . setKey ( defSupplier . getKey ( ) ) ; doThrow ( new org . oscm . internal . types . exception . NonUniqueBusinessKeyException ( org . oscm . internal . types . exception . DomainObjectException . ClassEnum . UDA_DEFINITION , "test" ) ) . when ( ds ) . validateBusinessKeyUnique... | org . junit . Assert . assertNull ( defSupplier . getDefaultValue ( ) ) |
removeIgnorableURI ( ) { final java . lang . String [ ] ignorableNamespaces = new java . lang . String [ ] { "http://pippo.pluto.paperino/" , "http://this.should.not.be.already.managed" , "http://also.this.shouldnt" } ; for ( final java . lang . String ignorableNamespace : ignorableNamespaces ) { "<AssertPlaceHolder>" ... | org . junit . Assert . assertFalse ( _cut . contains ( ignorableNamespace ) ) |
testIntersectEmpty ( ) { org . batfish . datamodel . HeaderSpace h1 = org . batfish . datamodel . HeaderSpace . builder ( ) . setDscps ( com . google . common . collect . ImmutableList . of ( 1 ) ) . build ( ) ; org . batfish . datamodel . HeaderSpace h2 = org . batfish . datamodel . HeaderSpace . builder ( ) . setDscp... | org . junit . Assert . assertThat ( org . batfish . datamodel . IntersectHeaderSpaces . intersect ( h1 , h2 ) , org . hamcrest . Matchers . equalTo ( java . util . Optional . empty ( ) ) ) |
testAuthFail ( ) { com . blade . mvc . http . Request mockRequest = mockHttpRequest ( "GET" ) ; com . blade . mvc . WebContext . init ( com . blade . Blade . of ( ) , "/" ) ; java . util . Map < java . lang . String , java . lang . String > headers = new java . util . HashMap ( ) ; headers . put ( "Authorization" , "Ba... | org . junit . Assert . assertFalse ( flag ) |
shouldDetermineIfSuppressTimestampedReportsFlagIsSetWhenFalseSupplied ( ) { final org . pitest . mutationtest . config . ReportOptions actual = parseAddingRequiredArgs ( "--timestampedReports=false" ) ; "<AssertPlaceHolder>" ; } shouldCreateTimeStampedReports ( ) { return this . shouldCreateTimestampedReports ; } | org . junit . Assert . assertFalse ( actual . shouldCreateTimeStampedReports ( ) ) |
testValidateToken02 ( ) { org . terasoluna . gfw . web . token . transaction . HttpSessionTransactionTokenStore tokenStore = mock ( org . terasoluna . gfw . web . token . transaction . HttpSessionTransactionTokenStore . class ) ; org . terasoluna . gfw . web . token . transaction . TransactionToken inputToken = new org... | org . junit . Assert . assertFalse ( result ) |
testSetMinutes ( ) { time . setMinutes ( 30 ) ; "<AssertPlaceHolder>" ; } getMinutes ( ) { return minutes ; } | org . junit . Assert . assertEquals ( 30 , time . getMinutes ( ) ) |
supportsSchemeWithCopierFactoryClass ( ) { com . hotels . bdp . circustrain . api . copier . CopierFactory testCopierFactory = new com . hotels . bdp . circustrain . core . CopierFactoryManagerTest . TestCopierFactory ( ) ; copierFactoryManager = new com . hotels . bdp . circustrain . core . CopierFactoryManager ( java... | org . junit . Assert . assertEquals ( copierFactoryResult , testCopierFactory ) |
test2727 ( ) { final java . lang . String tableNameStr = "test2727" ; org . apache . hadoop . hbase . regionserver . wal . HRegionInfo hri = createBasic3FamilyHRegionInfo ( tableNameStr ) ; org . apache . hadoop . fs . Path basedir = new org . apache . hadoop . fs . Path ( hbaseRootDir , tableNameStr ) ; deleteDir ( ba... | org . junit . Assert . assertTrue ( ( seqid > ( wal3 . getSequenceNumber ( ) ) ) ) |
checkPluginCreation ( ) { info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap . IBootstrap < info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > > bootstrap = mock ( info . smart_tools . smartactors . feature_... | org . junit . Assert . assertNotNull ( plugin ) |
testNeedActivationWithDifferentIds ( ) { manager . activateServerPushFor ( org . eclipse . rap . rwt . internal . serverpush . ServerPushManager_Test . HANDLE_1 ) ; manager . activateServerPushFor ( org . eclipse . rap . rwt . internal . serverpush . ServerPushManager_Test . HANDLE_2 ) ; "<AssertPlaceHolder>" ; } needs... | org . junit . Assert . assertTrue ( manager . needsActivation ( ) ) |
testPropertyNull ( ) { net . opengis . filter . v_1_1_0 . FilterType filterType = cswFilterDelegate . propertyIsNull ( propertyName ) ; java . lang . String cqlText = org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . getInstance ( ) . getCqlText ( filterType ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( propertyIsNull , cqlText ) |
testVerwerkSnelheidSchrijfTaken ( ) { final java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . add ( Calendar . MINUTE , ( - 5 ) ) ; final nl . bzk . brp . service . selectie . lezer . status . SelectieJobRunStatus status = selectieJobRunStatusService . getStatus ( ) ; status . setS... | org . junit . Assert . assertEquals ( 20 , verwerksnelheid ) |
testGetSetAtlasConversionService ( ) { propStrategy . setAtlasConversionService ( io . atlasmap . core . DefaultAtlasConversionService . getInstance ( ) ) ; "<AssertPlaceHolder>" ; } getAtlasConversionService ( ) { return atlasConversionService ; } | org . junit . Assert . assertNotNull ( propStrategy . getAtlasConversionService ( ) ) |
testGetGroups ( ) { java . util . List < org . biojava . nbio . structure . Group > expResult = org . biojava . nbio . structure . SiteTest . bindingSiteGroups ; java . util . List < org . biojava . nbio . structure . Group > result = org . biojava . nbio . structure . SiteTest . bindingSite . getGroups ( ) ; "<AssertP... | org . junit . Assert . assertEquals ( expResult , result ) |
doesNotIncludeExecutable ( ) { com . sonatype . s2 . p2lineup . model . IP2Lineup lineup = uploadP2Lineup ( "withoutExecutable.xml" ) ; "<AssertPlaceHolder>" ; } uploadP2Lineup ( com . sonatype . s2 . p2lineup . model . IP2Lineup ) { org . sonatype . plexus . rest . representation . XStreamRepresentation representation... | org . junit . Assert . assertNotNull ( lineup ) |
testNoDependencies ( ) { org . guvnor . common . services . project . model . GAV gav = new org . guvnor . common . services . project . model . GAV ( "artifactID" , "groupID" , "version" ) ; java . util . Collection < org . guvnor . common . services . project . model . Dependency > dependencies = service . loadDepend... | org . junit . Assert . assertTrue ( dependencies . isEmpty ( ) ) |
groupCardinalityZeroToZeroWithDefaultAttributeCardinality ( ) { generateDrugsWithGroups ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>[0..0]<sp>{<sp>%s<sp>=<sp><%s<sp>}" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluatio... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetMessageType ( ) { org . talend . components . jms . JmsDatasetProperties jmsDatasetProperties = new org . talend . components . jms . JmsDatasetProperties ( "jmsDatasetProperties" ) ; jmsDatasetProperties . msgType . setValue ( JmsMessageType . QUEUE ) ; org . talend . components . jms . input . JmsInputProperti... | org . junit . Assert . assertEquals ( JmsMessageType . QUEUE , jmsInputPTransformRuntime . getMessageType ( ) ) |
testRename ( ) { final org . uberfire . backend . vfs . Path path = mock ( org . uberfire . backend . vfs . Path . class ) ; final org . uberfire . backend . vfs . Path expectedPath = mock ( org . uberfire . backend . vfs . Path . class ) ; final java . lang . String newName = "newName" ; final java . lang . String com... | org . junit . Assert . assertEquals ( expectedPath , actualPath ) |
periodosColidemInclusive ( ) { java . util . Date inicioPeriodo1 = new org . joda . time . DateTime ( 2016 , 10 , 22 , 5 , 10 , 0 ) . toDate ( ) ; java . util . Date fimPeriodo1 = new org . joda . time . DateTime ( 2016 , 10 , 24 , 5 , 10 , 0 ) . toDate ( ) ; java . util . Date inicioPeriodo2 = new org . joda . time . ... | org . junit . Assert . assertTrue ( resultado1 ) |
testGetSetName ( ) { java . lang . String expectedName = "testGetSetName" ; com . microsoft . windowsazure . services . media . models . JobInfo JobInfo = new com . microsoft . windowsazure . services . media . models . JobInfo ( null , new com . microsoft . windowsazure . services . media . implementation . content . ... | org . junit . Assert . assertEquals ( expectedName , actualName ) |
testZero ( ) { final org . apache . commons . math4 . analysis . function . Sinc s = new org . apache . commons . math4 . analysis . function . Sinc ( ) ; "<AssertPlaceHolder>" ; } value ( double ) { return ( ( a ) * x ) + ( b ) ; } | org . junit . Assert . assertEquals ( 1.0 , s . value ( 0 ) , 0 ) |
checkMetadataLog2DarkOakDirectional ( ) { com . voxelwind . api . game . level . block . BlockState state = generateTestBlockState ( BlockTypes . ACACIA_WOOD , null , com . voxelwind . api . game . item . data . wood . Log . of ( TreeSpecies . DARK_OAK , LogDirection . HORIZONTAL_X ) ) ; short metadata = com . voxelwin... | org . junit . Assert . assertEquals ( 5 , metadata ) |
test ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > categorieen = new nl . bzk . migratiebrp . bericht . model . lo3 . format . Lo3PersoonslijstFormatter ( ) . format ( buildLo3Persoonslijst ( ) ) ; final java . util . List < nl . bzk . migratiebrp . co... | org . junit . Assert . assertEquals ( verwachteNg01 . toString ( ) , ng01 ) |
connectionStatusHealth ( ) { populateConnection ( ) ; java . lang . String statusRequest = "connection:all:health" ; org . apache . nifi . minifi . commons . status . FlowStatusReport status = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowController , statusRequest , org . slf4j . L... | org . junit . Assert . assertEquals ( expected , status ) |
testConvertToAvroStreamForNumbers ( ) { final java . sql . ResultSetMetaData metadata = mock ( java . sql . ResultSetMetaData . class ) ; when ( metadata . getColumnCount ( ) ) . thenReturn ( 1 ) ; when ( metadata . getColumnType ( 1 ) ) . thenReturn ( testParams . sqlType ) ; when ( metadata . isSigned ( 1 ) ) . thenR... | org . junit . Assert . assertEquals ( java . lang . Integer . toString ( ret ) , record . get ( "t_int" ) . toString ( ) ) |
copyStringPropertyValue ( ) { java . util . List < org . springframework . data . rest . webmvc . json . patch . Todo > todos = new java . util . ArrayList < org . springframework . data . rest . webmvc . json . patch . Todo > ( ) ; todos . add ( new org . springframework . data . rest . webmvc . json . patch . Todo ( ... | org . junit . Assert . assertEquals ( "A" , todos . get ( 1 ) . getDescription ( ) ) |
testNotEquals ( ) { final com . lexicalscope . jewel . cli . TestObjectMethods . SingleOption parsedArguments0 = com . lexicalscope . jewel . cli . CliFactory . parseArguments ( com . lexicalscope . jewel . cli . TestObjectMethods . SingleOption . class , "--name" , "value" ) ; final com . lexicalscope . jewel . cli . ... | org . junit . Assert . assertFalse ( parsedArguments0 . equals ( parsedArguments1 ) ) |
testCheckForElements_noElements ( ) { javax . xml . parsers . DocumentBuilderFactory builderFactory = javax . xml . parsers . DocumentBuilderFactory . newInstance ( ) ; javax . xml . parsers . DocumentBuilder documentBuilder = builderFactory . newDocumentBuilder ( ) ; org . w3c . dom . Document document = documentBuild... | org . junit . Assert . assertEquals ( 0 , problems . size ( ) ) |
testTimestampToTime ( ) { com . dremio . dac . model . job . JobDataFragment data = testConvert ( "cast(cast(l_commitdate<sp>as<sp>timestamp)<sp>as<sp>time)<sp>as<sp>foo" , new com . dremio . dac . proto . model . dataset . FieldSimpleConvertToType ( TIME ) , "l_commitdate" , "cp.\"tpch/lineitem.parquet\"" ) ; "<Assert... | org . junit . Assert . assertEquals ( com . dremio . dac . server . TIME , data . getColumn ( "foo" ) . getType ( ) ) |
testLoadingDfsUsedForVolumesExpired ( ) { long waitIntervalTime = 5000 ; long cachedDfsUsedIntervalTime = waitIntervalTime - 1000 ; conf . setLong ( org . apache . hadoop . hdfs . DFSConfigKeys . DFS_DN_CACHED_DFSUSED_CHECK_INTERVAL_MS , cachedDfsUsedIntervalTime ) ; long cacheDfsUsed = 1024 ; long dfsUsed = getDfsUsed... | org . junit . Assert . assertTrue ( ( cacheDfsUsed != dfsUsed ) ) |
testPolygons ( ) { org . springframework . mock . web . MockHttpServletResponse resp = getAsServletResponse ( "wfs?request=GetFeature&version=1.1.0&typeName=Polygons&outputFormat=dxf" ) ; java . lang . String sResponse = testBasicResult ( resp , "Polygons" ) ; int pos = getGeometrySearchStart ( sResponse ) ; "<AssertPl... | org . junit . Assert . assertTrue ( ( pos != ( - 1 ) ) ) |
testAccessUpdateUserWithRights ( ) { net . maritimecloud . identityregistry . model . database . entities . User user = new net . maritimecloud . identityregistry . model . database . entities . User ( ) ; user . setMrn ( "urn:mrn:mcl:user:dma:thc" ) ; user . setFirstName ( "ROLE_USER_ADMIN" 0 ) ; user . setLastName ( ... | org . junit . Assert . assertTrue ( false ) |
testEmptyDOMs ( ) { java . lang . String left = "" ; java . lang . String right = "" ; java . util . List < org . custommonkey . xmlunit . Difference > l = com . crawljax . util . DomUtils . getDifferences ( left , right ) ; "<AssertPlaceHolder>" ; } getDifferences ( java . lang . String , java . lang . String ) { retu... | org . junit . Assert . assertEquals ( 0 , l . size ( ) ) |
readErrorCompletelyReadsErrorStream ( java . io . InputStream ) { final com . microsoft . azure . sdk . iot . deps . transport . http . HttpMethod httpsMethod = com . microsoft . azure . sdk . iot . deps . transport . http . HttpMethod . GET ; byte [ ] expectedError = new byte [ ] { 1 , 2 , 3 } ; new mockit . NonStrict... | org . junit . Assert . assertThat ( testError , org . hamcrest . CoreMatchers . is ( expectedError ) ) |
testZeroTokensTillEndOfIntervalAfterThrottleMaxOnce ( ) { bucket . isThrottled ( MAX_TOKENS ) ; final long SLEEP_TIME = 1000L ; for ( int i = 1 ; i < ( ( REFILL_INTERVAL ) / ( STEP_INTERVAL ) ) ; i ++ ) { java . lang . Thread . sleep ( SLEEP_TIME ) ; "<AssertPlaceHolder>" ; } } getCurrentTokenCount ( ) { updateTokens (... | org . junit . Assert . assertEquals ( 0 , bucket . getCurrentTokenCount ( ) ) |
getPatients_shouldNotGetPatientsByNullQuery_SignatureNo2 ( ) { java . util . List < org . openmrs . Patient > patients = dao . getPatients ( "" , 0 , 11 ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collec... | org . junit . Assert . assertEquals ( 0 , patients . size ( ) ) |
testWithoutErrorHandler ( ) { final org . apache . oozie . fluentjob . api . action . ErrorHandler errorHandler = org . apache . oozie . fluentjob . api . action . ErrorHandler . buildAsErrorHandler ( org . apache . oozie . fluentjob . api . action . MapReduceActionBuilder . create ( ) . withName ( "error-handler" ) ) ... | org . junit . Assert . assertEquals ( null , modifiedNode . getErrorHandler ( ) ) |
testSanitizeCloseBracketEscaped ( ) { java . lang . String testString = com . github . bordertech . wcomponents . WebUtilities . CLOSE_BRACKET_ESCAPE ; "<AssertPlaceHolder>" ; } sanitize ( java . lang . String ) { return com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( input , false ) ; } | org . junit . Assert . assertEquals ( testString , com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( testString ) ) |
transactionManagerTest ( ) { System . out . print ( "-><sp>transactionManager()<sp>-<sp>" ) ; ua . com . alexcoffee . config . DatabaseConfig databaseConfig = new ua . com . alexcoffee . config . DatabaseConfig ( ) ; javax . persistence . EntityManagerFactory factory = mock ( javax . persistence . EntityManagerFactory ... | org . junit . Assert . assertNotNull ( databaseConfig . transactionManager ( factory ) ) |
cast_base64_to_base64 ( ) { final org . exist . xquery . value . BinaryValueManager binaryValueManager = new org . exist . xquery . value . MockBinaryValueManager ( ) ; final org . exist . xquery . value . BinaryValue mockBase64BinaryValue = org . easymock . EasyMock . createMockBuilder ( org . exist . xquery . value .... | org . junit . Assert . assertEquals ( mockBase64BinaryValue , result ) |
writeString ( ) { try ( final org . apache . commons . io . output . StringBuilderWriter writer = new org . apache . commons . io . output . StringBuilderWriter ( ) ; final org . apache . commons . io . output . ProxyWriter proxy = new org . apache . commons . io . output . ProxyWriter ( writer ) ) { proxy . write ( "A... | org . junit . Assert . assertEquals ( "ABC" , writer . toString ( ) ) |
not_tag_predicate_matches_pickle_with_no_tags ( ) { gherkin . events . PickleEvent pickleEvent = createPickleWithTags ( java . util . Collections . < gherkin . pickles . PickleTag > emptyList ( ) ) ; com . github . timm . cucumber . runtime . TagPredicate predicate = new com . github . timm . cucumber . runtime . TagPr... | org . junit . Assert . assertTrue ( predicate . apply ( pickleEvent ) ) |
invalidIpIsDropped ( ) { java . lang . String invalidIp = "555.555.555.555" ; "<AssertPlaceHolder>" ; } whitelist ( java . lang . String ) { java . lang . String [ ] w = new java . lang . String [ ] { ip } ; return new com . asquera . elasticsearch . plugins . http . auth . InetAddressWhitelist ( w ) ; } | org . junit . Assert . assertFalse ( whitelist ( invalidIp ) . contains ( invalidIp ) ) |
test_reduce_boolean_sequence ( ) { boolean [ ] a = new boolean [ ] { true , false , true , true } ; boolean result = server . reduce_boolean_sequence ( a ) ; "<AssertPlaceHolder>" ; } reduce_boolean_sequence ( boolean [ ] ) { boolean parity = false ; for ( int i = 0 ; i < ( seq . length ) ; i ++ ) { if ( seq [ i ] ) pa... | org . junit . Assert . assertEquals ( true , result ) |
testLaboratoryRowSets ( ) { int code = 0 ; try { code = _setupTestLaboratoryRow ( true ) ; _checkLaboratoryRowIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkLaboratoryRowIntoDb ( int ) { org . isf . lab . model . LaboratoryRow foundLaborato... | org . junit . Assert . assertEquals ( true , false ) |
fileaccess_01 ( ) { "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( length ) == 0 ; } | org . junit . Assert . assertTrue ( file . isEmpty ( ) ) |
instantiation ( ) { org . junithelper . core . meta . ClassMeta target = new org . junithelper . core . meta . ClassMeta ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( target ) |
testKeyConversion ( ) { org . apache . metron . enrichment . converter . EnrichmentKey k1 = new org . apache . metron . enrichment . converter . EnrichmentKey ( "type" , "indicator1" ) ; byte [ ] serialized = k1 . toBytes ( ) ; org . apache . metron . enrichment . converter . EnrichmentKey k2 = new org . apache . metro... | org . junit . Assert . assertEquals ( k1 , k2 ) |
testAddingFileEntryWithNoImageCreatesNoMedia ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; com . l... | org . junit . Assert . assertEquals ( 0 , adaptiveMediaStream . count ( ) ) |
testGetAjaxException ( ) { org . springframework . test . web . servlet . MvcResult result = mockMvc . perform ( org . springframework . test . web . servlet . request . MockMvcRequestBuilders . get ( "/demo/error" ) . header ( "Content<sp>Type" , MediaType . APPLICATION_JSON ) . header ( "X-Requested-With" , "XMLHttpR... | org . junit . Assert . assertTrue ( true ) |
testRmMiddleRange ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 1 , 10 ) ; s . add ( ( - 3 ) , ( - 3 ) ) ; s . remove ( 5 ) ; java . lang . String expecting = "{-3,<sp>1..4,<sp>6..10}" ; java . lang . String result = s . toString ( ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( expecting , result ) |
addFulltextBlank ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; org . apache . sling . testing . mock . sling . servlet . MockSlingHttpServletRequest request = context . request ( ) ; com . adobe . acs . commons . contentfinder . querybuilder . impl . viewh... | org . junit . Assert . assertEquals ( 0 , map . size ( ) ) |
normalUsageCase006 ( ) { processedUsages = usageRollupProcessor . processRecords ( allUsageRecordsInOrder , hourToRollup , lbsActiveDuringHour ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . service . domain . entities . Usage actualUsage = processedUsages . get ( 0 ) ; org . openstack . atlas . usagerefactor . j... | org . junit . Assert . assertEquals ( 2 , processedUsages . size ( ) ) |
testOptionalFailingConfig ( ) { org . dcache . gplazma . strategies . MappingStrategy strategy = strategyFactory . newMappingStrategy ( ) ; "<AssertPlaceHolder>" ; strategy . setPlugins ( testOptionalFailingPlugins ) ; java . util . Set < java . security . Principal > principals = com . google . common . collect . Sets... | org . junit . Assert . assertNotNull ( strategy ) |
testIllegal ( ) { cn . jpush . api . push . model . notification . Notification notification = cn . jpush . api . push . model . notification . Notification . newBuilder ( ) . addPlatformNotification ( cn . jpush . api . push . model . notification . AndroidNotification . newBuilder ( ) . build ( ) ) . build ( ) ; "<As... | org . junit . Assert . assertEquals ( "" , "" , notification . toJSON ( ) ) |
testCompute1 ( ) { setupParameters ( ) ; parameters . setInputDimensions ( new int [ ] { 9 } ) ; parameters . setColumnDimensions ( new int [ ] { 5 } ) ; parameters . setPotentialRadius ( 5 ) ; parameters . setPotentialPct ( 0.5 ) ; parameters . setGlobalInhibition ( false ) ; parameters . setLocalAreaDensity ( ( - 1.0... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( inputVector , permanences ) ) |
testEncodingSingleCookieV1 ( ) { java . lang . String result = "myCookie=myValue;<sp>Max-Age=50;<sp>Path=\"/apathsomewhere\";<sp>Domain=.adomainsomewhere;<sp>Secure;<sp>Comment=\"this<sp>is<sp>a<sp>Comment\";<sp>Version=1" ; org . jboss . netty . handler . codec . http . Cookie cookie = new org . jboss . netty . handle... | org . junit . Assert . assertEquals ( result , encodedCookie ) |
testIsPathIgnored ( ) { fr . fastconnect . tibco . businessworks . fcunit . xml . FCDiff diff = new fr . fastconnect . tibco . businessworks . fcunit . xml . FCDiff ( getExpected ( ) , getActual ( ) ) ; java . util . ArrayList < java . lang . String > ignoredXPaths = new java . util . ArrayList < java . lang . String >... | org . junit . Assert . assertTrue ( diff . isPathIgnored ( "/ESBMsg[1]/FlowData[1]/Pivot[1]/commande[1]/entete[1]/idCommandeBO[1]/text()[1]" ) ) |
testSetBoshVersion1 ( ) { mocksControl . replay ( ) ; org . apache . vysper . xmpp . extension . xep0124 . BoshBackedSessionContext boshBackedSessionContext = new org . apache . vysper . xmpp . extension . xep0124 . BoshBackedSessionContext ( serverRuntimeContext , null , inactivityChecker ) ; boshBackedSessionContext ... | org . junit . Assert . assertEquals ( "1.8" , boshBackedSessionContext . getBoshVersion ( ) ) |
testDotInRegExPartOfSpeechRelationExtraction ( ) { jCas . setDocumentText ( uk . gov . dstl . baleen . annotators . relations . PartOfSpeechRelationshipTest . SENTENCE ) ; final uk . gov . dstl . baleen . types . common . Person ben = uk . gov . dstl . baleen . annotators . testing . Annotations . createPerson ( jCas ,... | org . junit . Assert . assertEquals ( 3 , relations . size ( ) ) |
test ( ) { java . lang . String fcParamsAsJson = new java . lang . String ( org . apache . commons . codec . binary . Base64 . decodeBase64 ( getTestfcParamsAsBase64 ( ) ) ) ; logger . info ( fcParamsAsJson ) ; org . ebayopensource . fido . uaf . msg . FinalChallengeParams fromJson = gson . fromJson ( fcParamsAsJson , ... | org . junit . Assert . assertNotNull ( fromJson ) |
testDeleteBusinessObjectFormat ( ) { businessObjectFormatServiceTestHelper . createTestBusinessObjectFormat ( businessObjectDefinitionServiceTestHelper . getNewAttributes ( ) ) ; org . finra . herd . model . jpa . BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectFormatDao . getBusinessObjectFormatB... | org . junit . Assert . assertNull ( businessObjectFormatDao . getBusinessObjectFormatByAltKey ( new org . finra . herd . model . api . xml . BusinessObjectFormatKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , INITIAL_FORMAT_VERSION ) ) ) |
testGetStorage ( ) { org . finra . herd . model . api . xml . StorageKey storageKey = new org . finra . herd . model . api . xml . StorageKey ( STORAGE_NAME ) ; org . finra . herd . model . api . xml . Storage storage = new org . finra . herd . model . api . xml . Storage ( STORAGE_NAME , STORAGE_PLATFORM_CODE , NO_ATT... | org . junit . Assert . assertEquals ( storage , result ) |
testStdFree ( ) { int maxLength = Integer . MAX_VALUE ; java . util . List < org . ranksys . core . util . tuples . Tuple2od < java . lang . String > > result = recommender . getRecommendation ( "0" , maxLength ) . getItems ( ) ; java . util . List < org . ranksys . core . util . tuples . Tuple2od < java . lang . Strin... | org . junit . Assert . assertEquals ( expected , result ) |
shouldNotWrite ( ) { "<AssertPlaceHolder>" ; this . elPropertyAccessor . write ( this . context , this . target , this . name , this . value ) ; } canWrite ( org . springframework . expression . EvaluationContext , java . lang . Object , java . lang . String ) { return false ; } | org . junit . Assert . assertThat ( this . elPropertyAccessor . canWrite ( this . context , this . target , this . name ) , org . hamcrest . Matchers . is ( false ) ) |
testExamGets ( ) { java . lang . String code = "" ; try { code = _setupTestExam ( false ) ; _checkExamIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkExamIntoDb ( java . lang . String ) { org . isf . exa . model . Exam foundExam ; foundExam ... | org . junit . Assert . assertEquals ( true , false ) |
testRecorderFactory2 ( ) { org . spf4j . perf . CloseableMeasurementRecorder rec = org . spf4j . perf . impl . RecorderFactory . createScalableQuantizedRecorder2 ( org . spf4j . perf . impl . RecorderFactoryTest . class , "ms" , 100000000 , 10 , 0 , 6 , 10 ) ; javax . management . openmbean . CompositeData ret3 = ( ( j... | org . junit . Assert . assertNull ( ret3 ) |
testReplaceCountWithNoCount ( ) { java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>Foo<sp>where<sp>foo<sp>!=<sp>1" ; java . util . function . Function < java . lang . String , java . lang . String > function = com . liferay . portal . dao . sql . transformer . JPQLToHQLTransformerLogic . getCountFunction ( ) ; "<Asse... | org . junit . Assert . assertEquals ( sql , function . apply ( sql ) ) |
testGetContent ( ) { com . eclipsesource . tabris . widgets . swipe . SwipeItem item = mock ( com . eclipsesource . tabris . widgets . swipe . SwipeItem . class ) ; swipeItemHolder . addItem ( 0 , item ) ; org . eclipse . swt . widgets . Composite content = mock ( org . eclipse . swt . widgets . Composite . class ) ; s... | org . junit . Assert . assertSame ( content , actualContent ) |
testCFScript_QueryParams_Qoq ( ) { final java . lang . String cfcSrc = "<cfquery<sp>name=\"outDocs\"<sp>dbtype=\"query\"><sp>Select<sp>*<sp>From<sp>arguments.documents<sp>WHERE<sp>DocumentType<sp>=<sp>\'COLD\'<sp>and<sp>TransactionType<sp>IN<sp>(\'1\',\'6\')<sp>#orderBy#<sp></cfquery><sp>" ; com . cflint . api . CFLint... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testGetResponseString ( ) { java . lang . String expResult = "test" ; java . lang . String result = instance . getResponseString ( ) ; "<AssertPlaceHolder>" ; } getResponseString ( ) { return responseString ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testNoDateRange ( ) { eu . europa . esig . dss . validation . process . qualification . trust . filter . ServiceByDateFilter filter = new eu . europa . esig . dss . validation . process . qualification . trust . filter . ServiceByDateFilter ( eu . europa . esig . dss . validation . process . qualification . trust . fil... | org . junit . Assert . assertFalse ( filter . isAcceptable ( service ) ) |
testPerformance ( ) { java . util . Set < org . apache . clerezza . commons . rdf . Triple > graph = new java . util . HashSet < org . apache . clerezza . commons . rdf . Triple > ( ) ; int iterations = 100 ; int graphsize = 100000 ; java . lang . Long seed = java . lang . System . currentTimeMillis ( ) ; org . apache ... | org . junit . Assert . assertEquals ( sgr , igr ) |
testToString_2 ( ) { org . audit4j . core . util . StopWatch fixture = new org . audit4j . core . util . StopWatch ( "" ) ; fixture . setKeepTaskList ( true ) ; fixture . start ( "" ) ; halt ( ) ; fixture . stop ( ) ; java . lang . String result = fixture . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { java .... | org . junit . Assert . assertNotNull ( result ) |
decodeExtended ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( extended ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; final com . flagstone . transform . coder . Context context = new co... | org . junit . Assert . assertNotNull ( fixture ) |
shouldCreateAsManyBundlesAsItsDesired ( ) { splitter = new org . apache . beam . sdk . io . synthetic . BundleSplitter ( options ) ; int expectedBundleCount = 4 ; java . util . List bundleSizes = splitter . getBundleSizes ( expectedBundleCount , 0 , options . numRecords ) ; "<AssertPlaceHolder>" ; } size ( ) { return s... | org . junit . Assert . assertEquals ( expectedBundleCount , bundleSizes . size ( ) ) |
testFirstValueFunctionWithCaseArgument ( ) { java . lang . String sqlText = org . junit . Assert . format ( ( "<sp>21<sp>|<sp>7500<sp>|<sp>3<sp>|<sp>0<sp>|\n" 1 + ( ( "first_value((CASE<sp>WHEN<sp>empno<sp><<sp>17<sp>THEN<sp>1<sp>WHEN<sp>empno<sp>>=<sp>17<sp>THEN<sp>0<sp>END))<sp>" + "over(partition<sp>by<sp>deptno<sp>... | org . junit . Assert . assertEquals ( ( ( "<sp>21<sp>|<sp>7500<sp>|<sp>3<sp>|<sp>0<sp>|\n" 0 + sqlText ) + "<sp>21<sp>|<sp>7500<sp>|<sp>3<sp>|<sp>0<sp>|\n" 0 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testOfConcrete_Params ( ) { org . openscience . cdk . interfaces . IAtom mock = mock ( org . openscience . cdk . DynamicFactoryTest . MockedAtom . class ) ; org . openscience . cdk . DynamicFactory factory = new org . openscience . cdk . DynamicFactory ( 5 ) ; "<AssertPlaceHolder>" ; factory . register ( org . openscie... | org . junit . Assert . assertTrue ( factory . implementorsOf ( org . openscience . cdk . interfaces . IAtom . class ) . isEmpty ( ) ) |
needsHierarchicalBecauseOfFixedOrder2_checkWhetherMarked ( ) { org . eclipse . elk . alg . layered . graph . LNode leftOuterNode = addNodeToLayer ( makeLayer ( ) ) ; org . eclipse . elk . alg . layered . graph . LNode rightOuterNode = addNodeToLayer ( makeLayer ( ) ) ; setFixedOrderConstraint ( leftOuterNode ) ; org . ... | org . junit . Assert . assertFalse ( data . dontSweepInto ( ) ) |
queryCollectList ( ) { java . lang . String weixinId = "oYaa9t_eipZkGBnhZ0ay2E8F2D5s" ; com . micro . rent . biz . map . baidu . MapPoint mapPoint = new com . micro . rent . biz . map . baidu . MapPoint ( "116.5" , "36.5" ) ; java . util . List < com . micro . rent . biz . personal . vo . HouseVo > wrap = favoritesServ... | org . junit . Assert . assertNotNull ( wrap ) |
testSetLocale_setsLocaleOnUISession ( ) { org . eclipse . rap . rwt . RWT . setLocale ( Locale . ITALY ) ; java . util . Locale result = org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) . getLocale ( ) ; "<AssertPlaceHolder>" ; } getLocale ( ) { return ( ( locales ) == null ) || ( ( l... | org . junit . Assert . assertSame ( Locale . ITALY , result ) |
testPut_AddToRoot ( ) { com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < java . lang . Integer > tree = new com . googlecode . concurrenttrees . radix . ConcurrentRadixTree < java . lang . Integer > ( getNodeFactory ( ) ) ; tree . put ( "A" , 1 ) ; java . lang . String expected = "○\n" + "└──<sp>○<sp>... | org . junit . Assert . assertEquals ( expected , actual ) |
testCheck_doesNotExist ( ) { com . google . cloud . tools . jib . registry . BlobCheckerIntegrationTest . localRegistry . pullAndPushToLocal ( "busybox" , "busybox" ) ; com . google . cloud . tools . jib . registry . RegistryClient registryClient = com . google . cloud . tools . jib . registry . RegistryClient . factor... | org . junit . Assert . assertNull ( registryClient . checkBlob ( fakeBlobDigest ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.