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 . millisecondsToHumanDateWithSeconds ( baseTimestamp ) ) ; rawQuery . setStartTime ( org . apache . eagle . common . DateTimeUtil . millisecondsToHumanDateWithSeconds ( baseTimestamp ) ) ; rawQuery . setEndTime ( org . apache . eagle . common . DateTimeUtil . millisecondsToHumanDateWithMilliseconds ( ( ( baseTimestamp ) + 2000 ) ) ) ; rawQuery . setPageSize ( 1000 ) ; org . apache . eagle . storage . operation . CompiledQuery query = new org . apache . eagle . storage . operation . CompiledQuery ( rawQuery ) ; org . apache . eagle . storage . result . QueryResult < org . apache . eagle . log . entity . test . TestTimeSeriesAPIEntity > result = org . apache . eagle . storage . hbase . spi . TestHBaseStorage . storage . query ( query , org . apache . eagle . storage . hbase . spi . TestHBaseStorage . entityDefinition ) ; "<AssertPlaceHolder>" ; } query ( org . apache . eagle . storage . operation . CompiledQuery , org . apache . eagle . log . entity . meta . EntityDefinition ) { org . apache . eagle . storage . result . QueryResult < E > result = new org . apache . eagle . storage . result . QueryResult < E > ( ) ; try { org . apache . eagle . query . GenericQuery reader = org . apache . eagle . storage . hbase . query . GenericQueryBuilder . select ( query . getSearchCondition ( ) . getOutputFields ( ) ) . from ( query . getServiceName ( ) , query . getRawQuery ( ) . getMetricName ( ) ) . where ( query . getSearchCondition ( ) ) . groupBy ( query . isHasAgg ( ) , query . getGroupByFields ( ) , query . getAggregateFunctionTypes ( ) , query . getAggregateFields ( ) ) . timeSeries ( query . getRawQuery ( ) . isTimeSeries ( ) , query . getRawQuery ( ) . getIntervalmin ( ) ) . treeAgg ( query . getRawQuery ( ) . isTreeAgg ( ) ) . orderBy ( query . getSortOptions ( ) , query . getSortFunctions ( ) , query . getSortFields ( ) ) . top ( query . getRawQuery ( ) . getTop ( ) ) . parallel ( query . getRawQuery ( ) . getParallel ( ) ) . build ( ) ; java . util . List < E > entities = reader . result ( ) ; result . setData ( entities ) ; result . setFirstTimestamp ( reader . getFirstTimeStamp ( ) ) ; result . setLastTimestamp ( reader . getLastTimestamp ( ) ) ; result . setSize ( entities . size ( ) ) ; if ( ! ( query . isHasAgg ( ) ) ) { result . setEntityType ( ( ( java . lang . Class < E > ) ( entityDefinition . getEntityClass ( ) ) ) ) ; } else { result . setEntityType ( ( ( java . lang . Class < E > ) ( java . util . Map . class ) ) ) ; } result . setSuccess ( true ) ; } catch ( java . lang . Exception e ) { org . apache . eagle . storage . hbase . HBaseStorage . LOG . error ( e . getMessage ( ) , e ) ; throw new java . io . IOException ( e ) ; } return result ; } | 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 . apache . flink . api . java . ClosureCleaner . clean ( map , true ) ; int result = map . map ( 3 ) ; "<AssertPlaceHolder>" ; } map ( org . apache . flink . api . java . tuple . Tuple2 ) { return new org . apache . flink . api . java . tuple . Tuple2 < org . apache . hadoop . io . Text , org . apache . hadoop . io . IntWritable > ( new org . apache . hadoop . io . Text ( value . f0 ) , new org . apache . hadoop . io . IntWritable ( value . f1 ) ) ; } | 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 . GET ) ; request . setEndpoint ( "suppression/spam_report/{email}" ) ; com . sendgrid . Response response = sg . api ( request ) ; "<AssertPlaceHolder>" ; } api ( com . sendgrid . Request ) { com . sendgrid . Request req = new com . sendgrid . Request ( ) ; req . setMethod ( request . getMethod ( ) ) ; req . setBaseUri ( this . host ) ; req . setEndpoint ( ( ( ( "/" + ( version ) ) + "/" ) + ( request . getEndpoint ( ) ) ) ) ; req . setBody ( request . getBody ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > header : this . requestHeaders . entrySet ( ) ) { req . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > queryParam : request . getQueryParams ( ) . entrySet ( ) ) { req . addQueryParam ( queryParam . getKey ( ) , queryParam . getValue ( ) ) ; } return makeCall ( req ) ; } | 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 . getRandomTransactionHash ( ) ; tipsVM . addTipHash ( hash ) ; if ( ( i % 2 ) == 1 ) { tipsVM . setSolid ( hash ) ; } } "<AssertPlaceHolder>" ; } size ( ) { return self . set . size ( ) ; } | 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 , now ) ; "<AssertPlaceHolder>" ; } getPercentile ( int , java . util . ArrayList ) { if ( ( values == null ) || ( ( values . size ( ) ) == 0 ) ) { return 0.0 ; } java . util . Collections . sort ( values ) ; java . lang . Double [ ] mySampleSet = values . toArray ( new java . lang . Double [ values . size ( ) ] ) ; double rank = ( ( ( ( double ) ( requestedPercentile ) ) / 100.0 ) * ( ( values . size ( ) ) - 1 ) ) + 1 ; double returnPercentile ; int integerRank = ( ( int ) ( rank ) ) ; double remainder = rank - integerRank ; if ( remainder > 0 ) { double valueAtRankIr = mySampleSet [ ( integerRank - 1 ) ] ; double valueAtRankIrPlusOne = mySampleSet [ integerRank ] ; returnPercentile = ( remainder * ( valueAtRankIrPlusOne - valueAtRankIr ) ) + valueAtRankIr ; } else { returnPercentile = mySampleSet [ ( integerRank - 1 ) ] ; } return returnPercentile ; } | 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 . server . common . alarm . Alarm > alarms = new java . util . ArrayList < cern . c2mon . server . common . alarm . Alarm > ( ) ; cern . c2mon . server . common . alarm . Alarm alarm1 = cern . c2mon . server . test . CacheObjectCreation . createTestAlarm1 ( ) ; cern . c2mon . server . common . alarm . Alarm alarm2 = cern . c2mon . server . test . CacheObjectCreation . createTestAlarm3 ( ) ; alarms . add ( alarm1 ) ; alarms . add ( alarm2 ) ; cern . c2mon . server . common . alarm . TagWithAlarms tagWithAlarms = new cern . c2mon . server . common . alarm . TagWithAlarmsImpl ( tag , alarms ) ; org . easymock . EasyMock . expect ( this . tagFacadeGateway . getTagWithAlarms ( tag . getId ( ) ) ) . andReturn ( tagWithAlarms ) ; java . lang . Thread listenerThread = startListenerThreadForTransferTag ( tag ) ; org . easymock . EasyMock . replay ( ) ; tagValuePublisher . notifyOnConfigurationUpdate ( tag . getId ( ) ) ; listenerThread . join ( 1000 ) ; synchronized ( updateLock ) { "<AssertPlaceHolder>" ; } java . lang . Thread . sleep ( 1000 ) ; listenerThread = startListenerThreadForTransferTag ( tag ) ; listenerThread . join ( 1000 ) ; compareTagAndUpdate ( tag , alarms , this . updateFromConfig ) ; org . easymock . EasyMock . verify ( ) ; } getId ( ) { return id ; } | 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 . add ( "Annotation" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; } | 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>" ; } getConfigDescriptionURI ( ) { return this . configDescriptionURI ; } | 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 _amImageEntryId ; } | 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 . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inhandler ) ; org . apache . cxf . ws . security . wss4j . StaxCryptoCoverageChecker checker = new org . apache . cxf . ws . security . wss4j . StaxCryptoCoverageChecker ( ) ; checker . setSignBody ( false ) ; service . getInInterceptors ( ) . add ( checker ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( WSSConstants . TIMESTAMP ) ; properties . setActions ( actions ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; try { echo . echo ( "test" ) ; org . junit . Assert . fail ( "Failure<sp>expected<sp>as<sp>Timestamp<sp>isn't<sp>signed" ) ; } catch ( org . apache . cxf . ws . security . wss4j . javax ex ) { } checker . setSignTimestamp ( false ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; } | 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" ) ; drugInfo . setDescription ( "Second<sp>Test<sp>DrugInfo" ) ; drugInfo . setCreator ( org . openmrs . api . context . Context . getUserContext ( ) . getAuthenticatedUser ( ) ) ; drugInfo . setDateCreated ( new java . util . Date ( ) ) ; drugInfo . setUuid ( "68547121-1b70-465e-99ee-c9dfd95e7d30" ) ; drugInfo . setRetired ( Boolean . FALSE ) ; s . deleteDrugInfo ( drugInfo ) ; org . raxa . module . raxacore . DrugInfo result = s . getDrugInfo ( 2 ) ; "<AssertPlaceHolder>" ; } getDrugInfo ( java . lang . Integer ) { return ( ( org . raxa . module . raxacore . DrugInfo ) ( sessionFactory . getCurrentSession ( ) . get ( org . raxa . module . raxacore . DrugInfo . class , drugInfoId ) ) ) ; } | 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 ( ) ; } } ; } } ; "<AssertPlaceHolder>" ; } methodToBeMocked ( ) { return true ; } | 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 ) . validateBusinessKeyUniqueness ( any ( org . oscm . domobjects . UdaDefinition . class ) ) ; try { uda . updateDefinition ( voDef , supplier ) ; } finally { verify ( ctx , times ( 1 ) ) . setRollbackOnly ( ) ; "<AssertPlaceHolder>" ; } } getDefaultValue ( ) { return defaultValue ; } | 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>" ; final org . openrdf . model . Value ignorableURI = edu . kit . aifb . cumulus . TestUtils . buildResource ( ( ignorableNamespace + ( edu . kit . aifb . cumulus . TestUtils . randomString ( ) ) ) ) ; _cut . removeValue ( ignorableURI , _isPredicate ) ; verify ( _decoratee ) . removeValue ( ignorableURI , _isPredicate ) ; } } contains ( java . lang . String ) { for ( final java . lang . String domain : _domains ) { if ( domain . equals ( prefix ) ) { return true ; } } return false ; } | 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 ( ) . setDscps ( com . google . common . collect . ImmutableList . of ( 2 ) ) . build ( ) ; "<AssertPlaceHolder>" ; } intersect ( org . batfish . datamodel . HeaderSpace , org . batfish . datamodel . HeaderSpace ) { checkArgument ( org . batfish . datamodel . IntersectHeaderSpaces . isUnconstrained ( h1 . getSrcOrDstIps ( ) ) ) ; checkArgument ( org . batfish . datamodel . IntersectHeaderSpaces . isUnconstrained ( h2 . getSrcOrDstIps ( ) ) ) ; checkArgument ( org . batfish . datamodel . IntersectHeaderSpaces . isUnconstrained ( h1 . getSrcOrDstPorts ( ) ) ) ; checkArgument ( org . batfish . datamodel . IntersectHeaderSpaces . isUnconstrained ( h2 . getSrcOrDstPorts ( ) ) ) ; checkArgument ( org . batfish . datamodel . IntersectHeaderSpaces . isUnconstrained ( h1 . getSrcOrDstProtocols ( ) ) ) ; checkArgument ( org . batfish . datamodel . IntersectHeaderSpaces . isUnconstrained ( h2 . getSrcOrDstProtocols ( ) ) ) ; try { return java . util . Optional . of ( org . batfish . datamodel . HeaderSpace . builder ( ) . setDscps ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSimpleSets ( h1 . getDscps ( ) , h2 . getDscps ( ) ) ) . setDstIps ( org . batfish . datamodel . IntersectHeaderSpaces . intersection ( h1 . getDstIps ( ) , h2 . getDstIps ( ) ) ) . setDstPorts ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSubRangeSets ( h1 . getDstPorts ( ) , h2 . getDstPorts ( ) ) ) . setDstProtocols ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSimpleSets ( h1 . getDstProtocols ( ) , h2 . getDstProtocols ( ) ) ) . setIpProtocols ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSimpleSets ( h1 . getIpProtocols ( ) , h2 . getIpProtocols ( ) ) ) . setIcmpCodes ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSubRangeSets ( h1 . getIcmpCodes ( ) , h2 . getIcmpCodes ( ) ) ) . setIcmpTypes ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSubRangeSets ( h1 . getIcmpTypes ( ) , h2 . getIcmpTypes ( ) ) ) . setNotDstIps ( org . batfish . datamodel . AclIpSpace . union ( h1 . getNotDstIps ( ) , h2 . getNotDstIps ( ) ) ) . setNotDstPorts ( com . google . common . collect . Sets . union ( h1 . getNotDstPorts ( ) , h2 . getNotDstPorts ( ) ) ) . setNotSrcIps ( org . batfish . datamodel . AclIpSpace . union ( h1 . getNotSrcIps ( ) , h2 . getNotSrcIps ( ) ) ) . setNotSrcPorts ( com . google . common . collect . Sets . union ( h1 . getNotSrcPorts ( ) , h2 . getNotSrcPorts ( ) ) ) . setSrcIps ( org . batfish . datamodel . AclIpSpace . intersection ( h1 . getSrcIps ( ) , h2 . getSrcIps ( ) ) ) . setSrcOrDstPorts ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSubRangeSets ( h1 . getSrcOrDstPorts ( ) , h2 . getSrcOrDstPorts ( ) ) ) . setSrcPorts ( org . batfish . datamodel . IntersectHeaderSpaces . intersectSubRangeSets ( h1 . getSrcPorts ( ) , h2 . getSrcPorts ( ) ) ) . setTcpFlags ( org . batfish . datamodel . IntersectHeaderSpaces . intersectTcpFlagMatchConditions ( h1 . getTcpFlags ( ) , h2 . getTcpFlags ( ) ) ) . build ( ) ) ; } catch ( org . batfish . datamodel . IntersectHeaderSpaces . NoIntersection e ) { return java . util . Optional . empty ( ) ; } } | 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" , "Basic<sp>YmxhZGU6YmxhZGUyMg==" ) ; when ( mockRequest . parameters ( ) ) . thenReturn ( new java . util . HashMap ( ) ) ; when ( mockRequest . headers ( ) ) . thenReturn ( headers ) ; com . blade . mvc . http . Request request = new com . blade . mvc . http . HttpRequest ( mockRequest ) ; com . blade . mvc . http . Response response = mockHttpResponse ( 200 ) ; com . blade . mvc . RouteContext context = new com . blade . mvc . RouteContext ( request , response ) ; context . initRoute ( com . blade . mvc . route . Route . builder ( ) . action ( com . blade . security . BasicAuthMiddlewareTest . AuthHandler . class . getMethod ( "handle" , com . blade . mvc . RouteContext . class ) ) . targetType ( com . blade . security . BasicAuthMiddlewareTest . AuthHandler . class ) . target ( new com . blade . security . BasicAuthMiddlewareTest . AuthHandler ( ) ) . build ( ) ) ; com . blade . mvc . WebContext . set ( new com . blade . mvc . WebContext ( request , response , null ) ) ; com . blade . security . web . auth . AuthOption authOption = com . blade . security . web . auth . AuthOption . builder ( ) . build ( ) ; authOption . addUser ( "admin" , "123456" ) ; com . blade . security . web . auth . BasicAuthMiddleware basicAuthMiddleware = new com . blade . security . web . auth . BasicAuthMiddleware ( authOption ) ; boolean flag = basicAuthMiddleware . before ( context ) ; "<AssertPlaceHolder>" ; } before ( com . blade . mvc . RouteContext ) { if ( csrfOption . isIgnoreMethod ( context . method ( ) ) ) { if ( csrfOption . isStartExclusion ( context . uri ( ) ) ) { return true ; } this . genToken ( context ) ; return true ; } if ( csrfOption . isExclusion ( context . uri ( ) ) ) { return true ; } java . lang . String tokenUUID = context . session ( ) . attribute ( sessionToken ) ; if ( com . blade . kit . StringKit . isEmpty ( tokenUUID ) ) { csrfOption . getErrorHandler ( ) . accept ( context ) ; return false ; } java . lang . String token = csrfOption . getTokenGetter ( ) . apply ( context . request ( ) ) ; if ( com . blade . kit . StringKit . isEmpty ( token ) ) { csrfOption . getErrorHandler ( ) . accept ( context ) ; return false ; } java . lang . String hash = new java . lang . String ( java . util . Base64 . getDecoder ( ) . decode ( token ) ) ; if ( ! ( com . blade . kit . PasswordKit . checkPassword ( tokenUUID , hash ) ) ) { csrfOption . getErrorHandler ( ) . accept ( context ) ; return false ; } return true ; } | 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 . terasoluna . gfw . web . token . transaction . TransactionToken ( "tokenName1" , "111" , "222" ) ; org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo tokenInfo = new org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo ( "tokenName1" , TransactionTokenType . IN ) ; when ( tokenStore . getAndClear ( any ( org . terasoluna . gfw . web . token . transaction . TransactionToken . class ) ) ) . thenReturn ( "differentValue" ) ; boolean result = interceptor . validateToken ( inputToken , tokenStore , tokenInfo ) ; "<AssertPlaceHolder>" ; } validateToken ( org . terasoluna . gfw . web . token . transaction . TransactionToken , org . terasoluna . gfw . web . token . transaction . TransactionTokenStore , org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo ) { if ( ( receivedToken . valid ( ) ) && ( receivedToken . getTokenName ( ) . equals ( tokenInfo . getTokenName ( ) ) ) ) { java . lang . String storedToken = tokenStore . getAndClear ( receivedToken ) ; if ( ( storedToken != null ) && ( storedToken . equals ( receivedToken . getTokenValue ( ) ) ) ) { return true ; } } return false ; } | 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 . util . Arrays . asList ( testCopierFactory ) ) ; com . hotels . bdp . circustrain . api . copier . CopierFactory copierFactoryResult = copierFactoryManager . getCopierFactory ( path , path , com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > of ( "copier-factory-class" , testCopierFactory . getClass ( ) . getName ( ) ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { org . junit . Assert . assertThat ( source . getName ( ) , org . hamcrest . CoreMatchers . is ( com . hotels . bdp . circustrain . core . source . SourceTest . NAME ) ) ; } | 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 ( basedir ) ; fs . mkdirs ( new org . apache . hadoop . fs . Path ( basedir , hri . getEncodedName ( ) ) ) ; org . apache . hadoop . hbase . regionserver . wal . HTableDescriptor htd = createBasic3FamilyHTD ( tableNameStr ) ; org . apache . hadoop . hbase . regionserver . HRegion region2 = org . apache . hadoop . hbase . regionserver . HRegion . createHRegion ( hri , hbaseRootDir , this . conf , htd ) ; region2 . close ( ) ; region2 . getLog ( ) . closeAndDelete ( ) ; final byte [ ] tableName = org . apache . hadoop . hbase . util . Bytes . toBytes ( tableNameStr ) ; final byte [ ] rowName = tableName ; org . apache . hadoop . hbase . regionserver . wal . HLog wal1 = createWAL ( this . conf ) ; final int countPerFamily = 1000 ; for ( org . apache . hadoop . hbase . regionserver . wal . HColumnDescriptor hcd : htd . getFamilies ( ) ) { addWALEdits ( tableName , hri , rowName , hcd . getName ( ) , countPerFamily , ee , wal1 , htd ) ; } wal1 . close ( ) ; runWALSplit ( this . conf ) ; org . apache . hadoop . hbase . regionserver . wal . HLog wal2 = createWAL ( this . conf ) ; wal2 . setSequenceNumber ( wal1 . getSequenceNumber ( ) ) ; for ( org . apache . hadoop . hbase . regionserver . wal . HColumnDescriptor hcd : htd . getFamilies ( ) ) { addWALEdits ( tableName , hri , rowName , hcd . getName ( ) , countPerFamily , ee , wal2 , htd ) ; } wal2 . close ( ) ; runWALSplit ( this . conf ) ; org . apache . hadoop . hbase . regionserver . wal . HLog wal3 = createWAL ( this . conf ) ; wal3 . setSequenceNumber ( wal2 . getSequenceNumber ( ) ) ; try { final org . apache . hadoop . hbase . regionserver . HRegion region = new org . apache . hadoop . hbase . regionserver . HRegion ( basedir , wal3 , this . fs , this . conf , hri , htd , null ) ; long seqid = region . initialize ( ) ; "<AssertPlaceHolder>" ; region . close ( ) ; } finally { wal3 . closeAndDelete ( ) ; } } getSequenceNumber ( ) { return sequenceNumber ; } | 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_loading_system . interfaces . ibootstrap . IBootstrap . class ) ; info . smart_tools . smartactors . feature_loading_system . interfaces . iplugin . IPlugin plugin = new info . smart_tools . smartactors . database_in_memory_plugins . in_memory_db_tasks_plugin . PluginInMemoryDBTasks ( bootstrap ) ; "<AssertPlaceHolder>" ; reset ( bootstrap ) ; } | 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>" ; } needsActivation ( ) { return ( isServerPushActive ( ) ) || ( org . eclipse . rap . rwt . internal . serverpush . ServerPushManager . forceServerPushForPendingRunnables ( ) ) ; } | 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>" ; } getCqlText ( net . opengis . filter . v_1_1_0 . FilterType ) { org . geotools . xml . Parser parser = new org . geotools . xml . Parser ( new org . geotools . filter . v1_1 . OGCConfiguration ( ) ) ; try { java . io . StringReader reader = new java . io . StringReader ( marshalFilterType ( filterType ) ) ; java . lang . Object parsedFilter = parser . parse ( reader ) ; if ( parsedFilter instanceof org . opengis . filter . Filter ) { org . opengis . filter . Filter filterToCql = ( ( org . opengis . filter . Filter ) ( parsedFilter ) ) ; org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . LOGGER . debug ( "Filter<sp>to<sp>Convert<sp>to<sp>CQL<sp>=><sp>{}" , filterToCql ) ; java . lang . String cql = org . geotools . filter . text . ecql . ECQL . toCQL ( filterToCql ) ; org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . LOGGER . debug ( "Generated<sp>CQL<sp>from<sp>Filter<sp>=><sp>{}" , cql ) ; return cql ; } else { throw new ddf . catalog . source . UnsupportedQueryException ( "Query<sp>did<sp>not<sp>produce<sp>a<sp>valid<sp>filter." ) ; } } catch ( java . io . IOException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( org . xml . sax . SAXException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( javax . xml . parsers . ParserConfigurationException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( javax . xml . bind . JAXBException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } } | 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 . setStartDatum ( calendar . getTime ( ) ) ; java . util . stream . IntStream . range ( 0 , 10 ) . forEach ( ( value ) -> status . incrementEnGetSchrijfTaken ( 10 ) ) ; final long verwerksnelheid = selectieJobRunStatusJMX . verwerkSnelheidSelectieSchrijfTaken ( ) ; "<AssertPlaceHolder>" ; } verwerkSnelheidSelectieSchrijfTaken ( ) { final java . util . Date startDatum = selectieJobRunStatusService . getStatus ( ) . getStartDatum ( ) ; if ( startDatum == null ) { return 0 ; } final java . util . Date eindDatum = selectieJobRunStatusService . getStatus ( ) . getEindeDatum ( ) ; final long nu = ( eindDatum != null ) ? eindDatum . getTime ( ) : new java . util . Date ( ) . getTime ( ) ; final int selectieSchrijfTaken = selectieJobRunStatusService . getStatus ( ) . getAantalSchrijfTaken ( ) ; final long tijd = TimeUnit . MILLISECONDS . toMinutes ( ( nu - ( startDatum . getTime ( ) ) ) ) ; if ( tijd == 0 ) { return 0 ; } return selectieSchrijfTaken / tijd ; } | 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 ( ) ; "<AssertPlaceHolder>" ; } getGroups ( ) { if ( ( groups ) == null ) return null ; return org . biojava . nbio . protmod . structure . Collections . unmodifiableSet ( groups ) ; } | 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 = new org . sonatype . plexus . rest . representation . XStreamRepresentation ( this . getXMLXStream ( ) , "" , org . restlet . data . MediaType . APPLICATION_XML ) ; representation . setPayload ( p2Lineup ) ; com . sonatype . nexus . p2 . lineup . persist . P2Gav gav = new com . sonatype . nexus . p2 . lineup . persist . P2Gav ( p2Lineup ) ; return org . sonatype . nexus . integrationtests . RequestFacade . sendMessage ( ( ( ( com . sonatype . nexus . proxy . p2 . its . AbstractP2LineupIT . URI_PART ) + "/" ) + ( gav . toPathString ( ) ) ) , Method . PUT , 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 . loadDependencies ( gav ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return enhancedDependencies . isEmpty ( ) ; } | 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 . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . SUBSTANCE ) ) ; final com . b2international . index . query . Expression expected = com . b2international . index . query . Expressions . builder ( ) . filter ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) ) . mustNot ( ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . ALGOFLEX_TABLET , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPLEX_TABLET , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . ASPIRIN_TABLET ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return build ( ( ( java . lang . Void ) ( null ) ) ) ; } | 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 . JmsInputProperties inputProperties = new org . talend . components . jms . input . JmsInputProperties ( "jmsInputPTransformRuntime" ) ; inputProperties . setDatasetProperties ( jmsDatasetProperties ) ; jmsInputPTransformRuntime . initialize ( null , inputProperties ) ; jmsInputPTransformRuntime . setMessageType ( ) ; "<AssertPlaceHolder>" ; } getMessageType ( ) { return messageType ; } | 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 comment = "comment" ; doReturn ( expectedPath ) . when ( renameService ) . rename ( path , newName , comment ) ; final org . uberfire . backend . vfs . Path actualPath = service . rename ( path , newName , comment ) ; verify ( renameService ) . rename ( path , newName , comment ) ; "<AssertPlaceHolder>" ; } rename ( org . uberfire . backend . vfs . Path , java . lang . String , java . lang . String ) { return renameService . rename ( path , newName , comment ) ; } | 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 . DateTime ( 2016 , 10 , 24 , 5 , 10 , 0 ) . toDate ( ) ; java . util . Date fimPeriodo2 = new org . joda . time . DateTime ( 2016 , 10 , 26 , 5 , 10 , 0 ) . toDate ( ) ; boolean resultado1 = br . com . any . utils . DataUtils . periodosColidem ( inicioPeriodo1 , fimPeriodo1 , inicioPeriodo2 , fimPeriodo2 , true ) ; "<AssertPlaceHolder>" ; } periodosColidem ( java . util . Date , java . util . Date , java . util . Date , java . util . Date , boolean ) { org . joda . time . Interval intervalo1 = new org . joda . time . Interval ( new org . joda . time . DateTime ( inicioPeriodo1 ) , new org . joda . time . DateTime ( fimPeriodo1 ) ) ; org . joda . time . Interval intervalo2 = new org . joda . time . Interval ( new org . joda . time . DateTime ( inicioPeriodo2 ) , new org . joda . time . DateTime ( fimPeriodo2 ) ) ; if ( inclusive ) { return ( intervalo1 . overlaps ( intervalo2 ) ) || ( intervalo1 . abuts ( intervalo2 ) ) ; } return intervalo1 . overlaps ( intervalo2 ) ; } | 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 . JobType ( ) . setName ( expectedName ) ) ; java . lang . String actualName = JobInfo . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return getContent ( ) . getName ( ) ; } | 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 . voxelwind . server . game . serializer . MetadataSerializer . serializeMetadata ( state ) ; "<AssertPlaceHolder>" ; } serializeMetadata ( com . voxelwind . api . game . level . block . BlockState ) { return com . voxelwind . server . game . serializer . MetadataSerializer . INSTANCE . readMetadata ( block ) ; } | 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 . conversie . model . lo3 . syntax . Lo3CategorieWaarde > gefilterdeCategorieen = ng01filter . filter ( null , null , null , categorieen , java . util . Arrays . asList ( "01.01.10" , "6720" 4 , "01.02.20" , "6720" 2 , "01.02.40" , "01.03.10" , "023" 0 , "01.03.30" , "07.80.10" ) ) ; final java . lang . String ng01 = subject . maakPlatteTekst ( null , categorieen , gefilterdeCategorieen ) ; nl . bzk . brp . levering . lo3 . format . Ng01FormatterTest . LOGGER . info ( ng01 ) ; final java . lang . StringBuilder verwachteNg01 = new java . lang . StringBuilder ( ) ; verwachteNg01 . append ( "6720" 0 ) ; verwachteNg01 . append ( "023" 2 ) ; verwachteNg01 . append ( "6720" 9 ) . append ( "6720" 7 ) ; verwachteNg01 . append ( "6720" 5 ) . append ( "023" 1 ) . append ( "3450924321" ) ; verwachteNg01 . append ( "6720" 3 ) . append ( "023" ) ; verwachteNg01 . append ( "6720" 8 ) . append ( "6720" 1 ) . append ( "6720" 6 ) ; verwachteNg01 . append ( "6720" ) . append ( "001" ) . append ( nl . bzk . brp . levering . lo3 . format . Ng01FormatterTest . F ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "[a-nummer=" + ( administratienummer ) ) + "]" ; } | 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 . LoggerFactory . getLogger ( org . apache . nifi . minifi . status . StatusConfigReporterTest . class ) ) ; org . apache . nifi . minifi . commons . status . FlowStatusReport expected = new org . apache . nifi . minifi . commons . status . FlowStatusReport ( ) ; expected . setErrorsGeneratingReport ( Collections . EMPTY_LIST ) ; addConnectionStatus ( expected , true , false ) ; "<AssertPlaceHolder>" ; } addConnectionStatus ( org . apache . nifi . minifi . commons . status . FlowStatusReport , boolean , boolean ) { org . apache . nifi . minifi . commons . status . connection . ConnectionStatusBean expectedConnectionStatus = new org . apache . nifi . minifi . commons . status . connection . ConnectionStatusBean ( ) ; expectedConnectionStatus . setId ( "connectionId" ) ; expectedConnectionStatus . setName ( "connectionName" ) ; if ( addHealth ) { org . apache . nifi . minifi . commons . status . connection . ConnectionHealth connectionHealth = new org . apache . nifi . minifi . commons . status . connection . ConnectionHealth ( ) ; connectionHealth . setQueuedCount ( 10 ) ; connectionHealth . setQueuedBytes ( 100 ) ; expectedConnectionStatus . setConnectionHealth ( connectionHealth ) ; } if ( addStats ) { org . apache . nifi . minifi . commons . status . connection . ConnectionStats expectedConnectionStats = new org . apache . nifi . minifi . commons . status . connection . ConnectionStats ( ) ; expectedConnectionStats . setInputCount ( 1 ) ; expectedConnectionStats . setInputBytes ( 2 ) ; expectedConnectionStats . setOutputCount ( 3 ) ; expectedConnectionStats . setOutputBytes ( 4 ) ; expectedConnectionStatus . setConnectionStats ( expectedConnectionStats ) ; } flowStatusReport . setConnectionStatusList ( java . util . Collections . singletonList ( expectedConnectionStatus ) ) ; } | 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 ) ) . thenReturn ( testParams . signed ) ; when ( metadata . getPrecision ( 1 ) ) . thenReturn ( testParams . precision ) ; when ( metadata . getColumnName ( 1 ) ) . thenReturn ( "t_int" ) ; when ( metadata . getTableName ( 1 ) ) . thenReturn ( "table" ) ; final java . sql . ResultSet rs = org . apache . nifi . util . db . JdbcCommonTestUtils . resultSetReturningMetadata ( metadata ) ; final int ret = 0 ; when ( rs . getObject ( org . mockito . Mockito . anyInt ( ) ) ) . thenReturn ( ret ) ; final java . io . InputStream instream = org . apache . nifi . util . db . JdbcCommonTestUtils . convertResultSetToAvroInputStream ( rs ) ; final org . apache . avro . io . DatumReader < org . apache . avro . generic . GenericRecord > datumReader = new org . apache . avro . generic . GenericDatumReader ( ) ; try ( final org . apache . avro . file . DataFileStream < org . apache . avro . generic . GenericRecord > dataFileReader = new org . apache . avro . file . DataFileStream ( instream , datumReader ) ) { org . apache . avro . generic . GenericRecord record = null ; while ( dataFileReader . hasNext ( ) ) { record = dataFileReader . next ( record ) ; "<AssertPlaceHolder>" ; } } } toString ( java . nio . charset . Charset ) { return new java . lang . String ( bytes , charset ) ; } | 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 ( 1L , "A" , true ) ) ; todos . add ( new org . springframework . data . rest . webmvc . json . patch . Todo ( 2L , "B" , false ) ) ; todos . add ( new org . springframework . data . rest . webmvc . json . patch . Todo ( 3L , "C" , false ) ) ; org . springframework . data . rest . webmvc . json . patch . CopyOperation copy = org . springframework . data . rest . webmvc . json . patch . CopyOperation . from ( "/0/description" ) . to ( "/1/description" ) ; copy . perform ( todos , org . springframework . data . rest . webmvc . json . patch . Todo . class ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; } | 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 . TestObjectMethods . SingleOption parsedArguments1 = com . lexicalscope . jewel . cli . CliFactory . parseArguments ( com . lexicalscope . jewel . cli . TestObjectMethods . SingleOption . class , "--name" , "value" ) ; "<AssertPlaceHolder>" ; } | 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 = documentBuilder . newDocument ( ) ; org . w3c . dom . Element element = document . createElementNS ( "http://java.sun.com/xml/ns/javaee" , "web-app" ) ; element . setUserData ( "version" , "2.5" , null ) ; element . setUserData ( "location" , new com . google . cloud . tools . eclipse . appengine . validation . DocumentLocation ( 1 , 1 ) , null ) ; document . appendChild ( element ) ; java . util . ArrayList < com . google . cloud . tools . eclipse . appengine . validation . ElementProblem > problems = validator . checkForProblems ( resource , document ) ; "<AssertPlaceHolder>" ; } checkForProblems ( org . eclipse . core . resources . IResource , org . w3c . dom . Document ) { java . util . ArrayList < com . google . cloud . tools . eclipse . appengine . validation . ElementProblem > problems = new java . util . ArrayList ( ) ; try { javax . xml . xpath . XPath xPath = com . google . cloud . tools . eclipse . appengine . validation . PomXmlValidator . FACTORY . newXPath ( ) ; javax . xml . namespace . NamespaceContext nsContext = new com . google . cloud . tools . eclipse . util . MappedNamespaceContext ( "prefix" , "http://maven.apache.org/POM/4.0.0" ) ; xPath . setNamespaceContext ( nsContext ) ; java . lang . String selectGroupId = "//prefix:plugin/prefix:groupId[.='com.google.appengine']" + ( "[../prefix:artifactId[text()='appengine-maven-plugin'" + "<sp>or<sp>text()='gcloud-maven-plugin']]" ) ; org . w3c . dom . NodeList groupIdElements = ( ( org . w3c . dom . NodeList ) ( xPath . compile ( selectGroupId ) . evaluate ( document , XPathConstants . NODESET ) ) ) ; for ( int i = 0 ; i < ( groupIdElements . getLength ( ) ) ; i ++ ) { org . w3c . dom . Node child = groupIdElements . item ( i ) ; com . google . cloud . tools . eclipse . appengine . validation . DocumentLocation location = ( ( com . google . cloud . tools . eclipse . appengine . validation . DocumentLocation ) ( child . getUserData ( "location" ) ) ) ; com . google . cloud . tools . eclipse . appengine . validation . ElementProblem element = new com . google . cloud . tools . eclipse . appengine . validation . MavenPluginElement ( location , child . getTextContent ( ) . length ( ) ) ; problems . add ( element ) ; } } catch ( javax . xml . xpath . XPathExpressionException ex ) { throw new java . lang . RuntimeException ( "Invalid<sp>XPath<sp>expression" ) ; } return problems ; } | 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\"" ) ; "<AssertPlaceHolder>" ; } getColumn ( java . lang . String ) { return nameToColumns . get ( name ) ; } | 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 = getDfsUsedValueOfNewVolume ( cacheDfsUsed , waitIntervalTime ) ; "<AssertPlaceHolder>" ; } getDfsUsedValueOfNewVolume ( long , long ) { java . util . List < org . apache . hadoop . hdfs . server . protocol . NamespaceInfo > nsInfos = com . google . common . collect . Lists . newArrayList ( ) ; nsInfos . add ( new org . apache . hadoop . hdfs . server . protocol . NamespaceInfo ( 0 , org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . TestFsDatasetImpl . CLUSTER_ID , org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . TestFsDatasetImpl . BLOCK_POOL_IDS [ 0 ] , 1 ) ) ; java . lang . String CURRENT_DIR = "current" ; java . lang . String DU_CACHE_FILE = BlockPoolSlice . DU_CACHE_FILE ; java . lang . String path = ( org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . TestFsDatasetImpl . BASE_DIR ) + "/newData0" ; java . lang . String pathUri = new org . apache . hadoop . fs . Path ( path ) . toUri ( ) . toString ( ) ; org . apache . hadoop . hdfs . server . datanode . StorageLocation loc = org . apache . hadoop . hdfs . server . datanode . StorageLocation . parse ( pathUri ) ; org . apache . hadoop . hdfs . server . common . Storage . StorageDirectory sd = org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . TestFsDatasetImpl . createStorageDirectory ( new java . io . File ( path ) , conf ) ; org . apache . hadoop . hdfs . server . datanode . DataStorage . VolumeBuilder builder = new org . apache . hadoop . hdfs . server . datanode . DataStorage . VolumeBuilder ( storage , sd ) ; when ( storage . prepareVolume ( eq ( datanode ) , eq ( loc ) , anyList ( ) ) ) . thenReturn ( builder ) ; java . lang . String cacheFilePath = java . lang . String . format ( "%s/%s/%s/%s/%s" , path , CURRENT_DIR , org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . TestFsDatasetImpl . BLOCK_POOL_IDS [ 0 ] , CURRENT_DIR , DU_CACHE_FILE ) ; java . io . File outFile = new java . io . File ( cacheFilePath ) ; if ( ! ( outFile . getParentFile ( ) . exists ( ) ) ) { outFile . getParentFile ( ) . mkdirs ( ) ; } if ( outFile . exists ( ) ) { outFile . delete ( ) ; } org . apache . hadoop . util . FakeTimer timer = new org . apache . hadoop . util . FakeTimer ( ) ; try { try ( java . io . Writer out = new java . io . OutputStreamWriter ( new java . io . FileOutputStream ( outFile ) , java . nio . charset . StandardCharsets . UTF_8 ) ) { out . write ( ( ( ( java . lang . Long . toString ( cacheDfsUsed ) ) + "<sp>" ) + ( java . lang . Long . toString ( timer . now ( ) ) ) ) ) ; out . flush ( ) ; } } catch ( java . io . IOException ioe ) { } dataset . setTimer ( timer ) ; timer . advance ( waitIntervalTime ) ; dataset . addVolume ( loc , nsInfos ) ; org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . FsVolumeImpl newVolume ; try ( org . apache . hadoop . hdfs . server . datanode . fsdataset . FsDatasetSpi . FsVolumeReferences volumes = dataset . getFsVolumeReferences ( ) ) { newVolume = ( ( org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . FsVolumeImpl ) ( volumes . get ( ( ( volumes . size ( ) ) - 1 ) ) ) ) ; } long dfsUsed = newVolume . getDfsUsed ( ) ; return dfsUsed ; } | 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 ) ; "<AssertPlaceHolder>" ; checkSequence ( sResponse , new java . lang . String [ ] { "LWPOLYLINE" } , pos ) ; } getGeometrySearchStart ( java . lang . String ) { return response . indexOf ( "BLOCKS" ) ; } | 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 ( "ROLE_USER_ADMIN" 5 ) ; user . setEmail ( "thcc@dma.dk" ) ; user . setIdOrganization ( 1L ) ; user . setPermissions ( "ROLE_USER_ADMIN" 7 ) ; java . lang . String userJson = serialize ( user ) ; net . maritimecloud . identityregistry . model . database . Organization org = spy ( net . maritimecloud . identityregistry . model . database . Organization . class ) ; org . setMrn ( "urn:mrn:mcl:org:dma" ) ; org . setAddress ( "Carl<sp>Jakobsensvej<sp>31,<sp>2500<sp>Valby" ) ; org . setCountry ( "Denmark" ) ; org . setUrl ( "http://dma.dk" ) ; org . setEmail ( "ROLE_USER_ADMIN" 1 ) ; org . setName ( "ROLE_USER_ADMIN" 2 ) ; org . setFederationType ( "test-idp" ) ; java . util . Set < net . maritimecloud . identityregistry . model . database . IdentityProviderAttribute > identityProviderAttributes = new java . util . HashSet ( ) ; org . setIdentityProviderAttributes ( identityProviderAttributes ) ; org . keycloak . adapters . springsecurity . token . KeycloakAuthenticationToken auth = net . maritimecloud . identityregistry . controllers . TokenGenerator . generateKeycloakToken ( "urn:mrn:mcl:org:dma" , "ROLE_USER_ADMIN" , "ROLE_USER_ADMIN" 3 ) ; given ( this . organizationService . getOrganizationByMrn ( "urn:mrn:mcl:org:dma" ) ) . willReturn ( org ) ; given ( this . entityService . getByMrn ( "urn:mrn:mcl:user:dma:thc" ) ) . willReturn ( user ) ; when ( org . getId ( ) ) . thenReturn ( 1L ) ; try { mvc . perform ( put ( "ROLE_USER_ADMIN" 4 ) . with ( authentication ( auth ) ) . header ( "ROLE_USER_ADMIN" 6 , "bla" ) . content ( userJson ) . contentType ( "application/json" ) ) . andExpect ( status ( ) . isOk ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } try { verify ( this . keycloakAU , times ( 1 ) ) . updateUser ( "urn:mrn:mcl:user:dma:thc" , "ROLE_USER_ADMIN" 0 , "ROLE_USER_ADMIN" 5 , "thcc@dma.dk" , "ROLE_USER_ADMIN" 7 , "ROLE_USER_ADMIN" 3 ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } catch ( net . maritimecloud . identityregistry . exception . McBasicRestException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } } getId ( ) { return id ; } | 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 ) { return com . crawljax . util . DomUtils . getDifferences ( controlDom , testDom , com . google . common . collect . Lists . newArrayList ( ) ) ; } | 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 . NonStrictExpectations ( ) { { mockUrl . getProtocol ( ) ; result = "https" ; mockUrl . openConnection ( ) ; result = mockUrlConn ; mockUrlConn . getRequestMethod ( ) ; result = httpsMethod . name ( ) ; mockUrlConn . getErrorStream ( ) ; result = mockIs ; mockIs . read ( ) ; returns ( 1 , 2 , 3 , ( - 1 ) ) ; } } ; com . microsoft . azure . sdk . iot . deps . transport . http . HttpConnection conn = new com . microsoft . azure . sdk . iot . deps . transport . http . HttpConnection ( mockUrl , httpsMethod ) ; conn . connect ( ) ; byte [ ] testError = conn . readError ( ) ; "<AssertPlaceHolder>" ; } readError ( ) { byte [ ] error = new byte [ 0 ] ; try ( java . io . InputStream errorStream = this . connection . getErrorStream ( ) ) { if ( errorStream != null ) { error = com . microsoft . azure . sdk . iot . service . transport . http . HttpConnection . readInputStream ( errorStream ) ; } } return error ; } | 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 ( ) ; return tokens ; } | 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 . Collectors . toList ( ) ) . size ( ) ; } | 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" ) ) ; final B builder = getBuilderInstance ( ) ; builder . withErrorHandler ( errorHandler ) ; final N node = builder . build ( ) ; final B fromExistingBuilder = getBuilderInstance ( node ) ; fromExistingBuilder . withoutErrorHandler ( ) ; final N modifiedNode = fromExistingBuilder . build ( ) ; "<AssertPlaceHolder>" ; } getErrorHandler ( ) { return errorHandler ; } | 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 . class ) ; "<AssertPlaceHolder>" ; System . out . println ( "OK!" ) ; } transactionManager ( javax . persistence . EntityManagerFactory ) { return new org . springframework . orm . jpa . JpaTransactionManager ( factory ) ; } | 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 . BinaryValue . class ) . withConstructor ( org . exist . xquery . value . BinaryValueManager . class , org . exist . xquery . value . BinaryValueType . class ) . withArgs ( binaryValueManager , new org . exist . xquery . value . Base64BinaryValueType ( ) ) . createMock ( ) ; replay ( mockBase64BinaryValue ) ; final org . exist . xquery . value . AtomicValue result = mockBase64BinaryValue . convertTo ( Type . BASE64_BINARY ) ; verify ( mockBase64BinaryValue ) ; "<AssertPlaceHolder>" ; } verify ( org . exist . storage . BrokerPool ) { try ( final org . exist . storage . DBBroker broker = pool . get ( java . util . Optional . of ( pool . getSecurityManager ( ) . getSystemSubject ( ) ) ) ) { final org . exist . storage . serializers . Serializer serializer = broker . getSerializer ( ) ; serializer . reset ( ) ; try ( final org . exist . dom . persistent . LockedDocument lockedDoc = broker . getXMLResource ( XmldbURI . ROOT_COLLECTION_URI . append ( "test/test2/hamlet.xml" ) , LockMode . READ_LOCK ) ) { org . junit . Assert . assertNotNull ( ( ( "Document<sp>'" + ( org . exist . xmldb . XmldbURI . ROOT_COLLECTION ) ) + "/test/test2/hamlet.xml'<sp>should<sp>not<sp>be<sp>null" ) , lockedDoc ) ; final java . lang . String data = serializer . serialize ( lockedDoc . getDocument ( ) ) ; org . junit . Assert . assertNotNull ( data ) ; } try ( final org . exist . dom . persistent . LockedDocument lockedDoc = broker . getXMLResource ( XmldbURI . ROOT_COLLECTION_URI . append ( "test/test2/test_string.xml" ) , LockMode . READ_LOCK ) ) { org . junit . Assert . assertNotNull ( ( ( "Document<sp>'" + ( org . exist . xmldb . XmldbURI . ROOT_COLLECTION ) ) + "/test/test2/test_string.xml'<sp>should<sp>not<sp>be<sp>null" ) , lockedDoc ) ; final java . lang . String data = serializer . serialize ( lockedDoc . getDocument ( ) ) ; org . junit . Assert . assertNotNull ( data ) ; } final java . util . List < java . nio . file . Path > files = org . exist . storage . FileUtils . list ( org . exist . storage . RecoveryTest . dir ) ; files . sort ( java . util . Comparator . comparing ( FileUtils :: fileName ) ) ; org . junit . Assert . assertNotNull ( files ) ; try ( final org . exist . dom . persistent . LockedDocument lockedDoc = broker . getXMLResource ( TestConstants . TEST_COLLECTION_URI2 . append ( org . exist . storage . FileUtils . fileName ( files . get ( ( ( files . size ( ) ) - 1 ) ) ) ) , LockMode . READ_LOCK ) ) { org . junit . Assert . assertNull ( ( ( ( ( "Document<sp>'" + ( org . exist . xmldb . XmldbURI . ROOT_COLLECTION ) ) + "/test/test2/'" ) + ( org . exist . storage . FileUtils . fileName ( files . get ( ( ( files . size ( ) ) - 1 ) ) ) ) ) + "<sp>should<sp>not<sp>exist<sp>anymore" ) , lockedDoc ) ; } final org . exist . xquery . XQuery xquery = pool . getXQueryService ( ) ; org . junit . Assert . assertNotNull ( xquery ) ; final org . exist . xquery . value . Sequence seq = xquery . execute ( broker , "//SPEECH[ft:query(LINE,<sp>'king')]" , null ) ; org . junit . Assert . assertNotNull ( seq ) ; for ( final org . exist . xquery . value . SequenceIterator i = seq . iterate ( ) ; i . hasNext ( ) ; ) { final org . exist . xquery . value . Item next = i . nextItem ( ) ; final java . lang . String value = serializer . serialize ( ( ( org . exist . xquery . value . NodeValue ) ( next ) ) ) ; } try ( final org . exist . dom . persistent . LockedDocument lockedBinDoc = broker . getXMLResource ( TestConstants . TEST_COLLECTION_URI2 . append ( TestConstants . TEST_BINARY_URI ) , LockMode . READ_LOCK ) ) { org . junit . Assert . assertNotNull ( "Binary<sp>document<sp>is<sp>null" , lockedBinDoc ) ; final org . exist . dom . persistent . BinaryDocument binDoc = ( ( org . exist . dom . persistent . BinaryDocument ) ( lockedBinDoc . getDocument ( ) ) ) ; try ( final java . io . InputStream is = broker . getBinaryResource ( binDoc ) ) { final byte [ ] bdata = new byte [ ( ( int ) ( binDoc . getContentLength ( ) ) ) ] ; is . read ( bdata ) ; final java . lang . String data = new java . lang . String ( bdata ) ; org . junit . Assert . assertNotNull ( data ) ; } } final org . exist . storage . dom . DOMFile domDb = ( ( org . exist . storage . NativeBroker ) ( broker ) ) . getDOMFile ( ) ; org . junit . Assert . assertNotNull ( domDb ) ; try ( final java . io . Writer writer = new java . io . StringWriter ( ) ) { domDb . dump ( writer ) ; } final org . exist . storage . txn . TransactionManager transact = pool . getTransactionManager ( ) ; try ( final org . exist . storage . txn . Txn transaction | 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 ( "ABC" ) ; "<AssertPlaceHolder>" ; } } toString ( ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( getClass ( ) . getSimpleName ( ) ) ; builder . append ( '[' ) ; builder . append ( charsetName ) ; builder . append ( ":<sp>" ) ; for ( int i = 0 ; i < ( bytes . length ) ; i ++ ) { if ( i > 0 ) { builder . append ( "," ) ; } builder . append ( "0x" ) ; builder . append ( java . lang . Integer . toHexString ( ( 255 & ( bytes [ i ] ) ) ) . toUpperCase ( Locale . ROOT ) ) ; } builder . append ( ']' ) ; return builder . toString ( ) ; } | 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 . TagPredicate ( asList ( com . github . timm . cucumber . runtime . TagPredicateTest . NOT_FOO_TAG_VALUE ) ) ; "<AssertPlaceHolder>" ; } apply ( java . util . Collection ) { for ( com . github . timm . cucumber . runtime . TagExpressionOld oldStyleExpression : oldStyleExpressions ) { if ( ! ( oldStyleExpression . evaluate ( pickleTags ) ) ) { return false ; } } java . util . List < java . lang . String > tags = new java . util . ArrayList < java . lang . String > ( ) ; for ( gherkin . pickles . PickleTag pickleTag : pickleTags ) { tags . add ( pickleTag . getName ( ) ) ; } for ( io . cucumber . tagexpressions . Expression expression : expressions ) { if ( ! ( expression . evaluate ( tags ) ) ) { return false ; } } return true ; } | 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 ] ) parity = ! parity ; } return parity ; } | 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 foundLaboratoryRow ; foundLaboratoryRow = ( ( org . isf . lab . model . LaboratoryRow ) ( org . isf . lab . test . Tests . jpa . find ( org . isf . lab . model . LaboratoryRow . class , code ) ) ) ; org . isf . lab . test . Tests . testLaboratoryRow . check ( foundLaboratoryRow ) ; return ; } | 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 . metron . enrichment . converter . EnrichmentKey ( ) ; k2 . fromBytes ( serialized ) ; "<AssertPlaceHolder>" ; } fromBytes ( byte [ ] ) { java . io . ByteArrayInputStream baos = new java . io . ByteArrayInputStream ( buffer ) ; java . io . DataInputStream w = new java . io . DataInputStream ( baos ) ; baos . skip ( KeyUtil . HASH_PREFIX_SIZE ) ; return new org . apache . metron . indexing . dao . HBaseDao . Key ( w . readUTF ( ) , w . readUTF ( ) ) ; } | 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 . liferay . portal . kernel . repository . model . FileEntry fileEntry = _addNonimageFileEntry ( serviceContext ) ; java . util . stream . Stream < com . liferay . adaptive . media . AdaptiveMedia < com . liferay . adaptive . media . image . processor . AMImageProcessor > > adaptiveMediaStream = _amImageFinder . getAdaptiveMediaStream ( ( amImageQueryBuilder ) -> amImageQueryBuilder . forFileEntry ( fileEntry ) . done ( ) ) ; "<AssertPlaceHolder>" ; } count ( ) { return com . liferay . portal . kernel . servlet . PortalSessionContext . _sessionPool . size ( ) ; } | 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" , "XMLHttpRequest" ) . accept ( MediaType . APPLICATION_JSON ) ) . andExpect ( org . springframework . test . web . servlet . result . MockMvcResultMatchers . status ( ) . isInternalServerError ( ) ) . andDo ( org . springframework . test . web . servlet . result . MockMvcResultHandlers . print ( ) ) . andReturn ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return this . getJedis ( ) . get ( key ) ; } | 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 ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( a ) + ".." ) + ( b ) ; } | 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 . viewhandler . GQLToQueryBuilderConverter . addFulltext ( request , map , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; } | 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 . junit . AssertUsage . hasValues ( null , 1234 , 1234 , 50L , 50L , 100L , 100L , 0.0 , 0.0 , "2013-04-10<sp>20:00:00" , "2013-04-10<sp>20:01:00" , 1 , 1 , 5 , null , 0 , true , null , actualUsage ) ; actualUsage = processedUsages . get ( 1 ) ; org . openstack . atlas . usagerefactor . junit . AssertUsage . hasValues ( null , 1234 , 1234 , 0L , 0L , 0L , 0L , 0.0 , 0.0 , "2013-04-10<sp>20:01:00" , "2013-04-10<sp>20:01:00" , 0 , 0 , 0 , org . openstack . atlas . usagerefactor . DELETE_LOADBALANCER . name ( ) , 0 , true , null , actualUsage ) ; } size ( ) { return size ; } | 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 . newHashSet ( ) ; strategy . map ( org . dcache . gplazma . strategies . MappingStrategyMapTests . IGNORING_LOGIN_MONITOR , principals ) ; } newMappingStrategy ( ) { return new org . dcache . gplazma . strategies . DefaultMappingStrategy ( ) ; } | 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 ( ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { com . google . gson . JsonObject json = super . toJSON ( ) . getAsJsonObject ( ) ; if ( ! ( badgeDisabled ) ) { if ( null != ( badge ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . BADGE , new com . google . gson . JsonPrimitive ( this . badge ) ) ; } else { json . add ( cn . jpush . api . push . model . notification . IosNotification . BADGE , new com . google . gson . JsonPrimitive ( cn . jpush . api . push . model . notification . IosNotification . DEFAULT_BADGE ) ) ; } } if ( ! ( soundDisabled ) ) { if ( null != ( sound ) ) { if ( ( sound ) instanceof java . lang . String ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , new com . google . gson . JsonPrimitive ( ( ( java . lang . String ) ( sound ) ) ) ) ; } else if ( ( sound ) instanceof com . google . gson . JsonObject ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , ( ( com . google . gson . JsonObject ) ( sound ) ) ) ; } } else { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , new com . google . gson . JsonPrimitive ( cn . jpush . api . push . model . notification . IosNotification . DEFAULT_SOUND ) ) ; } } if ( contentAvailable ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . CONTENT_AVAILABLE , new com . google . gson . JsonPrimitive ( true ) ) ; } if ( null != ( category ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . CATEGORY , new com . google . gson . JsonPrimitive ( category ) ) ; } if ( mutableContent ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . MUTABLE_CONTENT , new com . google . gson . JsonPrimitive ( true ) ) ; } if ( null != ( threadId ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . THREAD_ID , new com . google . gson . JsonPrimitive ( threadId ) ) ; } return json ; } | 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 ) ) ; parameters . setNumActiveColumnsPerInhArea ( 3 ) ; parameters . setStimulusThreshold ( 1 ) ; parameters . setSynPermInactiveDec ( 0.01 ) ; parameters . setSynPermActiveInc ( 0.1 ) ; parameters . setMinPctOverlapDutyCycles ( 0.1 ) ; parameters . setMinPctActiveDutyCycles ( 0.1 ) ; parameters . setDutyCyclePeriod ( 10 ) ; parameters . setMaxBoost ( 10 ) ; parameters . setSynPermTrimThreshold ( 0 ) ; parameters . setPotentialPct ( 1 ) ; parameters . setSynPermConnected ( 0.1 ) ; initSP ( ) ; org . numenta . nupic . algorithms . SpatialPooler mock = new org . numenta . nupic . algorithms . SpatialPooler ( ) { private static final long serialVersionUID = 1L ; public int [ ] inhibitColumns ( org . numenta . nupic . model . Connections c , double [ ] overlaps ) { return new int [ ] { 0 , 1 , 2 , 3 , 4 } ; } } ; int [ ] inputVector = new int [ ] { 1 , 0 , 1 , 0 , 1 , 0 , 0 , 1 , 1 } ; int [ ] activeArray = new int [ ] { 0 , 0 , 0 , 0 , 0 } ; for ( int i = 0 ; i < 20 ; i ++ ) { mock . compute ( mem , inputVector , activeArray , true ) ; } for ( int i = 0 ; i < ( mem . getNumColumns ( ) ) ; i ++ ) { int [ ] permanences = org . numenta . nupic . util . ArrayUtils . toIntArray ( mem . getPotentialPools ( ) . get ( i ) . getDensePermanences ( mem ) ) ; "<AssertPlaceHolder>" ; } } getDensePermanences ( org . numenta . nupic . model . Connections ) { double [ ] retVal = new double [ c . getNumInputs ( ) ] ; int [ ] keys = synapsesBySourceIndex . keys ( ) ; for ( int inputIndex : keys ) { retVal [ inputIndex ] = synapsesBySourceIndex . get ( inputIndex ) . getPermanence ( ) ; } return retVal ; } | 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 . handler . codec . http . DefaultCookie ( "myCookie" , "myValue" ) ; org . jboss . netty . handler . codec . http . CookieEncoder encoder = new org . jboss . netty . handler . codec . http . CookieEncoder ( true ) ; encoder . addCookie ( cookie ) ; cookie . setVersion ( 1 ) ; cookie . setComment ( "this<sp>is<sp>a<sp>Comment" ) ; cookie . setDomain ( ".adomainsomewhere" ) ; cookie . setMaxAge ( 50 ) ; cookie . setPath ( "/apathsomewhere" ) ; cookie . setSecure ( true ) ; java . lang . String encodedCookie = encoder . encode ( ) ; "<AssertPlaceHolder>" ; } encode ( ) { java . lang . String answer ; if ( server ) { answer = encodeServerSide ( ) ; } else { answer = encodeClientSide ( ) ; } cookies . clear ( ) ; return answer ; } | 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 > ( ) ; ignoredXPaths . add ( "/ESBMsg[1]/FlowData[1]/Pivot[1]/commande[1]/entete[1]/idCommandeBO[1]/text()[1]" ) ; diff . setIgnoredXPaths ( ignoredXPaths ) ; "<AssertPlaceHolder>" ; } isPathIgnored ( java . lang . String ) { for ( java . lang . String path : getIgnoredXPaths ( ) ) { if ( xPathLocation . equals ( path ) ) { return true ; } if ( pathsAreEqual ( xPathLocation , path ) ) { return true ; } } return false ; } | 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 . setBoshVersion ( "1.8" ) ; "<AssertPlaceHolder>" ; mocksControl . verify ( ) ; } getBoshVersion ( ) { return boshVersion ; } | 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 , 0 , 3 , "Ben" ) ; final uk . gov . dstl . baleen . types . common . Person tom = uk . gov . dstl . baleen . annotators . testing . Annotations . createPerson ( jCas , 20 , 23 , "Tom" ) ; final uk . gov . dstl . baleen . types . common . Person clare = uk . gov . dstl . baleen . annotators . testing . Annotations . createPerson ( jCas , 39 , 44 , "Clare" ) ; final uk . gov . dstl . baleen . types . semantic . Location london = uk . gov . dstl . baleen . annotators . testing . Annotations . createLocation ( jCas , 12 , 18 , "London" , "" ) ; final uk . gov . dstl . baleen . types . semantic . Location paris = uk . gov . dstl . baleen . annotators . testing . Annotations . createLocation ( jCas , 32 , 37 , "Paris" , "" ) ; final uk . gov . dstl . baleen . types . semantic . Location tokyo = uk . gov . dstl . baleen . annotators . testing . Annotations . createLocation ( jCas , 60 , 65 , "Tokyo" , "" ) ; final uk . gov . dstl . baleen . types . structure . Sentence s = new uk . gov . dstl . baleen . types . structure . Sentence ( jCas ) ; s . setBegin ( 0 ) ; s . setEnd ( jCas . getDocumentText ( ) . length ( ) ) ; s . addToIndexes ( ) ; addPartsOfSpeech ( ) ; processJCas ( uk . gov . dstl . baleen . annotators . relations . PartOfSpeechRelationshipAnnotator . PARAM_PATTERN , "(NNP).*(VBD).*(NNP)" , uk . gov . dstl . baleen . annotators . relations . PARAM_TYPE , uk . gov . dstl . baleen . annotators . relations . PartOfSpeechRelationshipTest . LOCATED_AT , uk . gov . dstl . baleen . annotators . relations . PartOfSpeechRelationshipAnnotator . PARAM_SOURCE_GROUP , 1 , uk . gov . dstl . baleen . annotators . relations . PartOfSpeechRelationshipAnnotator . PARAM_TARGET_GROUP , 3 , uk . gov . dstl . baleen . annotators . relations . PartOfSpeechRelationshipAnnotator . PARAM_VALUE_GROUP , 2 ) ; final java . util . List < uk . gov . dstl . baleen . types . semantic . Relation > relations = new java . util . ArrayList ( org . apache . uima . fit . util . JCasUtil . select ( jCas , uk . gov . dstl . baleen . types . semantic . Relation . class ) ) ; "<AssertPlaceHolder>" ; findRelationBetween ( relations , ben , london ) ; findRelationBetween ( relations , tom , paris ) ; findRelationBetween ( relations , clare , tokyo ) ; } size ( ) { return ( ( int ) ( flattened ( ) . count ( ) ) ) ; } | 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 . ebayopensource . fido . uaf . msg . FinalChallengeParams . class ) ; "<AssertPlaceHolder>" ; logger . info ( gson . toJson ( fromJson ) ) ; } | org . junit . Assert . assertNotNull ( fromJson ) |
testDeleteBusinessObjectFormat ( ) { businessObjectFormatServiceTestHelper . createTestBusinessObjectFormat ( businessObjectDefinitionServiceTestHelper . getNewAttributes ( ) ) ; org . finra . herd . model . jpa . BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectFormatDao . getBusinessObjectFormatByAltKey ( new org . finra . herd . model . api . xml . BusinessObjectFormatKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , INITIAL_FORMAT_VERSION ) ) ; org . finra . herd . model . api . xml . BusinessObjectFormat deletedBusinessObjectFormat = businessObjectFormatService . deleteBusinessObjectFormat ( new org . finra . herd . model . api . xml . BusinessObjectFormatKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , INITIAL_FORMAT_VERSION ) ) ; businessObjectFormatServiceTestHelper . validateBusinessObjectFormat ( businessObjectFormatEntity . getId ( ) , org . finra . herd . service . NAMESPACE , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . FORMAT_USAGE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . INITIAL_FORMAT_VERSION , org . finra . herd . service . LATEST_VERSION_FLAG_SET , org . finra . herd . service . PARTITION_KEY , org . finra . herd . service . FORMAT_DESCRIPTION , org . finra . herd . service . FORMAT_DOCUMENT_SCHEMA , org . finra . herd . service . FORMAT_DOCUMENT_SCHEMA_URL , businessObjectDefinitionServiceTestHelper . getNewAttributes ( ) , businessObjectFormatServiceTestHelper . getTestAttributeDefinitions ( ) , businessObjectFormatServiceTestHelper . getTestSchema ( ) , deletedBusinessObjectFormat ) ; "<AssertPlaceHolder>" ; } getTestSchema ( ) { org . finra . herd . model . api . xml . Schema schema = new org . finra . herd . model . api . xml . Schema ( ) ; schema . setNullValue ( AbstractServiceTest . SCHEMA_NULL_VALUE_BACKSLASH_N ) ; schema . setDelimiter ( AbstractServiceTest . SCHEMA_DELIMITER_PIPE ) ; schema . setCollectionItemsDelimiter ( AbstractServiceTest . SCHEMA_COLLECTION_ITEMS_DELIMITER_COMMA ) ; schema . setMapKeysDelimiter ( AbstractServiceTest . SCHEMA_MAP_KEYS_DELIMITER_HASH ) ; schema . setEscapeCharacter ( AbstractServiceTest . SCHEMA_ESCAPE_CHARACTER_BACKSLASH ) ; schema . setPartitionKeyGroup ( AbstractServiceTest . PARTITION_KEY_GROUP ) ; schema . setColumns ( schemaColumnDaoTestHelper . getTestSchemaColumns ( AbstractServiceTest . RANDOM_SUFFIX ) ) ; schema . setPartitions ( schemaColumnDaoTestHelper . getTestPartitionColumns ( AbstractServiceTest . RANDOM_SUFFIX ) ) ; return schema ; } | 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_ATTRIBUTES ) ; when ( storageService . getStorage ( storageKey ) ) . thenReturn ( storage ) ; org . finra . herd . model . api . xml . Storage result = storageRestController . getStorage ( org . finra . herd . rest . STORAGE_NAME ) ; verify ( storageService ) . getStorage ( storageKey ) ; verifyNoMoreInteractions ( storageService ) ; "<AssertPlaceHolder>" ; } getStorage ( org . finra . herd . model . api . xml . StorageKey ) { validateAndTrimStorageKey ( storageKey ) ; org . finra . herd . model . jpa . StorageEntity storageEntity = storageDaoHelper . getStorageEntity ( storageKey ) ; return createStorageFromEntity ( storageEntity ) ; } | 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 . String > > expected = java . util . Arrays . asList ( tuple ( "0" , 6.0 ) , tuple ( "1" , 5.0 ) , tuple ( "2" , 4.0 ) , tuple ( "3" , 3.0 ) , tuple ( "4" , 2.0 ) , tuple ( "5" , 1.0 ) ) ; "<AssertPlaceHolder>" ; } tuple ( T1 , double ) { return new org . ranksys . core . util . tuples . Tuple2od ( v1 , v2 ) ; } | 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 . isf . exa . model . Exam ) ( org . isf . exa . test . Tests . jpa . find ( org . isf . exa . model . Exam . class , code ) ) ) ; org . isf . exa . test . Tests . testExam . check ( foundExam ) ; return ; } | 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 = ( ( javax . management . openmbean . CompositeData ) ( org . spf4j . jmx . Client . getAttribute ( "service:jmx:rmi:///jndi/rmi://:9999/jmxrmi" , "org.spf4j.perf.recorders" , ( "class_" + ( org . spf4j . perf . impl . RecorderFactoryTest . class . getName ( ) ) ) , "measurements" ) ) ) ; "<AssertPlaceHolder>" ; rec . close ( ) ; } getName ( ) { return "docValidator" ; } | 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 ( ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . Object ) { if ( parameter == null ) { return false ; } return com . liferay . portal . kernel . util . Validator . isUrl ( parameter . toString ( ) ) ; } | 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 ) ; swipeItemHolder . setContentForItem ( 0 , content ) ; org . eclipse . swt . widgets . Control actualContent = swipeItemHolder . getContentForItem ( 0 ) ; "<AssertPlaceHolder>" ; } getContentForItem ( int ) { return contentHolder . get ( getKey ( index ) ) ; } | 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 . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; final java . util . Map < java . lang . String , java . util . List < com . cflint . BugInfo > > result = lintresult . getIssues ( ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( final java . util . List < ? > list : bugs . values ( ) ) { size += list . size ( ) ; } return size ; } | 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 . filter . ServiceByDateFilterTest . DATE2 ) ; eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper service = new eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper ( ) ; "<AssertPlaceHolder>" ; } isAcceptable ( eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper ) { for ( java . lang . String countryCode : countryCodes ) { if ( eu . europa . esig . dss . utils . Utils . areStringsEqualIgnoreCase ( countryCode , service . getCountryCode ( ) ) ) { return true ; } } return false ; } | 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 . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "Test<sp>Seed:<sp>{}" , seed ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . createGraph ( graph , graphsize , seed ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "Load<sp>Time<sp>({}<sp>triples)" , graph . size ( ) ) ; long start = java . lang . System . currentTimeMillis ( ) ; org . apache . clerezza . commons . rdf . Graph sg = new org . apache . clerezza . commons . rdf . impl . utils . simple . SimpleGraph ( graph ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "<sp>...<sp>{}:<sp>{}" , sg . getClass ( ) . getSimpleName ( ) , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) ; start = java . lang . System . currentTimeMillis ( ) ; org . apache . clerezza . commons . rdf . Graph ig = new org . apache . stanbol . commons . indexedgraph . IndexedGraph ( graph ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "<sp>...<sp>{}:<sp>{}" , ig . getClass ( ) . getSimpleName ( ) , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . TestCase testCase = new org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . TestCase ( sg , 20 , 5 , 20 ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "Filter<sp>Performance<sp>Test<sp>(graph<sp>size<sp>{}<sp>triples,<sp>iterations<sp>{})" , graphsize , iterations ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "<sp>---<sp>TEST<sp>{}<sp>with<sp>{}<sp>triples<sp>---" , sg . getClass ( ) . getSimpleName ( ) , sg . size ( ) ) ; start = java . lang . System . currentTimeMillis ( ) ; java . util . List < java . lang . Long > sgr = executeTest ( sg , testCase , iterations ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "<sp>---<sp>TEST<sp>completed<sp>in<sp>{}ms" , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "<sp>---<sp>TEST<sp>{}<sp>{}<sp>triples<sp>---" , ig . getClass ( ) . getSimpleName ( ) , sg . size ( ) ) ; start = java . lang . System . currentTimeMillis ( ) ; java . util . List < java . lang . Long > igr = executeTest ( ig , testCase , iterations ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "<sp>---<sp>TEST<sp>completed<sp>in<sp>{}ms" , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) ; "<AssertPlaceHolder>" ; } executeTest ( org . apache . clerezza . commons . rdf . Graph , org . apache . stanbol . commons . indexedgraph . IndexedGraphTest$TestCase , int ) { java . util . List < java . lang . Long > testResults = new java . util . ArrayList < java . lang . Long > ( ) ; long start ; long resultCount ; start = java . lang . System . currentTimeMillis ( ) ; resultCount = testSPO ( graph , test , testCount ) ; testResults . add ( new java . lang . Long ( resultCount ) ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "...<sp>run<sp>[S,P,O]<sp>in<sp>{}ms<sp>with<sp>{}<sp>results" , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) , resultCount ) ; start = java . lang . System . currentTimeMillis ( ) ; resultCount = testSPn ( graph , test , testCount ) ; testResults . add ( new java . lang . Long ( resultCount ) ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "...<sp>run<sp>[S,P,n]<sp>in<sp>{}ms<sp>with<sp>{}<sp>results" , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) , resultCount ) ; start = java . lang . System . currentTimeMillis ( ) ; resultCount = testSnO ( graph , test , testCount ) ; testResults . add ( new java . lang . Long ( resultCount ) ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "...<sp>run<sp>[S,n,O]<sp>in<sp>{}ms<sp>with<sp>{}<sp>results" , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) , resultCount ) ; start = java . lang . System . currentTimeMillis ( ) ; resultCount = testnPO ( graph , test , testCount ) ; testResults . add ( new java . lang . Long ( resultCount ) ) ; org . apache . stanbol . commons . indexedgraph . IndexedGraphTest . log . info ( "...<sp>run<sp>[n,P,O]<sp>in<sp>{}ms<sp>with<sp>{}<sp>results" , ( ( java . lang . System . currentTimeMillis ( ) ) - start ) , resultCount ) ; start = java . lang . System . currentTimeMillis ( ) ; resultCount = testSnn ( graph , test , testCount ) ; testResults . add ( new java . lang . Long ( resultCount ) ) ; 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 . lang . StringBuilder sb = new java . lang . StringBuilder ( shortSummary ( ) ) ; if ( this . keepTaskList ) { for ( org . audit4j . core . util . StopWatch . TaskInfo task : getTaskInfo ( ) ) { sb . append ( ";<sp>[" ) . append ( task . getTaskName ( ) ) . append ( "]<sp>took<sp>" ) . append ( task . getTimeMillis ( ) ) ; long percent = java . lang . Math . round ( ( ( 100.0 * ( task . getTimeSeconds ( ) ) ) / ( getTotalTimeSeconds ( ) ) ) ) ; sb . append ( "<sp>=<sp>" ) . append ( percent ) . append ( "%" ) ; } } else { sb . append ( ";<sp>no<sp>task<sp>info<sp>kept" ) ; } return sb . toString ( ) ; } | 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 com . flagstone . transform . coder . Context ( ) ; fixture = new com . flagstone . transform . button . ButtonColorTransform ( decoder , context ) ; "<AssertPlaceHolder>" ; } | 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 size ; } | 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>order<sp>by<sp>salary<sp>asc<sp>rows<sp>unbounded<sp>preceding)<sp>as<sp>first_val<sp>from<sp>" ) + "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>" 2 ) ) , com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . EMP5_REF , useSpark ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . WindowFunctionIT . methodWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "EMPNO<sp>|SALARY<sp>|DEPTNO<sp>|<sp>FIRST_VAL<sp>|\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "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>" 4 + "<sp>10<sp>|<sp>12000<sp>|<sp>5<sp>|<sp>1<sp>|\n" ) + "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>" 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>" 6 ) + "<sp>13<sp>|<sp>9000<sp>|<sp>1<sp>|<sp>1<sp>|\n" ) + "<sp>14<sp>|<sp>7500<sp>|<sp>1<sp>|<sp>1<sp>|\n" ) + "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>" 3 ) + "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>" 8 ) + "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>" 5 ) + "<sp>18<sp>|<sp>7700<sp>|<sp>2<sp>|<sp>0<sp>|\n" ) + "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>" 0 ) + "<sp>20<sp>|<sp>6900<sp>|<sp>3<sp>|<sp>0<sp>|\n" ) + "<sp>21<sp>|<sp>7500<sp>|<sp>3<sp>|<sp>0<sp>|\n" ) + "<sp>22<sp>|<sp>6500<sp>|<sp>4<sp>|<sp>0<sp>|\n" ) + "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>" 9 ) + "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>" 7 ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; } | 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 . openscience . cdk . interfaces . IAtom . class , mock . getClass ( ) ) ; org . openscience . cdk . interfaces . IAtom instance = factory . ofClass ( mock . getClass ( ) , this ) ; } implementorsOf ( java . lang . Class ) { java . util . Set < java . lang . Class < ? > > implementations = new java . util . HashSet < java . lang . Class < ? > > ( 5 ) ; for ( org . openscience . cdk . DynamicFactory . ConstructorKey key : lookup . getConstructors ( intf ) ) { implementations . add ( get ( key ) . getDeclaringClass ( ) ) ; } return implementations ; } | 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 . eclipse . elk . alg . layered . graph . LPort [ ] leftOuterPorts = addPortsOnSide ( 2 , leftOuterNode , PortSide . EAST ) ; org . eclipse . elk . alg . layered . graph . LPort [ ] rightOuterPorts = addPortsOnSide ( 2 , rightOuterNode , PortSide . WEST ) ; addEdgeBetweenPorts ( leftOuterPorts [ 0 ] , rightOuterPorts [ 1 ] ) ; addEdgeBetweenPorts ( leftOuterPorts [ 1 ] , rightOuterPorts [ 0 ] ) ; makeNestedTwoNodeGraphWithWesternPorts ( rightOuterNode , rightOuterPorts ) ; setUpAndMinimizeCrossings ( ) ; java . util . List < org . eclipse . elk . alg . layered . p3order . GraphInfoHolder > graphData = crossMin . getGraphData ( ) ; for ( org . eclipse . elk . alg . layered . p3order . GraphInfoHolder data : graphData ) { if ( data . hasParent ( ) ) { "<AssertPlaceHolder>" ; } } } dontSweepInto ( ) { return useBottomUp ; } | 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 = favoritesService . queryCollectList ( weixinId ) ; "<AssertPlaceHolder>" ; } queryCollectList ( java . lang . String ) { java . util . List < com . micro . rent . biz . personal . vo . HouseVo > houseList = favoritesDao . queryCollectList ( weixinId ) ; for ( com . micro . rent . biz . personal . vo . HouseVo house : houseList ) { java . lang . String picture = findHousePicByHouseId ( house . getHouseId ( ) ) ; house . setPicture ( picture ) ; } return houseList ; } | 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 ) || ( ( locales . length ) == 0 ) ? java . util . Locale . getDefault ( ) : locales [ 0 ] ; } | 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>A<sp>(1)\n" ; java . lang . String actual = com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree ) ; "<AssertPlaceHolder>" ; } prettyPrint ( com . googlecode . concurrenttrees . radix . node . util . PrettyPrintable ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; com . googlecode . concurrenttrees . common . PrettyPrinter . prettyPrint ( tree . getNode ( ) , sb , "" , true , true ) ; return sb . toString ( ) ; } | 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 . factory ( com . google . cloud . tools . jib . registry . BlobCheckerIntegrationTest . EVENT_DISPATCHER , "localhost:5000" , "busybox" ) . setAllowInsecureRegistries ( true ) . newRegistryClient ( ) ; com . google . cloud . tools . jib . image . DescriptorDigest fakeBlobDigest = com . google . cloud . tools . jib . image . DescriptorDigest . fromHash ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ) ; "<AssertPlaceHolder>" ; } checkBlob ( com . google . cloud . tools . jib . image . DescriptorDigest ) { com . google . cloud . tools . jib . registry . BlobChecker blobChecker = new com . google . cloud . tools . jib . registry . BlobChecker ( registryEndpointRequestProperties , blobDigest ) ; return callRegistryEndpoint ( blobChecker ) ; } | 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.