input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldGetAttributesReturnAnNoAttributesWhenInitiateAnPointSolution ( ) { org . uma . jmetal . util . solutionattribute . impl . GenericSolutionAttributeTest . MockedDoubleSolution solution = new org . uma . jmetal . util . solutionattribute . impl . GenericSolutionAttributeTest . MockedDoubleSolution ( ) ; "<AssertPlac... | org . junit . Assert . assertTrue ( solution . getAttributes ( ) . isEmpty ( ) ) |
testCodeProperty ( ) { target . setCode ( "code1" ) ; "<AssertPlaceHolder>" ; } getCode ( ) { return code ; } | org . junit . Assert . assertEquals ( "code1" , target . getCode ( ) ) |
getNewestTargetNumber ( ) { final java . util . Map < java . lang . String , java . util . Set < java . lang . String > > indexNameAliases = com . google . common . collect . ImmutableMap . of ( "graylog_1" , java . util . Collections . emptySet ( ) , "graylog_2" , java . util . Collections . emptySet ( ) , "graylog_3"... | org . junit . Assert . assertEquals ( 3 , number ) |
testUpdateEntity ( ) { final long dummyId = 0 ; org . hibernate . Session session = sf . openSession ( ) ; org . hibernate . Transaction tx = session . beginTransaction ( ) ; session . save ( new com . hazelcast . hibernate . entity . DummyEntity ( dummyId , null , 0 , null ) ) ; tx . commit ( ) ; tx = session . beginT... | org . junit . Assert . assertEquals ( "updatedName" , entity . getName ( ) ) |
removeSomeUserContent ( ) { createSomeTagUserContent ( ) ; manager . remove ( user , content ) ; final java . util . List < cc . kune . domain . Tag > tags = manager . find ( user , content ) ; "<AssertPlaceHolder>" ; } size ( ) { int result = 0 ; if ( ( inputMap ) != null ) { result = inputMap . size ( ) ; } return re... | org . junit . Assert . assertEquals ( 0 , tags . size ( ) ) |
testMutationsLine11 ( ) { java . lang . reflect . Method m2 = clazz . getMethod ( "m2" , double . class ) ; java . util . List < de . unisb . cs . st . javalanche . mutation . results . Mutation > mutations = de . unisb . cs . st . javalanche . mutation . results . persistence . QueryManager . getMutations ( className ... | org . junit . Assert . assertEquals ( 1 , mutations . size ( ) ) |
testBuildWithParametersAndDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . order . type . OrderType orderType = new org . lnu . is . domain . order . type . OrderType ( ) ; org . lnu . is . domain . employee . Employee employee = new org . lnu . is .... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
updateLeftOffTimeFetch ( ) { java . time . Instant now = java . time . Instant . now ( ) . truncatedTo ( ChronoUnit . SECONDS ) ; rdfRepository . updateLeftOffTime ( now ) ; "<AssertPlaceHolder>" ; } fetchLeftOffTime ( ) { org . wikidata . query . rdf . tool . rdf . RdfRepository . log . info ( "Checking<sp>for<sp>left... | org . junit . Assert . assertEquals ( now , rdfRepository . fetchLeftOffTime ( ) ) |
testNegativeY ( ) { org . apache . commons . math . geometry . Vector3D c = new org . apache . commons . math . geometry . Vector3D ( 1.2323 , ( - 1.4343 ) , 1.6333 ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "43;<sp>1" ) + ( getDe... | org . junit . Assert . assertEquals ( expected , actual ) |
testInitOK ( ) { com . webpagebytes . cms . engine . ResourceRequestProcessor processor = new com . webpagebytes . cms . engine . ResourceRequestProcessor ( ) ; java . lang . Throwable exception = null ; try { processor . initialize ( "admin" , "META-INF/config/resourceswhitelist.properties" ) ; } catch ( com . webpage... | org . junit . Assert . assertTrue ( ( exception == null ) ) |
testEqualsWithSelf ( ) { au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel l1 = new au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel ( "name1" , "description1" , java . math . BigInteger . TEN , 2 ) ; au . gov . ga . earthsci . core . temporal . timescale . BasicTi... | org . junit . Assert . assertTrue ( l1 . equals ( l2 ) ) |
quoteReplacements ( ) { java . lang . String escaped = "\<sp>$" ; java . lang . String unescaped = "\\<sp>$" ; "<AssertPlaceHolder>" ; } unescape ( java . lang . String ) { return com . itextpdf . styledxmlparser . jsoup . nodes . Entities . unescape ( string , false ) ; } | org . junit . Assert . assertEquals ( unescaped , com . itextpdf . styledxmlparser . jsoup . nodes . Entities . unescape ( escaped ) ) |
testUnassignUsersFromRole ( ) { long [ ] standardRoleIds = addStandardRoles ( ) ; com . liferay . portal . kernel . service . UserGroupRoleServiceUtil . deleteUserGroupRoles ( addUsers ( ) , organization . getGroupId ( ) , standardRoleIds [ 0 ] ) ; "<AssertPlaceHolder>" ; } isPropagateRoles ( ) { return com . liferay .... | org . junit . Assert . assertTrue ( isPropagateRoles ( ) ) |
shouldBeTrueWhenGivenTrue ( ) { final org . pitest . functional . predicate . Or < java . lang . Object > testee = or ( ( i ) -> true ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String ) { return this . includedClassPathElement . contains ( a ) ; } | org . junit . Assert . assertTrue ( testee . test ( null ) ) |
testEffect4 ( ) { java . lang . String words = segW . segWords ( "" , "|" ) ; "<AssertPlaceHolder>" ; } segWords ( java . lang . String , java . lang . String ) { return segWords ( new java . io . StringReader ( txt ) , wordSpilt ) ; } | org . junit . Assert . assertEquals ( "|" , words ) |
unbindWithSubContext ( ) { final org . apache . openejb . core . ivm . naming . IvmContext context = new org . apache . openejb . core . ivm . naming . IvmContext ( "" ) ; context . bind ( "global/foo/Bar" , "Bar" ) ; org . apache . openejb . util . Contexts . createSubcontexts ( context , "global/foo/Bar" ) ; "<Assert... | org . junit . Assert . assertEquals ( "Bar" , context . lookup ( "global/foo/Bar" ) ) |
testToTempByteBuf ( ) { @ org . jetbrains . annotations . NotNull java . lang . String hi = "Hello<sp>World" ; @ org . jetbrains . annotations . NotNull char [ ] chars = hi . toCharArray ( ) ; net . openhft . chronicle . bytes . NativeBytesStore < java . lang . Void > bs = net . openhft . chronicle . bytes . NativeByte... | org . junit . Assert . assertEquals ( bb . get ( i ) , ( ( byte ) ( chars [ i ] ) ) ) |
testCanOperatorBeSetWhenFactTypeIsNil ( ) { final java . lang . String factField = "" ; doReturn ( factField ) . when ( plugin ) . getFactField ( ) ; "<AssertPlaceHolder>" ; } canOperatorBeSet ( ) { return ( hasFactField ( ) ) && ( ! ( isConstraintValuePredicate ( ) ) ) ; } | org . junit . Assert . assertFalse ( page . canOperatorBeSet ( ) ) |
givenRegexWithLineTerminator_whenMatchesWithEmbeddedDotall_thenCorrect ( ) { java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( "(?s)(.*)" ) ; java . util . regex . Matcher matcher = pattern . matcher ( ( ( "this<sp>is<sp>a<sp>text" + ( java . lang . System . getProperty ( "line.separator... | org . junit . Assert . assertEquals ( ( ( "this<sp>is<sp>a<sp>text" + ( java . lang . System . getProperty ( "line.separator" ) ) ) + "<sp>continued<sp>on<sp>another<sp>line" ) , matcher . group ( 1 ) ) |
testToString ( ) { jsonObject . put ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } encode ( ) { return io . vertx . core . json . Json . encode ( map ) ; } | org . junit . Assert . assertEquals ( jsonObject . encode ( ) , jsonObject . toString ( ) ) |
createPolicyWithConfigurationAndConfigurationData ( ) { io . gravitee . gateway . policy . PolicyMetadata policyDefinition = mock ( io . gravitee . gateway . policy . PolicyMetadata . class ) ; when ( policyDefinition . policy ( ) ) . then ( ( ( org . mockito . stubbing . Answer < java . lang . Class > ) ( ( invocation... | org . junit . Assert . assertNotNull ( policy ) |
testGetIpAddress ( ) { byte [ ] bytes = java . net . InetAddress . getLocalHost ( ) . getAddress ( ) ; "<AssertPlaceHolder>" ; } getIpAddress ( ) { try { return com . cedarsoftware . util . InetAddressUtilities . getLocalHost ( ) . getAddress ( ) ; } catch ( java . lang . Exception e ) { com . cedarsoftware . util . In... | org . junit . Assert . assertArrayEquals ( bytes , com . cedarsoftware . util . InetAddressUtilities . getIpAddress ( ) ) |
constructorSuccess ( java . util . concurrent . LinkedBlockingDeque ) { new tests . unit . com . microsoft . azure . sdk . iot . device . fileupload . Expectations ( ) { { new com . microsoft . azure . sdk . iot . device . transport . https . HttpsTransportManager ( mockConfig ) ; result = mockHttpsTransportManager ; j... | org . junit . Assert . assertNotNull ( fileUpload ) |
getPreviousReleaseShouldReturnNullNoPreviousRelease ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity result = resourceImportService . getPreviousRelease ( resourcesInGroupNotOrderedByRelease , ch . puzzle . itc . mobiliar . business . resourcegroup . control . ResourceImportServic... | org . junit . Assert . assertNull ( result ) |
testGetPasswordEncoder ( ) { config = new org . pentaho . platform . config . SpringSecurityHibernateConfig ( document ) ; org . dom4j . Node node = mock ( org . dom4j . Node . class ) ; when ( node . getText ( ) ) . thenReturn ( org . pentaho . platform . repository2 . userroledao . jackrabbit . security . DefaultPent... | org . junit . Assert . assertTrue ( ( passwordEncoder instanceof org . pentaho . platform . repository2 . userroledao . jackrabbit . security . DefaultPentahoPasswordEncoder ) ) |
testSearch ( ) { info . smart_tools . smartactors . base . interfaces . iaction . IAction < info . smart_tools . smartactors . iobject . iobject . IObject [ ] > callback = mock ( info . smart_tools . smartactors . base . interfaces . iaction . IAction . class ) ; when ( message . getCallback ( ) ) . thenReturn ( callba... | org . junit . Assert . assertEquals ( 2 , results . getValue ( ) . length ) |
testGetTooltip ( ) { java . lang . String expResult = "Config<sp>changed<sp>since<sp>last<sp>build" ; java . lang . String result = sut . getTooltip ( ) ; "<AssertPlaceHolder>" ; } getTooltip ( ) { return hudson . plugins . jobConfigHistory . Messages . JobConfigBadgeAction_ToolTip ( ) ; } | org . junit . Assert . assertEquals ( expResult , result ) |
textSummaryNullTest ( ) { java . lang . String text = org . oscarehr . e2e . model . export . body . FamilyHistoryModelTest . nullFamilyHistoryModel . getTextSummary ( ) ; "<AssertPlaceHolder>" ; } getTextSummary ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( familyHistory . getFami... | org . junit . Assert . assertNotNull ( text ) |
testSafeName ( ) { java . lang . String safeName = io . prometheus . jmx . JmxCollector . safeName ( input ) ; "<AssertPlaceHolder>" ; } safeName ( java . lang . String ) { if ( name == null ) { return null ; } boolean prevCharIsUnderscore = false ; java . lang . StringBuilder safeNameBuilder = new java . lang . String... | org . junit . Assert . assertEquals ( expected , safeName ) |
testVanillaCSV ( ) { java . lang . String [ ] expectedFileContents = new java . lang . String [ ] { "1,2,3,4" , "5,6,7,8" , "9,10,11" , "12,13,14" } ; java . lang . String vanillaCSVFile = tmpDir . copyResourceFileName ( "vanilla.csv" ) ; java . io . File vanillaFile = new java . io . File ( vanillaCSVFile ) ; java . i... | org . junit . Assert . assertEquals ( expectedFileContents [ i ] , fileContents . get ( i ) ) |
testparseValueForDBUserId ( ) { java . lang . Long expected = new java . lang . Long ( 123 ) ; java . lang . Object objectValue = org . sagebionetworks . table . cluster . SQLUtils . parseValueForDB ( ColumnType . USERID , "123" ) ; "<AssertPlaceHolder>" ; } parseValueForDB ( org . sagebionetworks . repo . model . tabl... | org . junit . Assert . assertEquals ( expected , objectValue ) |
indexExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Sequence ( Property ( "foo" ) , Index ( 3 ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "foo[3]" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( s... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
removeFromRowKeyTest ( ) { "<AssertPlaceHolder>" ; } removeFromRowKey ( K ) { return persistence . deleteByKey ( rowKey , baseClass ) ; } | org . junit . Assert . assertTrue ( dao . removeFromRowKey ( new java . lang . Long ( 2 ) ) ) |
testIsCachedWithNoConfiguration ( ) { "<AssertPlaceHolder>" ; } isCached ( org . xwiki . model . reference . DocumentReference ) { if ( ( documentReference != null ) && ( isFarmEnabled ( ) ) ) { if ( isCachedInFarm ( documentReference ) ) { return true ; } return isCachedInWiki ( documentReference ) ; } return false ; ... | org . junit . Assert . assertFalse ( this . configuration . isCached ( this . documentReference ) ) |
testEnumWithDefault ( ) { org . apache . avro . List < java . lang . String > symbols = org . apache . avro . Arrays . asList ( "a" , "b" ) ; java . lang . String enumDefault = "a" ; org . apache . avro . Schema expected = org . apache . avro . Schema . createEnum ( "myenum" , null , null , symbols , enumDefault ) ; ex... | org . junit . Assert . assertEquals ( expected , schema ) |
shouldBeAbleToInjectContext ( ) { javax . naming . Context context = new javax . naming . InitialContext ( ) ; org . jboss . arquillian . container . test . impl . enricher . resource . InitialContextProviderTestCase . ContextClass test = execute ( org . jboss . arquillian . container . test . impl . enricher . resourc... | org . junit . Assert . assertEquals ( context , test . context ) |
testInvalidPEMWithHeaderAndFooter ( ) { java . lang . String pem = "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 3 + ( ( ( ( ( ( ( ( ( ( ( "MIICOjCCAaOgAwIBAgIJANXi/oWxvJNzMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYTAlVTMQ0w" + "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUb... | org . junit . Assert . assertTrue ( se . getMessage ( ) . contains ( "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 1 ) ) |
testEquals ( ) { com . mongodb . DBObject actual = parse ( "number<sp>=<sp>?" ) . getQuery ( ) ; com . mongodb . DBObject expected = com . mongodb . QueryBuilder . start ( "number" ) . is ( com . gigaspaces . persistency . qa . utest . parser . SQL2MongoBaseVisitorTest . PARAMETER_PLACEHOLDER ) . get ( ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( expected , actual ) |
testTouches ( ) { com . vividsolutions . jts . geom . Coordinate [ ] coords = new com . vividsolutions . jts . geom . Coordinate [ ] { new com . vividsolutions . jts . geom . Coordinate ( 0 , 0 ) , new com . vividsolutions . jts . geom . Coordinate ( 10 , 10 ) } ; com . vividsolutions . jts . geom . LineString lineStri... | org . junit . Assert . assertEquals ( new com . vividsolutions . jts . geom . Envelope ( 0 , 10 , 0 , 10 ) , env ) |
testSetSeriesKeys ( ) { org . jfree . data . category . DefaultIntervalCategoryDataset empty = new org . jfree . data . category . DefaultIntervalCategoryDataset ( new double [ 0 ] [ 0 ] , new double [ 0 ] [ 0 ] ) ; boolean pass = true ; try { empty . setSeriesKeys ( new java . lang . String [ 0 ] ) ; } catch ( java . ... | org . junit . Assert . assertTrue ( pass ) |
testGetAttributeValueListsNoAuthorizedNamespaces ( ) { java . util . Set < java . lang . String > authorizedNamespaces = new java . util . HashSet ( ) ; when ( namespaceSecurityHelper . getAuthorizedNamespaces ( NamespacePermissionEnum . READ ) ) . thenReturn ( authorizedNamespaces ) ; org . finra . herd . model . api ... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . AttributeValueListKeys ( ) , result ) |
testRetryable ( ) { com . amazonaws . AbortedException ae1 = new com . amazonaws . AbortedException ( ) ; "<AssertPlaceHolder>" ; } isRetryable ( ) { return false ; } | org . junit . Assert . assertFalse ( ae1 . isRetryable ( ) ) |
test_clients__client_type__stats_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 . GE... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
whenDifferentSessionsAndRequests_thenAlwaysSingleApplicationScopedBean ( ) { org . springframework . mock . web . MockHttpSession session1 = new org . springframework . mock . web . MockHttpSession ( ) ; org . springframework . mock . web . MockHttpSession session2 = new org . springframework . mock . web . MockHttpSes... | org . junit . Assert . assertEquals ( applicationScopedServiceInstanceNumber1 , applicationScopedServiceInstanceNumber2 ) |
testGetMessage ( ) { org . openscience . cdk . inchi . InChIToStructure parser = new org . openscience . cdk . inchi . InChIToStructure ( "InChI=1S/CH5/h1H4" , org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; parser . getAtomContainer ( ) ; java . lang . String message = parser . getMessage ( ) ... | org . junit . Assert . assertNotNull ( message ) |
testDecomposeQuery_2DSpatialOneIndexFilter ( ) { final int LATITUDE_BITS = 31 ; final int LONGITUDE_BITS = 31 ; final org . locationtech . geowave . core . index . sfc . SFCDimensionDefinition [ ] SPATIAL_DIMENSIONS = new org . locationtech . geowave . core . index . sfc . SFCDimensionDefinition [ ] { new org . locatio... | org . junit . Assert . assertEquals ( 1 , rangeDecomposition . getRanges ( ) . length ) |
testContainerScopeListNoOp ( ) { com . facebook . buck . rules . keys . hasher . CountingRuleKeyHasher < com . google . common . hash . HashCode > countHasher = newCountHasher ( ) ; com . facebook . buck . rules . keys . RuleKeyScopedHasher containerHasher = new com . facebook . buck . rules . keys . DefaultRuleKeyScop... | org . junit . Assert . assertEquals ( newGuavaHasher ( ) . hash ( ) , countHasher . hash ( ) ) |
shouldNotStartDisabledSplashScreens ( ) { java . util . List < org . uberfire . client . mvp . SplashScreenActivity > splashScreenList = new java . util . ArrayList < org . uberfire . client . mvp . SplashScreenActivity > ( ) ; org . uberfire . client . mvp . SplashScreenActivity expectedSplashScreenActivity = makeSpla... | org . junit . Assert . assertNull ( splashScreenActivity ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . asset . entry . rel . model . AssetEntryAssetCategoryRel > assetEntryAssetCategoryRels = ... | org . junit . Assert . assertTrue ( assetEntryAssetCategoryRels . isEmpty ( ) ) |
testCopyOfIterator ( ) { java . lang . Iterable < java . lang . String > iterable = asSet ( "Hello" ) ; "<AssertPlaceHolder>" ; } copyOf ( java . util . Collection ) { return new org . kocakosm . pitaya . collection . ImmutableSet < E > ( new java . util . LinkedHashSet < E > ( c ) ) ; } | org . junit . Assert . assertEquals ( iterable , org . kocakosm . pitaya . collection . ImmutableSet . copyOf ( iterable . iterator ( ) ) ) |
TestSameInputStream ( ) { org . apache . nifi . minifi . bootstrap . configuration . differentiators . interfaces . Differentiator < java . io . InputStream > differentiator = org . apache . nifi . minifi . bootstrap . configuration . differentiators . WholeConfigDifferentiator . getInputStreamDifferentiator ( ) ; diff... | org . junit . Assert . assertFalse ( differentiator . isNew ( fileInputStream ) ) |
testProcess_noConnection ( ) { net . roboconf . agent . monitoring . internal . nagios . NagiosHandler handler = new net . roboconf . agent . monitoring . internal . nagios . NagiosHandler ( ) ; handler . setAgentId ( net . roboconf . agent . monitoring . internal . nagios . NagiosHandlerTest . APP_NAME , net . robocon... | org . junit . Assert . assertNull ( handler . process ( ) ) |
testBeansProjectDescriptionWriterWithXMLConfigsOnly ( ) { beansProject . addConfig ( "basic-bean-config.xml" , IBeansConfig . Type . MANUAL ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ; org . springframework . ide . eclipse . core . io . xml . XMLWriter writer = new org . spring... | org . junit . Assert . assertTrue ( matcher . find ( ) ) |
testMutableAdd_double_ExecutorService ( ) { jsat . linear . GenericMatrixTest . TestImp ApTwo = new jsat . linear . GenericMatrixTest . TestImp ( new double [ ] [ ] { new double [ ] { 1 + 2 , 5 + 2 , 4 + 2 , 8 + 2 , 9 + 2 } , new double [ ] { 1 + 2 , 5 + 2 , 7 + 2 , 3 + 2 , 7 + 2 } , new double [ ] { 0 + 2 , 3 + 2 , 8 ... | org . junit . Assert . assertEquals ( ApTwo , aCopy ) |
testGetState ( ) { com . natpryce . piazza . InvestigationViewState viewState = new com . natpryce . piazza . InvestigationViewState ( ResponsibilityEntry . State . TAKEN , com . natpryce . piazza . InvestigationViewStateTest . NAME , null ) ; jetbrains . buildServer . responsibility . ResponsibilityEntry . State descr... | org . junit . Assert . assertEquals ( ResponsibilityEntry . State . TAKEN , description ) |
testBuild ( ) { org . lnu . is . domain . person . address . PersonAddress context = new org . lnu . is . domain . person . address . PersonAddress ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonAddress<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; or... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGetAccessTokenExtractor_1 ( ) { org . jinstagram . auth . InstagramApi fixture = new org . jinstagram . auth . InstagramApi ( ) ; org . jinstagram . auth . AccessTokenExtractor result = fixture . getAccessTokenExtractor ( ) ; "<AssertPlaceHolder>" ; } getAccessTokenExtractor ( ) { return new org . jinstagram . auth... | org . junit . Assert . assertNotNull ( result ) |
isTwoOrIdsWorking ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>(r.id<sp>=<sp>1)<sp>or<sp>(r.id<sp>=<sp>3)" ; final java . util . List < com . uaihebert . model . test . RegularEntityOne > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . mode... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 2 ) ) |
testPriorityLevel24 ( ) { int n = jannovar . common . VariantType . priorityLevel ( VariantType . INTERGENIC ) ; "<AssertPlaceHolder>" ; } priorityLevel ( jannovar . common . VariantType ) { switch ( vt ) { case FS_DELETION : case FS_INSERTION : case NON_FS_SUBSTITUTION : case FS_SUBSTITUTION : case MISSENSE : case NON... | org . junit . Assert . assertEquals ( 9 , n ) |
testCreateProblemSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . DocumentBuilder < org . openhealthtools . mdht . uml . cda . ccd . ContinuityOfCareDocument > clinicalDocumentBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createContinuityOfCareDocument... | org . junit . Assert . assertNotNull ( section ) |
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; kg . apc . jmeter . vizualizers . PerfMonGui instance = new kg . apc . jmeter . vizualizers . PerfMonGui ( ) ; java . lang . String result = instance . getWikiPage ( ) ; "<AssertPlaceHolder>" ; } getWikiPage ( ) { return "ResponseCodesPerSecond" ; } | org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) ) |
fetchModeSelectHql ( ) { persistBooks ( ( ) -> new com . example . entities . BookFetchModeSelect ( ) ) ; System . out . println ( "FetchMode.SELECT<sp>HQL" ) ; java . util . List books = getCurrentSession ( ) . createQuery ( "select<sp>b<sp>from<sp>BookFetchModeSelect<sp>b" ) . list ( ) ; "<AssertPlaceHolder>" ; } get... | org . junit . Assert . assertEquals ( 4 , books . size ( ) ) |
shouldReturnValidationResultForString ( ) { final uk . gov . gchq . gaffer . commonutil . iterable . AlwaysValid < java . lang . String > validator = new uk . gov . gchq . gaffer . commonutil . iterable . AlwaysValid ( ) ; final uk . gov . gchq . koryphe . ValidationResult result = validator . validateWithValidationRes... | org . junit . Assert . assertTrue ( result . isValid ( ) ) |
testCreateMetaDataRequest ( ) { org . kaaproject . kaa . client . KaaClientProperties properties = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . KaaClientProperties . class ) ; org . kaaproject . kaa . client . persistence . KaaClientState state = org . mockito . Mockito . mock ( org . kaaproject .... | org . junit . Assert . assertEquals ( new java . lang . Long ( 5 ) , request . getTimeout ( ) ) |
specificValueTest ( ) { java . lang . String specificJson = "{\"value\":<sp>\"abcdnefg\"}" ; com . ctrip . soa . caravan . util . serializer . ssjson . TestEntity testEntity = SSJsonSerializer . DEFAULT . deserialize ( new java . io . ByteArrayInputStream ( specificJson . getBytes ( ) ) , com . ctrip . soa . caravan .... | org . junit . Assert . assertNotNull ( testEntity . getValue ( ) ) |
testPostEntities ( ) { org . apache . hadoop . yarn . client . api . impl . TestTimelineClient . mockEntityClientResponse ( spyTimelineWriter , ClientResponse . Status . OK , false , false ) ; try { org . apache . hadoop . yarn . api . records . timeline . TimelinePutResponse response = client . putEntities ( org . apa... | org . junit . Assert . assertEquals ( 0 , response . getErrors ( ) . size ( ) ) |
given_TwoObjectOfTheSameClass_when_CreatingImmutableVersionBasedOnTheSameInterface_then_CreatingImmutableVersionCreatesOneClassOnly ( ) { com . javax0 . immutator . ImmutableTest . MutableClass testObject1 = new com . javax0 . immutator . ImmutableTest . MutableClass ( ) ; com . javax0 . immutator . ImmutableTest . Mut... | org . junit . Assert . assertEquals ( immutable1 . getClass ( ) , immutable2 . getClass ( ) ) |
testReturnTypeExceptionWithTrue ( ) { boolean expected = true ; boolean result = org . slieb . throwables . LongPredicateWithThrowable . castLongPredicateWithThrowable ( ( v1 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expected ) . test ( 0 ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( expected , result ) |
testBindWithDoubleQuote ( ) { org . apache . directory . ldap . client . api . LdapConnection connection = new org . apache . directory . ldap . client . api . LdapNetworkConnection ( org . apache . directory . api . util . Network . LOOPBACK_HOSTNAME , getLdapServer ( ) . getPort ( ) ) ; connection . bind ( "uid=\"adm... | org . junit . Assert . assertTrue ( connection . isAuthenticated ( ) ) |
accountTest_1 ( ) { org . ethereum . facade . Repository repository = org . ethereum . manager . WorldManager . getInstance ( ) . getRepository ( ) ; org . ethereum . crypto . ECKey cowKey = org . ethereum . crypto . ECKey . fromPrivate ( org . ethereum . crypto . HashUtil . sha3 ( "cow" . getBytes ( ) ) ) ; repository... | org . junit . Assert . assertEquals ( BigInteger . TEN , walletBalance ) |
testGetRedirectURLNull ( ) { org . easymock . EasyMock . expect ( druidCoordinator . getCurrentLeader ( ) ) . andReturn ( null ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( druidCoordinator ) ; java . net . URL url = coordinatorRedirectInfo . getRedirectURL ( "query" , "/request" ) ; "<AssertPlaceHolder>" ; o... | org . junit . Assert . assertNull ( url ) |
testSimpleWriteReadSignBySign ( ) { org . apache . olingo . server . core . serializer . utils . CircleStreamBuffer csb = new org . apache . olingo . server . core . serializer . utils . CircleStreamBuffer ( ) ; java . io . OutputStream write = csb . getOutputStream ( ) ; byte [ ] writeData = "Test" . getBytes ( org . ... | org . junit . Assert . assertEquals ( "Test" , result ) |
testNormalizeSelector2 ( ) { java . lang . String selector = "<sp>h1<sp>,<sp>div<sp>" ; java . lang . String expResult = "h1,div" ; java . lang . String result = org . netbeans . modules . web . inspect . CSSUtils . normalizeSelector ( selector ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testCreateAndRetrieve ( ) { com . jverstry . Item . MilliTimeItem retr = myService . createAndRetrieve ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( retr ) |
deveObterIcmsSN201ComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpo... | org . junit . Assert . assertEquals ( icmsSetado , icms . getIcmssn201 ( ) ) |
testBasicTypes ( ) { org . teiid . adminapi . impl . ModelMetaData mmd = new org . teiid . adminapi . impl . ModelMetaData ( ) ; mmd . setName ( "m" ) ; mmd . addSourceMapping ( "x3" , "x3" , null ) ; org . teiid . metadata . MetadataStore ms = org . teiid . query . unittest . RealMetadataFactory . exampleBQTStore ( ) ... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
shouldInvokeBackendWhenPostWithStringParamAndInputStreamParam ( ) { org . apache . http . HttpResponse expectedResponse = mock ( org . ektorp . http . HttpResponse . class , new org . mockito . internal . stubbing . answers . ThrowsException ( new java . lang . UnsupportedOperationException ( ) ) ) ; doReturn ( "mock<s... | org . junit . Assert . assertNotNull ( androidHttpResponse ) |
invoke_exists ( ) { cache . put ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . VALUE ) ; boolean f = cache . invoke ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , n... | org . junit . Assert . assertTrue ( f ) |
testSimpleEjbModule ( ) { final java . util . List < org . apache . maven . plugins . ear . EarModule > modules = new java . util . ArrayList < org . apache . maven . plugins . ear . EarModule > ( ) ; final org . apache . maven . plugins . ear . EarModule module = new org . apache . maven . plugins . ear . EjbModule ( ... | org . junit . Assert . assertEquals ( "foo-1.0.jar" , archiver . generateClassPathEntry ( "" ) ) |
getHost ( ) { "<AssertPlaceHolder>" ; } getHost ( ) { return host ; } | org . junit . Assert . assertSame ( this . host , this . context . getHost ( ) ) |
CommandWithDoubleQuoteTest ( ) { expected . clear ( ) ; expected . add ( "echo" ) ; expected . add ( "Hello!<sp>World" ) ; result = commandline . translateCommandline ( "echo<sp>\"Hello!<sp>World\"" ) ; "<AssertPlaceHolder>" ; } translateCommandline ( java . lang . String ) { if ( ( toProcess == null ) || ( ( toProcess... | org . junit . Assert . assertEquals ( expected , result ) |
testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder2 ( ) { org . antlr . v4 . tool . LexerGrammar g = new org . antlr . v4 . tool . LexerGrammar ( ( "lexer<sp>grammar<sp>T;\n" + ( ( "A<sp>:<sp>\'a\';\n" + "B<sp>:<sp>\'b\';\n" ) + "C<sp>:<sp>\'c\';\n" ) ) ) ; java . lang . String input = "aa" ; org . antlr ... | org . junit . Assert . assertEquals ( expecting , result ) |
testDifferentOrders ( ) { edu . ucla . sspace . graph . isomorphism . Graph < edu . ucla . sspace . graph . isomorphism . Edge > g1 = new edu . ucla . sspace . graph . isomorphism . SparseUndirectedGraph ( ) ; g1 . add ( 0 ) ; edu . ucla . sspace . graph . isomorphism . Graph < edu . ucla . sspace . graph . isomorphism... | org . junit . Assert . assertFalse ( isoTest . areIsomorphic ( g1 , g2 ) ) |
whenValidateInputUsingScanner_thenValidated ( ) { final java . lang . String input = "2000" ; final java . io . InputStream stdin = System . in ; java . lang . System . setIn ( new java . io . ByteArrayInputStream ( input . getBytes ( ) ) ) ; final java . util . Scanner scanner = new java . util . Scanner ( System . in... | org . junit . Assert . assertTrue ( isIntInput ) |
testBackupDriverCreateTopLevelBackupDest ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "create" , "full" , "hdfs://localhost:1020" , "-t" , "t1" } ; int result = org . apache . hadoop . util . ToolRunner . run ( conf , new org . apache . hadoop . hbase . backup . BackupDriver ( ) , args ) ; "<Ass... | org . junit . Assert . assertEquals ( 1 , result ) |
testClassnameConfig ( ) { final com . inspiresoftware . lib . dto . geda . assembler . MethodSynthesizerProxy proxy = new com . inspiresoftware . lib . dto . geda . assembler . MethodSynthesizerProxy ( this . getClass ( ) . getClassLoader ( ) ) ; proxy . configure ( "synthesizerImpl" , com . inspiresoftware . lib . dto... | org . junit . Assert . assertTrue ( ( syn instanceof com . inspiresoftware . lib . dto . geda . assembler . extension . impl . JavassistMethodSynthesizer ) ) |
protocolleren ( ) { long aantalBerichtenVoor = jdbcTemplate . queryForObject ( "select<sp>count(id)<sp>from<sp>prot.levsaantek" , nl . bzk . brp . delivery . bevraging . gba . ws . Long . class ) ; request ( nl . bzk . brp . delivery . bevraging . gba . ws . Vragen . adresvraag ( 10110 , nl . bzk . brp . delivery . bev... | org . junit . Assert . assertEquals ( ( aantalBerichtenVoor + 1 ) , aantalBerichtenNa ) |
testSort1 ( ) { java . util . List < java . net . InetSocketAddress > expected = java . util . Arrays . asList ( io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS1 , io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS2 , io . netty . resolver . dns . NameServerComparatorTest . IPV6AD... | org . junit . Assert . assertEquals ( expected , addresses ) |
checkEqualKeysUsage ( ) { info . smart_tools . smartactors . scope . iscope . IScope scope = new info . smart_tools . smartactors . scope . recursive_scope . Scope ( null ) ; java . lang . Integer number1 = 1 ; java . lang . Integer number2 = 2 ; scope . setValue ( "number" , number1 ) ; scope . setValue ( "number" , n... | org . junit . Assert . assertEquals ( scope . getValue ( "number" ) , number2 ) |
testGetItems ( ) { when ( element . getName ( ) ) . thenReturn ( "MENU-01" ) ; java . util . List < mmarquee . automation . AutomationElement > collection = new java . util . ArrayList ( ) ; collection . add ( new mmarquee . automation . AutomationElement ( elem ) ) ; when ( element . findAll ( any ( ) , any ( ) ) ) . ... | org . junit . Assert . assertTrue ( ( ( items . size ( ) ) == 1 ) ) |
testParseLong1 ( ) { java . lang . String value = "9223372036854775807" ; byte [ ] bytes = value . getBytes ( ) ; long result = org . apache . tomcat . util . buf . Ascii . parseLong ( bytes , 0 , bytes . length ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl .... | org . junit . Assert . assertEquals ( value , java . lang . String . valueOf ( result ) ) |
testGetDictionaryByVersion ( ) { cfml . dictionary . DictionaryManager . initDictionaries ( ) ; cfml . dictionary . SyntaxDictionary fun = cfml . dictionary . DictionaryManager . getDictionaryByVersion ( fPrefs . getCFDictionary ( ) ) ; System . err . println ( fun . dictionaryURL ) ; java . util . Set wee = fun . getA... | org . junit . Assert . assertNotNull ( fun ) |
testIsSatisfiedUnexpectedErrorInByteSan ( ) { org . osgi . framework . Bundle bundle = mock ( org . osgi . framework . Bundle . class ) ; java . util . Map < java . security . cert . X509Certificate , java . util . List < java . security . cert . X509Certificate > > trustedCerts = new java . util . HashMap ( ) ; java .... | org . junit . Assert . assertThat ( satisfied , org . hamcrest . core . Is . is ( true ) ) |
testLessThanRecordThresholdCount ( ) { int thresholdVolume = 5 ; int uploadCheckPeriod = 2000 ; org . kaaproject . kaa . client . logging . LogStorageStatus logStorageStatus = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . logging . LogStorageStatus . class ) ; org . mockito . Mockito . when ( logSt... | org . junit . Assert . assertEquals ( strategy . checkUploadNeeded ( logStorageStatus ) , LogUploadStrategyDecision . NOOP ) |
shouldBoardSizeSpecify_whenGameStart ( ) { board = new com . codenjoy . dojo . minesweeper . model . Minesweeper ( v ( 10 ) , v ( com . codenjoy . dojo . minesweeper . model . SapperTheHeroTest . MINES_COUNT ) , v ( com . codenjoy . dojo . minesweeper . model . SapperTheHeroTest . CHARGE_COUNT ) , NO_MINES ) ; "<Assert... | org . junit . Assert . assertEquals ( 10 , board . size ( ) ) |
testDefeasibleEntailmentWithStrictOverride ( ) { org . kie . api . runtime . KieSession kSession = getSession ( "org/drools/compiler/beliefsystem/defeasible/strictOverride.drl" ) ; kSession . fireAllRules ( ) ; org . drools . core . common . TruthMaintenanceSystem tms = ( ( org . drools . core . common . NamedEntryPoin... | org . junit . Assert . assertEquals ( 5 , kSession . getObjects ( ) . size ( ) ) |
failCase3 ( ) { org . openstack . atlas . api . validation . verifiers . VerifierResult result = hostNameVerifier . verify ( "**" ) ; "<AssertPlaceHolder>" ; } passed ( ) { return passed ; } | org . junit . Assert . assertFalse ( result . passed ( ) ) |
equalityNull ( ) { canvas = new com . opera . core . systems . model . Canvas ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ( obj == null ) || ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) ) { return false ; } com . opera . core . systems . arguments . ... | org . junit . Assert . assertFalse ( canvas . equals ( null ) ) |
testAdd ( ) { org . nd4j . linalg . api . ops . executioner . OpExecutioner opExecutioner = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) ; org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . ones ( 5 ) ; org . nd4j . linalg . api . ndarray . INDArray xDup = x . dup ( )... | org . junit . Assert . assertEquals ( getFailureMessage ( ) , solution , x ) |
injectComposedMetadataKeyIdInstanceInOperation ( ) { org . mule . test . metadata . extension . LocationKey payload = ( ( org . mule . test . metadata . extension . LocationKey ) ( flowRunner ( org . mule . test . module . extension . metadata . SIMPLE_MULTILEVEL_KEY_RESOLVER ) . run ( ) . getMessage ( ) . getPayload (... | org . junit . Assert . assertThat ( payload , org . hamcrest . core . Is . is ( expected ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.