input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testWrongCharacterInHex ( ) { java . lang . String header = "Digest<sp>nc=я" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . HttpParser . parseAuthorizationDigest ( input ) ; "<AssertPlaceHolder>" ; } parseAuthorizationDigest ( java . io . StringReader ) { java . util . Map < java . lang . String , java . lang . String > result = new java . util . HashMap ( ) ; if ( ( org . apache . tomcat . util . http . parser . HttpParser . skipConstant ( input , "Digest" ) ) != ( org . apache . tomcat . util . http . parser . HttpParser . SkipConstantResult . FOUND ) ) { return null ; } java . lang . String field = org . apache . tomcat . util . http . parser . HttpParser . readToken ( input ) ; if ( field == null ) { return null ; } while ( ! ( field . equals ( "" ) ) ) { if ( ( org . apache . tomcat . util . http . parser . HttpParser . skipConstant ( input , "=" ) ) != ( org . apache . tomcat . util . http . parser . HttpParser . SkipConstantResult . FOUND ) ) { return null ; } java . lang . String value = null ; java . lang . Integer type = org . apache . tomcat . util . http . parser . HttpParser . fieldTypes . get ( field . toLowerCase ( Locale . ENGLISH ) ) ; if ( type == null ) { type = org . apache . tomcat . util . http . parser . HttpParser . FIELD_TYPE_TOKEN_OR_QUOTED_STRING ; } switch ( type . intValue ( ) ) { case 0 : value = org . apache . tomcat . util . http . parser . HttpParser . readToken ( input ) ; break ; case 1 : value = org . apache . tomcat . util . http . parser . HttpParser . readQuotedString ( input , false ) ; break ; case 2 : value = org . apache . tomcat . util . http . parser . HttpParser . readTokenOrQuotedString ( input , false ) ; break ; case 3 : value = org . apache . tomcat . util . http . parser . HttpParser . readLhex ( input ) ; break ; case 4 : value = org . apache . tomcat . util . http . parser . HttpParser . readQuotedToken ( input ) ; break ; default : throw new java . lang . IllegalArgumentException ( "TODO<sp>i18n:<sp>Unsupported<sp>type" ) ; } if ( value == null ) { return null ; } result . put ( field , value ) ; if ( ( org . apache . tomcat . util . http . parser . HttpParser . skipConstant ( input , "," ) ) == ( org . apache . tomcat . util . http . parser . HttpParser . SkipConstantResult . NOT_FOUND ) ) { return null ; } field = org . apache . tomcat . util . http . parser . HttpParser . readToken ( input ) ; if ( field == null ) { return null ; } } return result ; }
|
org . junit . Assert . assertNull ( result )
|
container_null ( ) { biweekly . io . json . JCalSerializerTest . Container container = new biweekly . io . json . JCalSerializerTest . Container ( null ) ; java . io . StringWriter result = new java . io . StringWriter ( ) ; mapper . writeValue ( result , container ) ; java . lang . String actual = result . toString ( ) ; java . lang . String expected = "{" + ( "\"events\":null" + "}" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getValue ( ICalVersion . V2_0 ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
after_step_hook_scenario_contains_before_step_hook_failure_when_before_step_hook_does_not_pass ( ) { java . lang . Throwable expectedError = new org . junit . AssumptionViolatedException ( "oops" ) ; doThrow ( expectedError ) . when ( beforeHookDefinition ) . execute ( any ( cucumber . runner . Scenario . class ) ) ; doThrow ( new java . lang . Exception ( ) ) . when ( afterHookDefinition ) . execute ( argThat ( cucumber . runner . PickleStepTestStepTest . scenarioDoesNotHave ( expectedError ) ) ) ; step . run ( testCase , bus , scenario , false ) ; "<AssertPlaceHolder>" ; } getError ( ) { if ( ( result ) == null ) { return null ; } switch ( result . getStatus ( ) ) { case FAILED : case AMBIGUOUS : return result . getError ( ) ; case PENDING : if ( strict ) { return result . getError ( ) ; } else { return new org . testng . SkipException ( result . getErrorMessage ( ) , result . getError ( ) ) ; } case UNDEFINED : if ( strict ) { return new cucumber . runtime . CucumberException ( cucumber . api . testng . TestCaseResultListener . UNDEFINED_MESSAGE ) ; } else { return new org . testng . SkipException ( cucumber . api . testng . TestCaseResultListener . UNDEFINED_MESSAGE ) ; } case SKIPPED : java . lang . Throwable error = result . getError ( ) ; if ( error != null ) { if ( error instanceof org . testng . SkipException ) { return error ; } else { return new org . testng . SkipException ( result . getErrorMessage ( ) , error ) ; } } else { return new org . testng . SkipException ( cucumber . api . testng . TestCaseResultListener . SKIPPED_MESSAGE ) ; } case PASSED : return null ; default : throw new java . lang . IllegalStateException ( ( "Unexpected<sp>result<sp>status:<sp>" + ( result . getStatus ( ) ) ) ) ; } }
|
org . junit . Assert . assertThat ( scenario . getError ( ) , org . hamcrest . core . Is . is ( expectedError ) )
|
classifyPersonTest ( ) { try { com . google . api . services . plus . model . Person person = new com . google . api . services . plus . model . Person ( ) ; person . setKind ( "plus#person" ) ; java . lang . Class retClass = org . apache . streams . gplus . serializer . util . GPlusEventClassifier . detectClass ( org . apache . streams . gplus . serializer . util . GPlusEventClassifierTest . mapper . writeValueAsString ( person ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception ex ) { } } detectClass ( java . lang . String ) { java . util . Objects . requireNonNull ( json ) ; com . google . common . base . Preconditions . checkArgument ( org . apache . commons . lang . StringUtils . isNotEmpty ( json ) ) ; com . fasterxml . jackson . databind . node . ObjectNode objectNode ; try { objectNode = ( ( com . fasterxml . jackson . databind . node . ObjectNode ) ( org . apache . streams . gplus . serializer . util . GPlusEventClassifier . mapper . readTree ( json ) ) ) ; } catch ( java . io . IOException ex ) { ex . printStackTrace ( ) ; return null ; } if ( ( ( objectNode . findValue ( "kind" ) ) != null ) && ( objectNode . get ( "kind" ) . toString ( ) . equals ( org . apache . streams . gplus . serializer . util . GPlusEventClassifier . ACTIVITY_IDENTIFIER ) ) ) { return com . google . api . services . plus . model . Activity . class ; } else if ( ( ( objectNode . findValue ( "kind" ) ) != null ) && ( objectNode . get ( "kind" ) . toString ( ) . equals ( org . apache . streams . gplus . serializer . util . GPlusEventClassifier . PERSON_IDENTIFIER ) ) ) { return com . google . api . services . plus . model . Person . class ; } else { return com . fasterxml . jackson . databind . node . ObjectNode . class ; } }
|
org . junit . Assert . assertEquals ( retClass , com . google . api . services . plus . model . Person . class )
|
testUpdateDockerPZInUseToSchedulerPZShouldFail ( ) { com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState createdPlacementZone = createPlacementZone ( "docker-placement-zone" , false ) ; "<AssertPlaceHolder>" ; createComputeState ( createdPlacementZone ) ; com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState patchState = new com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState ( ) ; markSchedulerPlacementZone ( patchState ) ; try { doPatch ( patchState , createdPlacementZone . documentSelfLink ) ; org . junit . Assert . fail ( ( "PATCH<sp>should<sp>fail<sp>to<sp>update<sp>the<sp>type<sp>of<sp>a<sp>used<sp>" + "docker<sp>placement<sp>zone<sp>to<sp>a<sp>scheduler<sp>zone" ) ) ; } catch ( java . lang . Exception ex ) { verifyExceptionMessage ( ex , SchedulerPlacementZoneInterceptor . NON_SCHEDULER_HOST_IN_PLACEMENT_ZONE_MESSAGE ) ; } } createPlacementZone ( java . lang . String , boolean ) { com . vmware . photon . controller . model . resources . ResourcePoolService . ResourcePoolState resourcePoolState = createResourcePoolState ( placementZoneName , isSchedulerZone ) ; return createPlacementZone ( resourcePoolState ) ; }
|
org . junit . Assert . assertNotNull ( createdPlacementZone )
|
testIsValidIdCard ( ) { boolean result = cc . shanruifeng . functions . udfs . scalar . string . ChinaIdCardFunctions . isValidIdCard ( io . airlift . slice . Slices . utf8Slice ( "110101198901084517" ) ) ; "<AssertPlaceHolder>" ; } isValidIdCard ( io . airlift . slice . Slice ) { return cc . shanruifeng . functions . udfs . scalar . string . ChinaIdCardFunctions . isValidIdCard ( card . toStringUtf8 ( ) ) ; }
|
org . junit . Assert . assertEquals ( true , result )
|
shouldRefreshWithValidClusterConfig ( ) { com . couchbase . client . core . ClusterFacade cluster = mock ( com . couchbase . client . core . ClusterFacade . class ) ; com . couchbase . client . core . config . refresher . CarrierRefresher refresher = new com . couchbase . client . core . config . refresher . CarrierRefresher ( com . couchbase . client . core . config . refresher . CarrierRefresherTest . ENVIRONMENT , cluster ) ; refresher . registerBucket ( "bucket" , "" ) ; com . couchbase . client . core . config . ConfigurationProvider provider = mock ( com . couchbase . client . core . config . ConfigurationProvider . class ) ; refresher . provider ( provider ) ; com . couchbase . client . core . config . ClusterConfig clusterConfig = mock ( com . couchbase . client . core . config . ClusterConfig . class ) ; com . couchbase . client . core . config . BucketConfig bucketConfig = mock ( com . couchbase . client . core . config . BucketConfig . class ) ; when ( bucketConfig . name ( ) ) . thenReturn ( "bucket" ) ; java . util . List < com . couchbase . client . core . config . NodeInfo > nodeInfos = new java . util . ArrayList < com . couchbase . client . core . config . NodeInfo > ( ) ; java . util . Map < java . lang . String , java . lang . Integer > ports = new java . util . HashMap < java . lang . String , java . lang . Integer > ( ) ; ports . put ( "direct" , 11210 ) ; nodeInfos . add ( new com . couchbase . client . core . config . DefaultNodeInfo ( null , "localhost:8091" , ports , null ) ) ; when ( bucketConfig . nodes ( ) ) . thenReturn ( nodeInfos ) ; java . util . Map < java . lang . String , com . couchbase . client . core . config . BucketConfig > bucketConfigs = new java . util . HashMap < java . lang . String , com . couchbase . client . core . config . BucketConfig > ( ) ; bucketConfigs . put ( "bucket" , bucketConfig ) ; when ( clusterConfig . bucketConfigs ( ) ) . thenReturn ( bucketConfigs ) ; io . netty . buffer . ByteBuf content = io . netty . buffer . Unpooled . copiedBuffer ( "{\"config\":<sp>true}" , CharsetUtil . UTF_8 ) ; when ( cluster . send ( any ( com . couchbase . client . core . message . kv . GetBucketConfigRequest . class ) ) ) . thenReturn ( rx . Observable . just ( ( ( com . couchbase . client . core . message . CouchbaseResponse ) ( new com . couchbase . client . core . message . kv . GetBucketConfigResponse ( com . couchbase . client . core . message . ResponseStatus . SUCCESS , KeyValueStatus . SUCCESS . code ( ) , "bucket" , content , com . couchbase . client . core . utils . NetworkAddress . localhost ( ) ) ) ) ) ) ; refresher . refresh ( clusterConfig ) ; java . lang . Thread . sleep ( 200 ) ; verify ( provider , times ( 1 ) ) . proposeBucketConfig ( any ( com . couchbase . client . core . config . ProposedBucketConfigContext . class ) ) ; "<AssertPlaceHolder>" ; } refCnt ( ) { return content . refCnt ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , content . refCnt ( ) )
|
testGetPropStringString ( ) { java . lang . String name1 = "alpha" ; java . lang . String name2 = "bravo" ; java . lang . String providerNo1 = "100" ; java . lang . String providerNo2 = "200" ; org . oscarehr . common . model . UserProperty userProperty1 = new org . oscarehr . common . model . UserProperty ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( userProperty1 ) ; userProperty1 . setName ( name1 ) ; userProperty1 . setProviderNo ( providerNo1 ) ; dao . persist ( userProperty1 ) ; org . oscarehr . common . model . UserProperty userProperty2 = new org . oscarehr . common . model . UserProperty ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( userProperty2 ) ; userProperty2 . setProviderNo ( name2 ) ; userProperty2 . setProviderNo ( providerNo2 ) ; dao . persist ( userProperty2 ) ; org . oscarehr . common . model . UserProperty expectedResult = userProperty1 ; org . oscarehr . common . model . UserProperty result = dao . getProp ( providerNo1 , name1 ) ; "<AssertPlaceHolder>" ; } getProp ( java . lang . String , java . lang . String ) { javax . persistence . Query query = entityManager . createQuery ( "select<sp>p<sp>from<sp>UserProperty<sp>p<sp>where<sp>p.providerNo<sp>=<sp>?<sp>and<sp>p.name<sp>=<sp>?" ) ; query . setParameter ( 1 , prov ) ; query . setParameter ( 2 , name ) ; @ org . oscarehr . common . dao . SuppressWarnings ( "unchecked" ) java . util . List < org . oscarehr . common . model . UserProperty > list = query . getResultList ( ) ; if ( ( list != null ) && ( ( list . size ( ) ) > 0 ) ) { org . oscarehr . common . model . UserProperty prop = list . get ( 0 ) ; return prop ; } else return null ; }
|
org . junit . Assert . assertEquals ( expectedResult , result )
|
testFindByClientId ( ) { int clientId1 = 101 ; int clientId2 = 202 ; org . oscarehr . PMmodule . model . VacancyClientMatch vCM1 = new org . oscarehr . PMmodule . model . VacancyClientMatch ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vCM1 ) ; vCM1 . setClient_id ( clientId1 ) ; dao . persist ( vCM1 ) ; org . oscarehr . PMmodule . model . VacancyClientMatch vCM2 = new org . oscarehr . PMmodule . model . VacancyClientMatch ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vCM2 ) ; vCM2 . setClient_id ( clientId2 ) ; dao . persist ( vCM2 ) ; org . oscarehr . PMmodule . model . VacancyClientMatch vCM3 = new org . oscarehr . PMmodule . model . VacancyClientMatch ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vCM3 ) ; vCM3 . setClient_id ( clientId1 ) ; dao . persist ( vCM3 ) ; org . oscarehr . PMmodule . model . VacancyClientMatch vCM4 = new org . oscarehr . PMmodule . model . VacancyClientMatch ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vCM4 ) ; vCM4 . setClient_id ( clientId2 ) ; dao . persist ( vCM4 ) ; org . oscarehr . PMmodule . model . VacancyClientMatch vCM5 = new org . oscarehr . PMmodule . model . VacancyClientMatch ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vCM5 ) ; vCM5 . setClient_id ( clientId2 ) ; dao . persist ( vCM5 ) ; java . util . List < org . oscarehr . PMmodule . model . VacancyClientMatch > expectedResult = new java . util . ArrayList < org . oscarehr . PMmodule . model . VacancyClientMatch > ( java . util . Arrays . asList ( vCM2 , vCM4 , vCM5 ) ) ; java . util . List < org . oscarehr . PMmodule . model . VacancyClientMatch > result = dao . findByClientId ( clientId2 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
|
org . junit . Assert . assertTrue ( true )
|
testEqualsHashCode ( ) { final java . util . HashSet < org . kairosdb . core . DataPoint > dataPointsSet = new java . util . HashSet ( org . kairosdb . core . datapoints . DataPointTestCommon . dataPointList ) ; "<AssertPlaceHolder>" ; } size ( ) { return errors . size ( ) ; }
|
org . junit . Assert . assertEquals ( org . kairosdb . core . datapoints . DataPointTestCommon . dataPointList . size ( ) , dataPointsSet . size ( ) )
|
isNotLateIfNotStarted ( ) { expect ( mockClock . getGranularity ( ) ) . andReturn ( 1L ) . anyTimes ( ) ; expect ( mockClock . getNanoTime ( ) ) . andReturn ( new org . fishwife . jrugged . interval . DiscreteInterval ( 4L , 5L ) ) . anyTimes ( ) ; replay ( mockClock ) ; impl . set ( 1000L , 100L ) ; "<AssertPlaceHolder>" ; verify ( mockClock ) ; } isLate ( ) { if ( ( startTime ) == null ) return false ; return ( clock . getNanoTime ( ) . getMax ( ) ) > ( targetEndTime . getMax ( ) ) ; }
|
org . junit . Assert . assertFalse ( impl . isLate ( ) )
|
testContextRootUrlRewrite ( ) { java . lang . String contextRootURL = ( "http://localhost:" + ( org . apache . hadoop . hive . llap . daemon . services . impl . TestLlapWebServices . llapWSPort ) ) + "/" ; java . lang . String contextRootContent = getURLResponseAsString ( contextRootURL ) ; java . lang . String indexHtmlUrl = ( "http://localhost:" + ( org . apache . hadoop . hive . llap . daemon . services . impl . TestLlapWebServices . llapWSPort ) ) + "/index.html" ; java . lang . String indexHtmlContent = getURLResponseAsString ( indexHtmlUrl ) ; "<AssertPlaceHolder>" ; } getURLResponseAsString ( java . lang . String ) { java . net . URL url = new java . net . URL ( baseURL ) ; java . net . HttpURLConnection conn = ( ( java . net . HttpURLConnection ) ( url . openConnection ( ) ) ) ; org . junit . Assert . assertEquals ( HttpURLConnection . HTTP_OK , conn . getResponseCode ( ) ) ; java . io . StringWriter writer = new java . io . StringWriter ( ) ; org . apache . commons . io . IOUtils . copy ( conn . getInputStream ( ) , writer , "UTF-8" ) ; return writer . toString ( ) ; }
|
org . junit . Assert . assertEquals ( contextRootContent , indexHtmlContent )
|
testingGentypeSharedConsumerFromInterface ( ) { java . lang . String [ ] testArgs = new java . lang . String [ ] { "-genType" 1 , "-genType" 7 , "-genType" , "SharedConsumer" , "-interface" , "org/ebayopensource/turmeric/tools/codegen/AdminV1.java" , "-dest" , destDir . getAbsolutePath ( ) , "-genType" 8 , ( destDir . getAbsolutePath ( ) ) + "/gen-src/client" , "-genType" 2 , destDir . getAbsolutePath ( ) , "-bin" , binDir . getAbsolutePath ( ) , "-genType" 4 , "-genType" 9 , "-genType" 3 , "-genType" 0 , "-genType" 5 , prDir . getAbsolutePath ( ) , "-adminname" , "AdminV1" } ; createInterfacePropsFile ( intfProper , destDir . getAbsolutePath ( ) ) ; performDirectCodeGen ( testArgs , binDir ) ; java . lang . String path = ( destDir . getAbsolutePath ( ) ) + "/gen-src/client/org/ebayopensource/turmeric/tools/codegen/adminv1/gen/SharedAdminV1Consumer.java" ; java . io . File sharedConsumer = new java . io . File ( path ) ; "<AssertPlaceHolder>" ; } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
|
org . junit . Assert . assertTrue ( ( path + "-genType" 6 ) , sharedConsumer . exists ( ) )
|
testDeleteAllFolders ( ) { com . liferay . portal . kernel . model . Group group = com . liferay . portal . kernel . test . util . GroupTestUtil . addGroup ( ) ; com . liferay . bookmarks . model . BookmarksFolder parentFolder = com . liferay . bookmarks . test . util . BookmarksTestUtil . addFolder ( group . getGroupId ( ) , "parent" ) ; com . liferay . bookmarks . model . BookmarksFolder childFolder = com . liferay . bookmarks . test . util . BookmarksTestUtil . addFolder ( group . getGroupId ( ) , parentFolder . getFolderId ( ) , "child" ) ; com . liferay . bookmarks . service . BookmarksFolderServiceUtil . moveFolderToTrash ( childFolder . getPrimaryKey ( ) ) ; com . liferay . bookmarks . service . BookmarksFolderServiceUtil . moveFolderToTrash ( parentFolder . getPrimaryKey ( ) ) ; com . liferay . bookmarks . service . BookmarksFolderServiceUtil . deleteFolder ( parentFolder . getFolderId ( ) ) ; com . liferay . portal . kernel . service . GroupLocalServiceUtil . deleteGroup ( group ) ; java . util . List < com . liferay . bookmarks . model . BookmarksFolder > folders = com . liferay . bookmarks . service . BookmarksFolderLocalServiceUtil . getFolders ( group . getGroupId ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( folders . toString ( ) , 0 , folders . size ( ) )
|
testGetInclNoLocationClassesFalse ( ) { org . jacoco . core . runtime . AgentOptions options = new org . jacoco . core . runtime . AgentOptions ( "inclnolocationclasses=false" ) ; "<AssertPlaceHolder>" ; } getInclNoLocationClasses ( ) { return getOption ( org . jacoco . core . runtime . AgentOptions . INCLNOLOCATIONCLASSES , false ) ; }
|
org . junit . Assert . assertFalse ( options . getInclNoLocationClasses ( ) )
|
getBuiltInDatatype ( ) { "<AssertPlaceHolder>" ; } getBuiltInDatatype ( ) { org . junit . Assert . assertEquals ( org . semanticweb . owlapi . api . test . literals . RDF_PLAIN_LITERAL , plainLiteral . getBuiltInDatatype ( ) ) ; }
|
org . junit . Assert . assertEquals ( org . semanticweb . owlapi . api . test . literals . RDF_PLAIN_LITERAL , plainLiteral . getBuiltInDatatype ( ) )
|
should_set_exact_soft_clip_bounds ( ) { au . edu . wehi . idsv . StructuralVariationCallBuilder builder = new au . edu . wehi . idsv . StructuralVariationCallBuilder ( getContext ( ) , ( ( au . edu . wehi . idsv . VariantContextDirectedEvidence ) ( new au . edu . wehi . idsv . IdsvVariantContextBuilder ( getContext ( ) ) { { breakpoint ( new au . edu . wehi . idsv . BreakpointSummary ( 0 , FWD , 11 , 11 , 12 , 0 , BWD , 10 , 10 , 10 ) , "" ) ; phredScore ( 10 ) ; } } . make ( ) ) ) ) ; builder . addEvidence ( SR ( withSequence ( "NNNN" , Read ( 0 , 12 , "1M3S" ) ) [ 0 ] , withSequence ( "NNN" , Read ( 0 , 10 , "3M" ) ) [ 0 ] ) ) ; au . edu . wehi . idsv . VariantContextDirectedEvidence de = builder . make ( ) ; "<AssertPlaceHolder>" ; } getBreakendSummary ( ) { return breakend ; }
|
org . junit . Assert . assertEquals ( new au . edu . wehi . idsv . BreakpointSummary ( 0 , FWD , 12 , 12 , 12 , 0 , BWD , 10 , 10 , 10 ) , de . getBreakendSummary ( ) )
|
testBuildReportChunkSuccessfull2 ( ) { dchunk . setContent ( odata ) ; instance . buildReportChunk ( dchunk , doc , true ) ; java . util . ArrayList < java . lang . Object [ ] > events = docListener . getCapturedEvents ( ) ; "<AssertPlaceHolder>" ; java . lang . Object [ ] event = events . get ( 0 ) ; confirmParagraphAdded ( event , "CONTEXT:<sp>ERROR" ) ; event = events . get ( 1 ) ; confirmParagraphAdded ( event , ( "GROUP:<sp>" + ( group ) ) ) ; event = events . get ( 2 ) ; confirmParagraphAdded ( event , ( "RULE:<sp>" + ( rule ) ) ) ; event = events . get ( 3 ) ; confirmParagraphAdded ( event , "TAGS:<sp>'tag1'<sp>'tag2'" ) ; event = events . get ( 4 ) ; confirmPdfPTableAdded ( event , odata ) ; } getCapturedEvents ( ) { return capturedEvents ; }
|
org . junit . Assert . assertTrue ( ( ( events . size ( ) ) == 5 ) )
|
removetest1 ( ) { com . bt . bcos . adapter . AdapterIf bcosAdapter = new org . opennms . xmlclient . bcos . OpenNmsBcosAdapter ( ) ; java . lang . String service = "" ; java . lang . String machine_ident = "BTNode1" ; "<AssertPlaceHolder>" ; } remove ( javax . management . ObjectName , javax . management . MBeanAttributeInfo ) { mbeanResultMap . get ( objectName ) . attributeResult . attributes . remove ( eachAttribute ) ; }
|
org . junit . Assert . assertTrue ( bcosAdapter . remove ( service , machine_ident ) )
|
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody ( ) { final com . azure . common . entities . HttpBinJSON result = createService ( com . azure . common . implementation . RestProxyTests . Service19 . class ) . putWithHeaderApplicationJsonContentTypeAndCharsetAndStringBody ( "" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( "" , result . data )
|
testPoolSize2 ( ) { java . lang . String host = "192.168.1.107" ; int port = 6379 ; int connectionPoolSize = 5 ; final org . cyy . fw . nedis . NedisClient client = new org . cyy . fw . nedis . NedisClientBuilder ( ) . setServerHost ( host ) . setPort ( port ) . setConnectTimeoutMills ( 5000 ) . setConnectionPoolSize ( connectionPoolSize ) . build ( ) ; try { final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; client . get ( null , "key1" ) ; client . get ( null , "key2" ) ; client . get ( new org . cyy . fw . nedis . ResponseCallback < java . lang . String > ( ) { @ org . cyy . fw . nedis . test . connection . Override public void failed ( java . lang . Throwable cause ) { } @ org . cyy . fw . nedis . test . connection . Override public void done ( java . lang . String result ) { latch . countDown ( ) ; } } , "key3" ) ; latch . await ( ) ; java . lang . Thread . sleep ( 5000 ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } finally { client . shutdown ( ) ; } } getIdleConnections ( ) { checkStatus ( ) ; return connectionPool . idleSize ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , client . getIdleConnections ( ) )
|
testBigDecimal ( ) { final java . math . BigDecimal bd = new java . math . BigDecimal ( "123456.789" ) ; final byte [ ] buf = commons . serialization . hessian . Hessian2Serialization . serialize ( bd ) ; final java . math . BigDecimal exp = ( ( java . math . BigDecimal ) ( commons . serialization . hessian . Hessian2Serialization . deserialize ( buf ) ) ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] ) { final java . io . ByteArrayInputStream is = new java . io . ByteArrayInputStream ( buf ) ; final com . caucho . hessian . io . AbstractHessianInput input = commons . serialization . hessian . Hessian2Serialization . getAndCreateInput ( is ) ; try { return ( ( O ) ( input . readObject ( ) ) ) ; } finally { try { is . close ( ) ; } catch ( java . io . IOException ignore ) { } } }
|
org . junit . Assert . assertTrue ( ( ( bd . compareTo ( exp ) ) == 0 ) )
|
writeBeanIfValid_hasBindings_singleEvent ( ) { binder . forField ( nameField ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; binder . readBean ( item ) ; binder . addStatusChangeListener ( this :: statusChanged ) ; "<AssertPlaceHolder>" ; binder . writeBeanIfValid ( item ) ; verifyEvent ( ) ; } get ( ) { return com . vaadin . flow . dom . impl . BasicTextElementStateProvider . INSTANCE ; }
|
org . junit . Assert . assertNull ( event . get ( ) )
|
constructFromInet6AddressWithScopeId ( ) { byte [ ] bytes = com . googlecode . ipv6 . IPv6Address . fromString ( "2001:db8:85a3::8a2e:370:7334" ) . toByteArray ( ) ; final java . net . InetAddress inetAddress = java . net . Inet6Address . getByAddress ( "host" , bytes , 12 ) ; "<AssertPlaceHolder>" ; } fromInetAddress ( java . net . InetAddress ) { if ( inetAddress == null ) throw new java . lang . IllegalArgumentException ( "can<sp>not<sp>construct<sp>from<sp>[null]" ) ; return com . googlecode . ipv6 . IPv6Address . fromByteArray ( inetAddress . getAddress ( ) ) ; }
|
org . junit . Assert . assertEquals ( "2001:db8:85a3::8a2e:370:7334" , com . googlecode . ipv6 . IPv6Address . fromInetAddress ( inetAddress ) . toString ( ) )
|
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . ClusterGroup > clusterGroups = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( clusterGroups . isEmpty ( ) )
|
testGet ( ) { com . dongsw . authority . model . RolePermissions result = rolePermissionsService . get ( java . lang . Integer . valueOf ( 0 ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { return dao . unique ( id ) ; }
|
org . junit . Assert . assertEquals ( new com . dongsw . authority . model . RolePermissions ( ) , result )
|
testEnsureBucketCountHonoured ( ) { for ( int count = 1 ; count < 100 ; count ++ ) { org . apache . activemq . artemis . core . server . impl . MessageGroups < java . lang . String > messageGroups = new org . apache . activemq . artemis . core . server . impl . BucketMessageGroups ( count ) ; for ( int i = 0 ; i < 100 ; i ++ ) { messageGroups . put ( org . apache . activemq . artemis . core . server . impl . BucketMessageGroups . toGroupBucketIntKey ( i ) , ( "world" + i ) ) ; } "<AssertPlaceHolder>" ; } } size ( ) { return connectors . size ( ) ; }
|
org . junit . Assert . assertEquals ( count , messageGroups . size ( ) )
|
testEqualsForEqualityOfPrimitiveAnObjectArrays ( ) { double [ ] a1 = new double [ ] { 1.0 , 2.0 , 3.0 , 4.0 } ; java . lang . Double [ ] a2 = new java . lang . Double [ ] { 1.0 , 2.0 , 3.0 , 4.0 } ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object , java . lang . Object ) { if ( ( array1 == null ) || ( array2 == null ) ) { return false ; } if ( ( ! ( array1 . getClass ( ) . isArray ( ) ) ) || ( ! ( array2 . getClass ( ) . isArray ( ) ) ) ) { return false ; } if ( array1 == array2 ) { return true ; } int len = java . lang . reflect . Array . getLength ( array1 ) ; if ( len != ( java . lang . reflect . Array . getLength ( array2 ) ) ) { return false ; } for ( int i = 0 ; i < len ; i ++ ) { java . lang . Object value1 = java . lang . reflect . Array . get ( array1 , i ) ; java . lang . Object value2 = java . lang . reflect . Array . get ( array2 , i ) ; if ( value1 == null ) { if ( value2 != null ) { return false ; } continue ; } else if ( value2 == null ) { return false ; } if ( value1 . getClass ( ) . isArray ( ) ) { if ( ! ( cz . zcu . kiv . jop . util . ArrayUtils . equals ( value1 , value2 ) ) ) { return false ; } continue ; } if ( ! ( value1 . equals ( value2 ) ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertTrue ( cz . zcu . kiv . jop . util . ArrayUtils . equals ( a1 , a2 ) )
|
overrideDefaultStyleTest ( ) { com . itextpdf . styledxmlparser . css . ICssResolver styleResolver = new com . itextpdf . svg . css . impl . SvgStyleResolver ( ) ; com . itextpdf . styledxmlparser . jsoup . nodes . Element svg = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "svg" ) , "" ) ; svg . attributes ( ) . put ( SvgConstants . Attributes . STROKE , "white" ) ; com . itextpdf . styledxmlparser . node . INode svgNode = new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( svg ) ; java . util . Map < java . lang . String , java . lang . String > resolvedStyles = styleResolver . resolveStyles ( svgNode , null ) ; "<AssertPlaceHolder>" ; } get ( int ) { return vals [ index ] ; }
|
org . junit . Assert . assertEquals ( "white" , resolvedStyles . get ( SvgConstants . Attributes . STROKE ) )
|
testGetRule ( ) { io . symcpe . hendrix . api . storage . Tenant tenant = io . symcpe . hendrix . api . dao . RulesManager . getInstance ( ) . getTenant ( em , io . symcpe . hendrix . api . dao . TestRulesManager . TENANT_ID_3 ) ; io . symcpe . hendrix . api . storage . Rules rule = new io . symcpe . hendrix . api . storage . Rules ( ) ; short ruleId = io . symcpe . hendrix . api . dao . RulesManager . getInstance ( ) . createNewRule ( em , rule , tenant ) ; io . symcpe . hendrix . api . storage . Rules rule2 = io . symcpe . hendrix . api . dao . RulesManager . getInstance ( ) . getRule ( em , ruleId ) ; "<AssertPlaceHolder>" ; } getRuleId ( ) { return ruleId ; }
|
org . junit . Assert . assertEquals ( ruleId , rule2 . getRuleId ( ) )
|
testGetIntWithKeyWithDefaultWithInvalidProperty ( ) { final edu . illinois . library . cantaloupe . config . Configuration instance = getInstance ( ) ; instance . setProperty ( Key . MAX_PIXELS , "cats" ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String , int ) { try { return getInt ( key ) ; } catch ( java . util . NoSuchElementException | java . lang . NumberFormatException e ) { return defaultValue ; } }
|
org . junit . Assert . assertEquals ( 5 , instance . getInt ( Key . MAX_PIXELS , 5 ) )
|
testCreateBusinessObjectDataStorageUnit ( ) { org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES , DATA_VERSION ) ; org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey = new org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES , DATA_VERSION , STORAGE_NAME ) ; org . finra . herd . model . api . xml . StorageDirectory storageDirectory = new org . finra . herd . model . api . xml . StorageDirectory ( STORAGE_DIRECTORY_PATH ) ; java . util . List < org . finra . herd . model . api . xml . StorageFile > storageFiles = java . util . Arrays . asList ( new org . finra . herd . model . api . xml . StorageFile ( FILE_NAME , FILE_SIZE , ROW_COUNT ) , new org . finra . herd . model . api . xml . StorageFile ( FILE_NAME_2 , FILE_SIZE_2 , ROW_COUNT_2 ) ) ; org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitCreateRequest request = new org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitCreateRequest ( businessObjectDataStorageUnitKey , storageDirectory , storageFiles , NO_DISCOVER_STORAGE_FILES ) ; org . finra . herd . model . jpa . BusinessObjectDataEntity businessObjectDataEntity = new org . finra . herd . model . jpa . BusinessObjectDataEntity ( ) ; businessObjectDataEntity . setId ( org . finra . herd . service . impl . ID ) ; org . finra . herd . model . jpa . StorageEntity storageEntity = new org . finra . herd . model . jpa . StorageEntity ( ) ; storageEntity . setName ( org . finra . herd . service . impl . STORAGE_NAME ) ; java . util . List < org . finra . herd . model . jpa . StorageFileEntity > storageFileEntities = java . util . Arrays . asList ( new org . finra . herd . model . jpa . StorageFileEntity ( ) , new org . finra . herd . model . jpa . StorageFileEntity ( ) ) ; org . finra . herd . model . jpa . StorageUnitEntity storageUnitEntity = new org . finra . herd . model . jpa . StorageUnitEntity ( ) ; storageUnitEntity . setBusinessObjectData ( businessObjectDataEntity ) ; storageUnitEntity . setStorage ( storageEntity ) ; storageUnitEntity . setDirectoryPath ( org . finra . herd . service . impl . STORAGE_DIRECTORY_PATH ) ; storageUnitEntity . setStorageFiles ( storageFileEntities ) ; org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitCreateResponse expectedResponse = new org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitCreateResponse ( businessObjectDataStorageUnitKey , storageDirectory , storageFiles ) ; when ( storageUnitHelper . getBusinessObjectDataKey ( businessObjectDataStorageUnitKey ) ) . thenReturn ( businessObjectDataKey ) ; when ( businessObjectDataDaoHelper . getBusinessObjectDataEntity ( businessObjectDataKey ) ) . thenReturn ( businessObjectDataEntity ) ; when ( storageDaoHelper . getStorageEntity ( org . finra . herd . service . impl . STORAGE_NAME ) ) . thenReturn ( storageEntity ) ; when ( businessObjectDataDaoHelper . createStorageUnitEntity ( businessObjectDataEntity , storageEntity , storageDirectory , storageFiles , org . finra . herd . service . impl . NO_DISCOVER_STORAGE_FILES ) ) . thenReturn ( storageUnitEntity ) ; when ( businessObjectDataHelper . createBusinessObjectDataKeyFromEntity ( businessObjectDataEntity ) ) . thenReturn ( businessObjectDataKey ) ; when ( storageUnitHelper . createBusinessObjectDataStorageUnitKey ( businessObjectDataKey , org . finra . herd . service . impl . STORAGE_NAME ) ) . thenReturn ( businessObjectDataStorageUnitKey ) ; when ( storageFileHelper . createStorageFilesFromEntities ( storageFileEntities ) ) . thenReturn ( storageFiles ) ; org . finra . herd . model . api . xml . BusinessObjectDataStorageUnitCreateResponse result = businessObjectDataStorageUnitServiceImpl . createBusinessObjectDataStorageUnit ( request ) ; verify ( storageUnitHelper ) . validateBusinessObjectDataStorageUnitKey ( businessObjectDataStorageUnitKey ) ; verify ( storageFileHelper ) . validateCreateRequestStorageFiles ( storageFiles ) ; verify ( storageUnitHelper ) . getBusinessObjectDataKey ( businessObjectDataStorageUnitKey ) ; verify ( businessObjectDataDaoHelper ) . getBusinessObjectDataEntity ( businessObjectDataKey ) ; verify ( storageDaoHelper ) . getStorageEntity ( org . finra . herd . service . impl . STORAGE_NAME ) ; verify ( businessObjectDataDaoHelper ) . createStorageUnitEntity ( businessObjectDataEntity , storageEntity , storageDirectory , storageFiles , org . finra . herd . service . impl . NO_DISCOVER_STORAGE_FILES ) ; verify ( businessObjectDataHelper ) . createBusinessObjectDataKeyFromEntity ( businessObjectDataEntity ) ; verify ( storageUnitHelper ) . createBusinessObjectDataStorageUnitKey ( businessObjectDataKey , org . finra . herd . service . impl . STORAGE_NAME ) ; verify ( storageFileHelper ) . createStorageFilesFromEntities ( storageFileEntities ) ; verify ( storageUnitDao ) . saveAndRefresh ( storageUnitEntity ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
|
org . junit . Assert . assertEquals ( expectedResponse , result )
|
testConnAck_BrokerConnection_Accepted ( ) { attachClientAndBroker ( ) ; net . xenqtt . message . ConnAckMessage message = new net . xenqtt . message . ConnAckMessage ( net . xenqtt . message . ConnectReturnCode . ACCEPTED ) ; session . connAck ( channelToBroker , message ) ; verify ( channelToClient1 ) . send ( messageCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getReturnCode ( ) { return net . xenqtt . message . ConnectReturnCode . lookup ( ( ( buffer . get ( 3 ) ) & 255 ) ) ; }
|
org . junit . Assert . assertEquals ( ConnectReturnCode . ACCEPTED , ( ( net . xenqtt . message . ConnAckMessage ) ( messageCaptor . getValue ( ) ) ) . getReturnCode ( ) )
|
testDoesNotExist ( ) { boolean pass = false ; try { userDetailsService . loadUserByUsername ( "none" ) ; } catch ( org . springframework . security . core . userdetails . UsernameNotFoundException e ) { pass = true ; } "<AssertPlaceHolder>" ; } loadUserByUsername ( java . lang . String ) { gov . gtas . services . security . UserData user = userService . findById ( username ) ; if ( ( user == null ) || ( ( user . getActive ( ) ) == 0 ) ) { java . lang . String message = "Username<sp>not<sp>found:<sp>" + username ; gov . gtas . security . SecurityUserDetailsService . logger . info ( message ) ; throw new org . springframework . security . core . userdetails . UsernameNotFoundException ( message ) ; } java . util . List < org . springframework . security . core . GrantedAuthority > authorities = new java . util . ArrayList ( ) ; user . getRoles ( ) . forEach ( ( r ) -> authorities . add ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( r . getRoleDescription ( ) ) ) ) ; gov . gtas . security . SecurityUserDetailsService . logger . info ( ( "Found<sp>user<sp>in<sp>database:<sp>" + username ) ) ; return new org . springframework . security . core . userdetails . User ( username , user . getPassword ( ) , authorities ) ; }
|
org . junit . Assert . assertTrue ( pass )
|
testTimeZoneMatches ( ) { final org . apache . commons . lang3 . time . DatePrinter printer = getInstance ( org . apache . commons . lang3 . time . FastDatePrinterTest . YYYY_MM_DD , org . apache . commons . lang3 . time . FastDatePrinterTest . NEW_YORK ) ; "<AssertPlaceHolder>" ; } getTimeZone ( ) { return mTimeZone ; }
|
org . junit . Assert . assertEquals ( org . apache . commons . lang3 . time . FastDatePrinterTest . NEW_YORK , printer . getTimeZone ( ) )
|
testNoScope ( ) { org . teiid . dqp . internal . process . SessionAwareCache < org . teiid . cache . Cachable > cache = new org . teiid . dqp . internal . process . SessionAwareCache < org . teiid . cache . Cachable > ( "resultset" , org . teiid . cache . DefaultCacheFactory . INSTANCE , SessionAwareCache . Type . RESULTSET , 0 ) ; org . teiid . dqp . internal . process . SessionAwareCache . CacheID id = new org . teiid . dqp . internal . process . SessionAwareCache . CacheID ( org . teiid . dqp . internal . process . TestSessionAwareCache . buildWorkContext ( ) , new org . teiid . query . parser . ParseInfo ( ) , "SELECT<sp>*<sp>FROM<sp>FOO" ) ; org . teiid . cache . Cachable result = org . teiid . dqp . internal . process . Mockito . mock ( org . teiid . cache . Cachable . class ) ; org . teiid . dqp . internal . process . Mockito . stub ( result . prepare ( ( ( org . teiid . common . buffer . BufferManager ) ( anyObject ( ) ) ) ) ) . toReturn ( true ) ; org . teiid . dqp . internal . process . Mockito . stub ( result . restore ( ( ( org . teiid . common . buffer . BufferManager ) ( anyObject ( ) ) ) ) ) . toReturn ( true ) ; cache . put ( id , Determinism . VDB_DETERMINISTIC , result , null ) ; org . teiid . dqp . internal . process . Mockito . verify ( result , times ( 1 ) ) . prepare ( ( ( org . teiid . common . buffer . BufferManager ) ( anyObject ( ) ) ) ) ; id = new org . teiid . dqp . internal . process . SessionAwareCache . CacheID ( org . teiid . dqp . internal . process . TestSessionAwareCache . buildWorkContext ( ) , new org . teiid . query . parser . ParseInfo ( ) , "SELECT<sp>*<sp>FROM<sp>FOO" ) ; java . lang . Object c = cache . get ( id ) ; org . teiid . dqp . internal . process . Mockito . verify ( result , times ( 1 ) ) . restore ( ( ( org . teiid . common . buffer . BufferManager ) ( anyObject ( ) ) ) ) ; "<AssertPlaceHolder>" ; } restore ( org . teiid . common . buffer . TupleBufferCache ) { return true ; }
|
org . junit . Assert . assertTrue ( ( result == c ) )
|
badFlowOngeldigeLa01ZonderPf03 ( ) { startProcess ( maakUc811Bericht ( "0599" , 1231231234L ) ) ; controleerBerichten ( 0 , 1 , 0 ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht lq01Bericht = getBericht ( nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht . class ) ; lq01Bericht . setANummer ( "9876543210" ) ; signalVoisc ( maakLa01Bericht ( lq01Bericht , true ) ) ; signalHumanTask ( "restartAtVragen" ) ; controleerBerichten ( 0 , 1 , 0 ) ; getBericht ( nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht . class ) ; signalVoisc ( maakLa01Bericht ( lq01Bericht , true ) ) ; signalHumanTask ( "endWithoutPf03" ) ; controleerBerichten ( 0 , 0 , 0 ) ; "<AssertPlaceHolder>" ; } processEnded ( ) { final org . jbpm . JbpmContext jbpmContext = org . jbpm . JbpmConfiguration . getInstance ( ) . createJbpmContext ( ) ; try { final org . jbpm . graph . exe . ProcessInstance processInstance = jbpmContext . loadProcessInstance ( processInstanceId ) ; return processInstance . hasEnded ( ) ; } finally { jbpmContext . close ( ) ; } }
|
org . junit . Assert . assertTrue ( processEnded ( ) )
|
getTitleReturnsV1TagsTitleIfV2TagDoesNotExist ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; id3v1Tag . setTitle ( "V1<sp>Title" ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( id3v1Tag , null ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { if ( ( ( ( id3v2Tag ) != null ) && ( ( id3v2Tag . getTitle ( ) ) != null ) ) && ( ( id3v2Tag . getTitle ( ) . length ( ) ) > 0 ) ) { return id3v2Tag . getTitle ( ) ; } else if ( ( id3v1Tag ) != null ) { return id3v1Tag . getTitle ( ) ; } else { return null ; } }
|
org . junit . Assert . assertEquals ( "V1<sp>Title" , wrapper . getTitle ( ) )
|
testGet ( ) { com . streamsets . pipeline . api . impl . CharTypeSupport ts = new com . streamsets . pipeline . api . impl . CharTypeSupport ( ) ; char o = 'c' ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return clone ( value ) ; }
|
org . junit . Assert . assertSame ( o , ts . get ( o ) )
|
testMoveAbove ( ) { org . eclipse . swt . widgets . Control child1 = new org . eclipse . swt . widgets . Label ( shell , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . widgets . Control child2 = new org . eclipse . swt . widgets . Label ( shell , org . eclipse . swt . SWT . NONE ) ; child2 . moveAbove ( child1 ) ; "<AssertPlaceHolder>" ; } getChildren ( ) { return childCollections . toArray ( ) ; }
|
org . junit . Assert . assertArrayEquals ( new org . eclipse . swt . widgets . Control [ ] { child2 , child1 } , shell . getChildren ( ) )
|
testIsHiddenWhenElementIsNotHidden ( ) { final elemental2 . dom . Element element = mock ( elemental2 . dom . Element . class ) ; final elemental2 . dom . DOMTokenList classList = mock ( elemental2 . dom . DOMTokenList . class ) ; element . classList = classList ; when ( classList . contains ( org . kie . workbench . common . dmn . client . editors . types . common . HiddenHelper . HIDDEN_CSS_CLASS ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } isHidden ( elemental2 . dom . Element ) { return element . classList . contains ( org . kie . workbench . common . dmn . client . editors . types . common . HiddenHelper . HIDDEN_CSS_CLASS ) ; }
|
org . junit . Assert . assertFalse ( org . kie . workbench . common . dmn . client . editors . types . common . HiddenHelper . isHidden ( element ) )
|
testInt64Compression ( ) { org . apache . directmemory . memory . allocator . FixedSizeUnsafeAllocator allocator = new org . apache . directmemory . memory . allocator . FixedSizeUnsafeAllocator ( 1 , 9 ) ; try { for ( int i = 0 ; i < 8 ; i ++ ) { long [ ] values = new long [ org . apache . directmemory . memory . buffer . IntLongCompressionTestCase . TEST_VALUES_COUNT ] ; java . util . Random random = new java . util . Random ( ( - ( java . lang . System . currentTimeMillis ( ) ) ) ) ; int min = 1 << ( i * 8 ) ; int max = 255 << ( i * 8 ) ; for ( int o = 0 ; o < ( org . apache . directmemory . memory . buffer . IntLongCompressionTestCase . TEST_VALUES_COUNT ) ; o ++ ) { values [ o ] = ( ( long ) ( ( random . nextDouble ( ) ) * ( ( max - min ) + 1 ) ) ) + min ; } org . apache . directmemory . memory . buffer . MemoryBuffer buffer = allocator . allocate ( 5 ) ; for ( int v = 0 ; v < ( org . apache . directmemory . memory . buffer . IntLongCompressionTestCase . TEST_VALUES_COUNT ) ; v ++ ) { long value = values [ v ] ; buffer . clear ( ) ; buffer . writeCompressedLong ( value ) ; checkLongLength ( value , buffer . writerIndex ( ) ) ; long result = buffer . readCompressedLong ( ) ; "<AssertPlaceHolder>" ; } allocator . free ( buffer ) ; } } finally { allocator . close ( ) ; } } readCompressedLong ( ) { return org . apache . directmemory . memory . buffer . Int64Compressor . readInt64 ( this ) ; }
|
org . junit . Assert . assertEquals ( value , result )
|
testSessionAttributeParser1 ( ) { final org . opendaylight . protocol . rsvp . parser . impl . te . SessionAttributeLspRaObjectParser parser = new org . opendaylight . protocol . rsvp . parser . impl . te . SessionAttributeLspRaObjectParser ( ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . rsvp . rev150820 . RsvpTeObject obj = parser . parseObject ( io . netty . buffer . Unpooled . copiedBuffer ( org . opendaylight . protocol . util . ByteArray . subByte ( TEObjectUtil . TE_LSP_SESSION_C1 , 4 , ( ( TEObjectUtil . TE_LSP_SESSION_C1 . length ) - 4 ) ) ) ) ; final io . netty . buffer . ByteBuf output = io . netty . buffer . Unpooled . buffer ( ) ; parser . serializeObject ( obj , output ) ; "<AssertPlaceHolder>" ; } getAllBytes ( io . netty . buffer . ByteBuf ) { return org . opendaylight . protocol . util . ByteArray . getBytes ( buffer , buffer . readableBytes ( ) ) ; }
|
org . junit . Assert . assertArrayEquals ( TEObjectUtil . TE_LSP_SESSION_C1 , org . opendaylight . protocol . util . ByteArray . getAllBytes ( output ) )
|
userAgent ( ) { java . lang . String userAgent = com . amazonaws . util . VersionInfoUtils . userAgent ( ) ; System . out . println ( userAgent ) ; System . out . println ( userAgent . length ( ) ) ; "<AssertPlaceHolder>" ; } userAgent ( ) { java . lang . String userAgent = com . amazonaws . util . VersionInfoUtils . userAgent ( ) ; System . out . println ( userAgent ) ; System . out . println ( userAgent . length ( ) ) ; org . junit . Assert . assertNotNull ( userAgent ) ; }
|
org . junit . Assert . assertNotNull ( userAgent )
|
testFindByPrimaryKeyExisting ( ) { com . liferay . document . library . kernel . model . DLFileEntryMetadata newDLFileEntryMetadata = addDLFileEntryMetadata ( ) ; com . liferay . document . library . kernel . model . DLFileEntryMetadata existingDLFileEntryMetadata = _persistence . findByPrimaryKey ( newDLFileEntryMetadata . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertEquals ( existingDLFileEntryMetadata , newDLFileEntryMetadata )
|
copyConstructor_hasSameValues ( ) { array . add ( 23 ) ; com . restfb . json . JsonArray copy = new com . restfb . json . JsonArray ( array ) ; "<AssertPlaceHolder>" ; } values ( ) { return java . util . Collections . unmodifiableList ( values ) ; }
|
org . junit . Assert . assertEquals ( array . values ( ) , copy . values ( ) )
|
noModsReturnsSameResponse ( ) { org . apache . shindig . gadgets . http . HttpResponseBuilder builder = new org . apache . shindig . gadgets . http . HttpResponseBuilder ( ) ; builder . setHttpStatusCode ( HttpResponse . SC_BAD_GATEWAY ) ; builder . setResponseString ( "foo" ) ; org . apache . shindig . gadgets . http . HttpResponse response = builder . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { if ( ( ( getNumChanges ( ) ) != ( responseObjNumChanges ) ) || ( ( responseObj ) == null ) ) { responseObj = new org . apache . shindig . gadgets . http . HttpResponse ( this ) ; responseObjNumChanges = getNumChanges ( ) ; } return responseObj ; }
|
org . junit . Assert . assertSame ( response , builder . create ( ) )
|
testSingleDimArray ( ) { net . sourceforge . pmd . lang . java . ast . ASTCompilationUnit cu = net . sourceforge . pmd . lang . java . ParserTstUtil . parseJava14 ( net . sourceforge . pmd . lang . java . ast . ASTLocalVariableDeclarationTest . TEST1 ) ; net . sourceforge . pmd . lang . java . ast . ASTLocalVariableDeclaration node = cu . findDescendantsOfType ( net . sourceforge . pmd . lang . java . ast . ASTLocalVariableDeclaration . class ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getArrayDepth ( ) { return arrayDepth ; }
|
org . junit . Assert . assertEquals ( 1 , node . getArrayDepth ( ) )
|
assertGetIntForColumnIndex ( ) { for ( java . sql . ResultSet each : resultSets . values ( ) ) { "<AssertPlaceHolder>" ; } } getInt ( java . lang . String ) { return getInt ( 1 ) ; }
|
org . junit . Assert . assertThat ( each . getInt ( 1 ) , org . hamcrest . CoreMatchers . is ( 10 ) )
|
copyCopiesGroupIds ( ) { state . generate ( environment , player , org . communitybridge . synchronization . PlayerStateTest . USER_ID ) ; org . communitybridge . synchronization . PlayerState copy = state . copy ( ) ; "<AssertPlaceHolder>" ; } getWebappGroupIDs ( ) { return webappGroupIDs ; }
|
org . junit . Assert . assertEquals ( state . getWebappGroupIDs ( ) , copy . getWebappGroupIDs ( ) )
|
fulltextIndexAndNodeTypeRestriction ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder defn = newLucenePropertyIndexDefinition ( builder , "test" , of ( "foo" ) , "async" ) ; defn . setProperty ( FulltextIndexConstants . EVALUATE_PATH_RESTRICTION , true ) ; defn . setProperty ( IndexConstants . DECLARING_NODE_TYPES , of ( "nt:file" ) , org . apache . jackrabbit . oak . plugins . index . lucene . NAMES ) ; defn = org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition . updateDefinition ( defn . getNodeState ( ) . builder ( ) ) ; org . apache . jackrabbit . oak . spi . state . NodeBuilder foob = org . apache . jackrabbit . oak . plugins . index . lucene . IndexPlannerTest . getNode ( defn , "indexRules/nt:file/properties/foo" ) ; foob . setProperty ( FulltextIndexConstants . PROP_NODE_SCOPE_INDEX , true ) ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexNode node = createIndexNode ( new org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition ( root , defn . getNodeState ( ) , "/foo" ) ) ; org . apache . jackrabbit . oak . query . index . FilterImpl filter = createFilter ( "nt:file" ) ; org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner planner = new org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner ( node , "/foo" , filter , java . util . Collections . < org . apache . jackrabbit . oak . spi . query . QueryIndex . OrderEntry > emptyList ( ) ) ; "<AssertPlaceHolder>" ; } getPlan ( ) { if ( ( definition ) == null ) { org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner . log . debug ( "Index<sp>{}<sp>not<sp>loaded" , indexPath ) ; return null ; } org . apache . jackrabbit . oak . plugins . index . search . spi . query . IndexPlan . Builder builder = getPlanBuilder ( ) ; if ( definition . isTestMode ( ) ) { if ( builder == null ) { if ( notSupportedFeature ( ) ) { return null ; } java . lang . String msg = java . lang . String . format ( ( "No<sp>plan<sp>found<sp>for<sp>filter<sp>[%s]<sp>" + "while<sp>using<sp>definition<sp>[%s]<sp>and<sp>testMode<sp>is<sp>found<sp>to<sp>be<sp>enabled" ) , filter , definition ) ; throw new java . lang . IllegalStateException ( msg ) ; } else { builder . setEstimatedEntryCount ( 1 ) . setCostPerExecution ( 0.001 ) . setCostPerEntry ( 0.001 ) ; } } return builder != null ? builder . build ( ) : null ; }
|
org . junit . Assert . assertNotNull ( planner . getPlan ( ) )
|
testEvaluateOneIndex ( ) { final org . eclipse . rdf4j . sail . Sail nonPcjSail = org . apache . rya . sail . config . RyaSailFactory . getInstance ( conf ) ; final org . apache . rya . mongodb . MongoDBRdfConfiguration pcjConf = conf . clone ( ) ; pcjConf . setBoolean ( ConfigUtils . USE_PCJ , true ) ; final org . eclipse . rdf4j . sail . Sail pcjSail = org . apache . rya . sail . config . RyaSailFactory . getInstance ( pcjConf ) ; final org . eclipse . rdf4j . repository . sail . SailRepositoryConnection conn = new org . eclipse . rdf4j . repository . sail . SailRepository ( nonPcjSail ) . getConnection ( ) ; final org . eclipse . rdf4j . repository . sail . SailRepositoryConnection pcjConn = new org . eclipse . rdf4j . repository . sail . SailRepository ( pcjSail ) . getConnection ( ) ; addPCJS ( pcjConn ) ; try { final org . eclipse . rdf4j . model . IRI superclass = org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . VF . createIRI ( "uri:superclass" ) ; final org . eclipse . rdf4j . model . IRI superclass2 = org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . VF . createIRI ( "uri:superclass2" ) ; conn . add ( org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . subclass , RDF . TYPE , superclass ) ; conn . add ( org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . subclass2 , RDF . TYPE , superclass2 ) ; conn . add ( org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . obj , RDFS . LABEL , org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . VF . createLiteral ( "label" ) ) ; conn . add ( org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . obj2 , RDFS . LABEL , org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . VF . createLiteral ( "label2" ) ) ; final java . lang . String indexSparqlString = "" + ( ( ( ( "SELECT<sp>?dog<sp>?pig<sp>?duck<sp>" + "{" ) + "<sp>?pig<sp>a<sp>?dog<sp>.<sp>" ) + "<sp>?pig<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?duck<sp>" ) + "}" ) ; final org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . CountingResultHandler crh1 = new org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . CountingResultHandler ( ) ; final org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . CountingResultHandler crh2 = new org . apache . rya . indexing . mongo . MongoPcjIntegrationTest . CountingResultHandler ( ) ; org . apache . rya . indexing . external . PcjIntegrationTestingUtil . createAndPopulatePcj ( conn , getMongoClient ( ) , ( ( conf . getMongoDBName ( ) ) + 1 ) , conf . getRyaInstanceName ( ) , indexSparqlString ) ; conn . prepareTupleQuery ( QueryLanguage . SPARQL , indexSparqlString ) . evaluate ( crh1 ) ; org . apache . rya . indexing . external . PcjIntegrationTestingUtil . deleteCoreRyaTables ( getMongoClient ( ) , conf . getRyaInstanceName ( ) , conf . getTriplesCollectionName ( ) ) ; pcjConn . prepareTupleQuery ( QueryLanguage . SPARQL , indexSparqlString ) . evaluate ( crh2 ) ; "<AssertPlaceHolder>" ; } finally { conn . close ( ) ; pcjConn . close ( ) ; nonPcjSail . shutDown ( ) ; pcjSail . shutDown ( ) ; } } evaluate ( org . eclipse . rdf4j . query . BindingSet ) { return new org . apache . rya . mongodb . aggregation . PipelineResultIteration ( collection . aggregate ( pipeline ) , varToOriginalName , bindings ) ; }
|
org . junit . Assert . assertEquals ( crh1 . count , crh2 . count )
|
deleteOperationRecords ( ) { container . login ( user . getKey ( ) ) ; final java . util . List < java . lang . Long > recordKeys = new java . util . ArrayList ( ) ; recordKeys . add ( java . lang . Long . valueOf ( recordForUserSub1 . getKey ( ) ) ) ; recordKeys . add ( java . lang . Long . valueOf ( recordForUserSub2 . getKey ( ) ) ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . techproductoperation . bean . Override public org . oscm . techproductoperation . bean . Void call ( ) throws org . oscm . techproductoperation . bean . Exception { orslb . deleteOperationRecords ( recordKeys ) ; return null ; } } ) ; java . util . List < org . oscm . domobjects . OperationRecord > result = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . domobjects . OperationRecord > > ( ) { @ org . oscm . techproductoperation . bean . Override public java . util . List < org . oscm . domobjects . OperationRecord > call ( ) throws org . oscm . techproductoperation . bean . Exception { return operationRecordDao . getOperationsForUser ( user . getKey ( ) ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
test1 ( ) { org . apache . commons . math3 . random . RandomGenerator rnd = getRandom ( ) ; cc . redberry . rings . util . RandomDataGenerator rndd = getRandomData ( ) ; for ( long modulus : java . util . Arrays . asList ( 2 , 3 , 17 , Integer . MAX_VALUE ) ) { cc . redberry . rings . IntegersZp64 ring = cc . redberry . rings . Rings . Zp64 ( modulus ) ; cc . redberry . rings . poly . UnivariateRing < cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 > uring = cc . redberry . rings . Rings . UnivariateRingZp64 ( ring ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { int nPolynomials = rndd . nextInt ( 2 , 10 ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 [ ] polys = new cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 [ nPolynomials ] ; for ( int j = 0 ; j < ( polys . length ) ; j ++ ) polys [ j ] = cc . redberry . rings . poly . univar . RandomUnivariatePolynomials . randomMonicPoly ( rndd . nextInt ( 15 , 30 ) , ring . modulus , rnd ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 gcd = cc . redberry . rings . poly . univar . UnivariateGCD . PolynomialGCD ( polys ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 rhs = cc . redberry . rings . poly . univar . RandomUnivariatePolynomials . randomMonicPoly ( rndd . nextInt ( 0 , 10 ) , ring . modulus , rnd ) ; rhs . multiply ( gcd ) ; cc . redberry . rings . poly . univar . DiophantineEquations . DiophantineSolver < cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 > solver = new cc . redberry . rings . poly . univar . DiophantineEquations . DiophantineSolver < > ( polys ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 g = uring . getZero ( ) ; for ( int l = 0 ; l < ( solver . solution . length ) ; l ++ ) g . add ( solver . solution [ l ] . clone ( ) . multiply ( polys [ l ] ) ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 [ ] solve = solver . solve ( rhs ) ; for ( int j = 0 ; j < ( solve . length ) ; j ++ ) rhs . subtract ( solve [ j ] . multiply ( polys [ j ] ) ) ; "<AssertPlaceHolder>" ; } } } isZero ( ) { return ring . isZero ( data [ degree ] ) ; }
|
org . junit . Assert . assertTrue ( rhs . isZero ( ) )
|
shouldSetPassword ( ) { this . connectionInfo . setPassword ( org . teiid . designer . runtime . TeiidConnectionInfoTest . NEW_PSWD ) ; "<AssertPlaceHolder>" ; } getPassword ( ) { return this . password ; }
|
org . junit . Assert . assertThat ( this . connectionInfo . getPassword ( ) , org . hamcrest . core . Is . is ( org . teiid . designer . runtime . TeiidConnectionInfoTest . NEW_PSWD ) )
|
testBuildFolderPathNonRootServicePathNoEncoding ( ) { System . out . println ( ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "[NGSIHDFSSinkTest.buildFolderPath]" 4 ) + "path<sp>is<sp>the<sp>encoding<sp>of<sp><service>/<service-path>/<entity>" ) ) ; java . lang . String backendImpl = null ; java . lang . String backendMaxConns = null ; java . lang . String backendMaxConnsPerRoute = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String csvSeparator = null ; java . lang . String dataModel = null ; java . lang . String enableEncoding = "[NGSIHDFSSinkTest.buildFolderPath]" 6 ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String fileFormat = null ; java . lang . String host = null ; java . lang . String password = "mypassword" ; java . lang . String port = null ; java . lang . String username = "[NGSIHDFSSinkTest.buildFolderPath]" 2 ; java . lang . String hive = "[NGSIHDFSSinkTest.buildFolderPath]" 6 ; java . lang . String krb5 = "[NGSIHDFSSinkTest.buildFolderPath]" 6 ; java . lang . String token = "[NGSIHDFSSinkTest.buildFolderPath]" 3 ; java . lang . String serviceAsNamespace = null ; com . telefonica . iot . cygnus . sinks . NGSIHDFSSink sink = new com . telefonica . iot . cygnus . sinks . NGSIHDFSSink ( ) ; sink . configure ( createContext ( backendImpl , backendMaxConns , backendMaxConnsPerRoute , batchSize , batchTime , batchTTL , csvSeparator , dataModel , enableEncoding , enableGrouping , enableLowercase , fileFormat , host , password , port , username , hive , krb5 , token , serviceAsNamespace ) ) ; java . lang . String service = "someService" ; java . lang . String servicePath = "/somePath" ; java . lang . String entity = "someId=someType" ; try { java . lang . String buildFolderPath = sink . buildFolderPath ( service , servicePath , entity ) ; java . lang . String expectedFolderPath = "someService/somePath/someId_someType" ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "-<sp>OK<sp>-<sp>'" ) + buildFolderPath ) + "[NGSIHDFSSinkTest.buildFolderPath]" 5 ) + "[NGSIHDFSSinkTest.buildFolderPath]" 0 ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + buildFolderPath ) + "'<sp>is<sp>not<sp>equals<sp>to<sp>" ) + "[NGSIHDFSSinkTest.buildFolderPath]" 0 ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "[NGSIHDFSSinkTest.buildFolderPath]" 1 ) ) ; throw e ; } createContext ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { org . apache . flume . Context context = new org . apache . flume . Context ( ) ; context . put ( "hdfs_port" 8 , backendImpl ) ; context . put ( "backend.max_conns" , backendMaxConns ) ; context . put ( "hdfs_port" 7 , backendMaxConnsPerRoute ) ; context . put ( "batchSize" , batchSize ) ; context . put ( "batchTime" , batchTime ) ; context . put ( "batchTTL" , batchTTL ) ; context . put ( "hdfs_port" 4 , csvSeparator ) ; context . put ( "hdfs_port" 5 , dataModel ) ; context . put ( "hdfs_port" 0 , enableEncoding ) ; context . put ( "hdfs_port" 2 , enableGrouping ) ; context . put ( "hdfs_port" 2 , enableLowercase ) ; context . put ( "hdfs_port" 1 , fileFormat ) ; context . put ( "hdfs_host" , host ) ; context . put ( "hdfs_password" , password ) ; context . put ( "hdfs_port" , port ) ; context . put ( "hdfs_username" , username ) ; context . put ( "hive" , hive ) ; context . put ( "krb5_auth" , krb5 ) ; context . put ( "hdfs_port" 3 , token ) ; context . put ( "hdfs_port" 6 , serviceAsNamespace ) ; return context ; }
|
org . junit . Assert . assertEquals ( expectedFolderPath , buildFolderPath )
|
WhenTransitionExistsInSupersate_TriggerCanBeFired ( ) { com . github . oxo42 . stateless4j . StateRepresentation < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > rep = CreateRepresentation ( State . B ) ; rep . addTriggerBehaviour ( new com . github . oxo42 . stateless4j . triggers . InternalTriggerBehaviour < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > ( Trigger . X , InternalTriggerBehaviourTests . returnTrue , InternalTriggerBehaviourTests . nopAction ) ) ; com . github . oxo42 . stateless4j . StateRepresentation < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > sub = CreateRepresentation ( State . C ) ; sub . setSuperstate ( rep ) ; rep . addSubstate ( sub ) ; "<AssertPlaceHolder>" ; } canHandle ( T ) { return ( tryFindHandler ( trigger ) ) != null ; }
|
org . junit . Assert . assertTrue ( sub . canHandle ( Trigger . X ) )
|
getOneFiltersTrivialTypeTest ( ) { final java . lang . String quote = org . nohope . cassandra . mapservice . QuoteTestGenerator . newQuote ( ) ; final org . nohope . cassandra . mapservice . ValueTuple valueToPut = org . nohope . cassandra . mapservice . ValueTuple . of ( org . nohope . cassandra . mapservice . CMapIT . COL_QUOTES , quote ) . with ( org . nohope . cassandra . mapservice . CMapIT . COL_TIMESTAMP , org . joda . time . DateTime . now ( DateTimeZone . UTC ) ) ; final org . nohope . cassandra . mapservice . CPutQuery putQuery = new org . nohope . cassandra . mapservice . CPutQuery ( valueToPut ) ; final org . nohope . cassandra . mapservice . CQuery query = org . nohope . cassandra . mapservice . CQueryBuilder . createQuery ( ) . of ( org . nohope . cassandra . mapservice . CMapIT . COL_QUOTES , org . nohope . cassandra . mapservice . CMapIT . COL_TIMESTAMP ) . addFilters ( ) . eq ( org . nohope . cassandra . mapservice . CMapIT . COL_QUOTES , quote ) . noMoreFilters ( ) . end ( ) ; testMap . put ( putQuery ) ; final org . nohope . cassandra . mapservice . ValueTuple returnValue = testMap . getOne ( query ) ; "<AssertPlaceHolder>" ; } getOne ( org . nohope . cassandra . mapservice . CQuery ) { return getOne ( query , null ) ; }
|
org . junit . Assert . assertEquals ( returnValue , valueToPut )
|
getTagsByPattern_differentLocale ( ) { java . util . List < java . lang . String > tags = org . oscm . ws . TagServiceWSTest . tagService . getTagsByPattern ( "ja" , "_bb" , 5 ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , tags . size ( ) )
|
stopTransactionAcceptedVerifyReturnValue ( ) { when ( chargePointService . remoteStopTransaction ( any ( io . motown . ocpp . v15 . soap . chargepoint . RemoteStopTransactionRequest . class ) , anyString ( ) ) ) . thenReturn ( getRemoteStopTransactionResponse ( RemoteStartStopStatus . ACCEPTED ) ) ; boolean willTransactionStop = client . stopTransaction ( io . motown . ocpp . v15 . soap . chargepoint . CHARGING_STATION_ID , ( ( io . motown . ocpp . v15 . soap . chargepoint . NumberedTransactionId ) ( io . motown . ocpp . v15 . soap . chargepoint . TRANSACTION_ID ) ) . getNumber ( ) ) ; "<AssertPlaceHolder>" ; } getNumber ( ) { return java . lang . Integer . valueOf ( id . substring ( ( ( id . lastIndexOf ( '_' ) ) + 1 ) , id . length ( ) ) ) ; }
|
org . junit . Assert . assertTrue ( willTransactionStop )
|
testGetMostRecentLocation ( ) { com . amplitude . api . DeviceInfo deviceInfo = new com . amplitude . api . DeviceInfo ( context ) ; org . robolectric . shadows . ShadowLocationManager locationManager = org . robolectric . Shadows . shadowOf ( ( ( android . location . LocationManager ) ( context . getSystemService ( Context . LOCATION_SERVICE ) ) ) ) ; android . location . Location loc = com . amplitude . api . DeviceInfoTest . makeLocation ( LocationManager . NETWORK_PROVIDER , com . amplitude . api . DeviceInfoTest . TEST_LOCATION_LAT , com . amplitude . api . DeviceInfoTest . TEST_LOCATION_LNG ) ; locationManager . simulateLocation ( loc ) ; locationManager . setProviderEnabled ( LocationManager . NETWORK_PROVIDER , true ) ; "<AssertPlaceHolder>" ; } getMostRecentLocation ( ) { if ( ! ( isLocationListening ( ) ) ) { return null ; } android . location . LocationManager locationManager = ( ( android . location . LocationManager ) ( context . getSystemService ( Context . LOCATION_SERVICE ) ) ) ; if ( locationManager == null ) { return null ; } java . util . List < java . lang . String > providers = null ; try { providers = locationManager . getProviders ( true ) ; } catch ( java . lang . SecurityException e ) { com . amplitude . api . Diagnostics . getLogger ( ) . logError ( "Failed<sp>to<sp>get<sp>most<sp>recent<sp>location" , e ) ; } if ( providers == null ) { return null ; } java . util . List < android . location . Location > locations = new java . util . ArrayList < android . location . Location > ( ) ; for ( java . lang . String provider : providers ) { android . location . Location location = null ; try { location = locationManager . getLastKnownLocation ( provider ) ; } catch ( java . lang . IllegalArgumentException e ) { com . amplitude . api . Diagnostics . getLogger ( ) . logError ( "Failed<sp>to<sp>get<sp>most<sp>recent<sp>location" , e ) ; } catch ( java . lang . SecurityException e ) { com . amplitude . api . Diagnostics . getLogger ( ) . logError ( "Failed<sp>to<sp>get<sp>most<sp>recent<sp>location" , e ) ; } if ( location != null ) { locations . add ( location ) ; } } long maximumTimestamp = - 1 ; android . location . Location bestLocation = null ; for ( android . location . Location location : locations ) { if ( ( location . getTime ( ) ) > maximumTimestamp ) { maximumTimestamp = location . getTime ( ) ; bestLocation = location ; } } return bestLocation ; }
|
org . junit . Assert . assertEquals ( loc , deviceInfo . getMostRecentLocation ( ) )
|
testStringRendererWithSubtemplateInclude_cap ( ) { java . lang . String templates = "foo(x)<sp>::=<sp><<<sp><({ack});<sp>format=\"cap\"><sp>>>\n" + "t()<sp>::=<sp><<ack>>\n" ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroupFile ( ( ( tmpdir ) + "/t.stg" ) ) ; group . registerRenderer ( java . lang . String . class , new org . stringtemplate . v4 . StringRenderer ( ) ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "foo" ) ; st . add ( "x" , "hi" ) ; java . lang . String expecting = "<sp>Ack<sp>" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , result )
|
testProjected ( ) { org . apache . apex . malhar . lib . projection . ProjectionTest . logger . debug ( "start<sp>round<sp>0" ) ; org . apache . apex . malhar . lib . projection . ProjectionTest . projection . beginWindow ( 0 ) ; org . apache . apex . malhar . lib . projection . ProjectionTest . data . setProjected ( 2345 ) ; org . apache . apex . malhar . lib . projection . ProjectionTest . data . setRemainder ( 5678 ) ; java . lang . Object p = null ; try { p = org . apache . apex . malhar . lib . projection . ProjectionTest . projection . getProjectedObject ( org . apache . apex . malhar . lib . projection . ProjectionTest . data ) ; } catch ( java . lang . IllegalAccessException e ) { "<AssertPlaceHolder>" ; } org . apache . apex . malhar . lib . projection . ProjectionTest . logger . debug ( "projected<sp>class<sp>{}" , p . getClass ( ) ) ; checkProjected ( p , 2345 ) ; org . apache . apex . malhar . lib . projection . ProjectionTest . projection . endWindow ( ) ; org . apache . apex . malhar . lib . projection . ProjectionTest . logger . debug ( "end<sp>round<sp>0" ) ; } getProjectedObject ( java . lang . Object ) { try { java . lang . Object p = projectedClazz . newInstance ( ) ; for ( org . apache . apex . malhar . lib . projection . ProjectionOperator . TypeInfo ti : projectedFields ) { ti . setter . set ( p , ti . getter . get ( t ) ) ; } return p ; } catch ( java . lang . InstantiationException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . IllegalAccessException e ) { throw e ; } }
|
org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalAccessException ) )
|
test_isSelectionPatternAvailable ( ) { mmarquee . automation . pattern . Selection pattern = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Selection . class ) ; when ( pattern . isAvailable ( ) ) . thenReturn ( true ) ; mmarquee . automation . controls . AutomationWindow window = new mmarquee . automation . controls . AutomationWindow ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( pattern ) ) ; boolean value = window . isSelectionPatternAvailable ( ) ; "<AssertPlaceHolder>" ; } isSelectionPatternAvailable ( ) { return isAutomationPatternAvailable ( mmarquee . automation . pattern . Selection . class ) ; }
|
org . junit . Assert . assertTrue ( value )
|
update_BoundaryConditions ( ) { com . namespace . domain . UserGAE user = null ; "<AssertPlaceHolder>" ; } update ( com . namespace . domain . Account ) { com . namespace . repository . AccountDAOImpl . logger . info ( "update()" ) ; if ( account == null ) return false ; com . googlecode . objectify . Objectify ofy = objectifyFactory . begin ( ) ; com . namespace . repository . AccountDAOImpl . logger . info ( ( ( "verify<sp>if<sp>this<sp>account<sp>already<sp>exist<sp>" + "in<sp>the<sp>datastore:<sp>" ) + ( account . toString ( ) ) ) ) ; boolean thisAccountAlreadyExist = ( ofy . query ( com . namespace . domain . Account . class ) . ancestor ( account . getUser ( ) ) . get ( ) ) != null ; if ( thisAccountAlreadyExist ) { com . namespace . repository . AccountDAOImpl . logger . info ( "Confirmed:<sp>this<sp>account<sp>already<sp>exist." ) ; ofy . put ( account ) ; return true ; } else { com . namespace . repository . AccountDAOImpl . logger . info ( ( "This<sp>account<sp>doesn't<sp>exist<sp>at<sp>the<sp>datastore<sp>or<sp>" + "something<sp>whas<sp>wrong<sp>(might<sp>be<sp>the<sp>ancestor<sp>reference" ) ) ; return false ; } }
|
org . junit . Assert . assertFalse ( this . dao . update ( user ) )
|
testSelfSimilarity ( ) { org . evosuite . testcase . TestCase test = new org . evosuite . testcase . DefaultTestCase ( ) ; org . evosuite . testcase . statements . PrimitiveStatement < ? > aInt = new org . evosuite . testcase . statements . numeric . IntPrimitiveStatement ( test , 42 ) ; test . addStatement ( aInt ) ; double score = org . evosuite . testsuite . similarity . DiversityObserver . getNeedlemanWunschScore ( test , test ) ; "<AssertPlaceHolder>" ; } getNeedlemanWunschScore ( org . evosuite . testcase . TestCase , org . evosuite . testcase . TestCase ) { int [ ] [ ] matrix = new int [ ( test1 . size ( ) ) + 1 ] [ ( test2 . size ( ) ) + 1 ] ; for ( int i = 0 ; i <= ( test1 . size ( ) ) ; i ++ ) matrix [ i ] [ 0 ] = ( org . evosuite . testsuite . similarity . DiversityObserver . GAP_PENALTY ) * i ; for ( int i = 0 ; i <= ( test2 . size ( ) ) ; i ++ ) matrix [ 0 ] [ i ] = ( org . evosuite . testsuite . similarity . DiversityObserver . GAP_PENALTY ) * i ; for ( int x = 1 ; x <= ( test1 . size ( ) ) ; x ++ ) { for ( int y = 1 ; y <= ( test2 . size ( ) ) ; y ++ ) { int upLeft = ( matrix [ ( x - 1 ) ] [ ( y - 1 ) ] ) + ( org . evosuite . testsuite . similarity . DiversityObserver . getStatementSimilarity ( test1 . getStatement ( ( x - 1 ) ) , test2 . getStatement ( ( y - 1 ) ) ) ) ; int insert = ( matrix [ ( x - 1 ) ] [ y ] ) + ( org . evosuite . testsuite . similarity . DiversityObserver . GAP_PENALTY ) ; int delete = ( matrix [ x ] [ ( y - 1 ) ] ) + ( org . evosuite . testsuite . similarity . DiversityObserver . GAP_PENALTY ) ; matrix [ x ] [ y ] = java . lang . Math . max ( upLeft , java . lang . Math . max ( delete , insert ) ) ; } } double max = ( java . lang . Math . max ( test1 . size ( ) , test2 . size ( ) ) ) * ( java . lang . Math . abs ( org . evosuite . testsuite . similarity . DiversityObserver . GAP_PENALTY ) ) ; if ( max == 0.0 ) { return 0.0 ; } return ( matrix [ test1 . size ( ) ] [ test2 . size ( ) ] ) / max ; }
|
org . junit . Assert . assertTrue ( ( score > 0 ) )
|
testGeneratePojoQname ( ) { try { javax . xml . namespace . QName qname = org . firesoa . common . schema . JAXBUtil . generatePojoQname ( org . firesoa . common . schema . pojo_2 . childobj . Address . class ) ; javax . xml . namespace . QName qname_2 = new javax . xml . namespace . QName ( "http://childob.pojo_2.schema.common.firesoa.org/" , "address" ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } generatePojoQname ( java . lang . Class ) { if ( pojoClass == null ) { return null ; } java . lang . String localName = null ; java . lang . String targetNamespace = "" ; javax . xml . bind . annotation . XmlType xmlType = ( ( javax . xml . bind . annotation . XmlType ) ( pojoClass . getAnnotation ( javax . xml . bind . annotation . XmlType . class ) ) ) ; if ( xmlType != null ) { java . lang . String name = xmlType . name ( ) ; if ( ( name == null ) || ( name . trim ( ) . equals ( "" ) ) ) { throw new java . lang . Exception ( "The<sp>@XmlType.name()<sp>is<sp>,<sp>it<sp>cant<sp>NOT<sp>be<sp>a<sp>top<sp>level<sp>XSD<sp>type." ) ; } else if ( name . trim ( ) . equals ( "##default" ) ) { localName = java . beans . Introspector . decapitalize ( pojoClass . getName ( ) ) ; } else { localName = xmlType . name ( ) ; } } else { localName = java . beans . Introspector . decapitalize ( pojoClass . getSimpleName ( ) ) ; } if ( ( xmlType != null ) && ( ! ( xmlType . namespace ( ) . trim ( ) . equals ( "##default" ) ) ) ) { targetNamespace = xmlType . namespace ( ) ; } else { java . lang . String packageName = pojoClass . getPackage ( ) . getName ( ) ; java . lang . String package_info_class_name = "package-info" ; if ( ( packageName != null ) && ( ! ( packageName . trim ( ) . equals ( "" ) ) ) ) { package_info_class_name = ( packageName + "." ) + package_info_class_name ; } try { java . lang . Class pkg_Info_clz = java . lang . Class . forName ( package_info_class_name ) ; javax . xml . bind . annotation . XmlSchema xmlSchema = ( ( javax . xml . bind . annotation . XmlSchema ) ( pkg_Info_clz . getAnnotation ( javax . xml . bind . annotation . XmlSchema . class ) ) ) ; if ( xmlSchema != null ) { targetNamespace = xmlSchema . namespace ( ) ; } } catch ( java . lang . Exception e ) { } } return new javax . xml . namespace . QName ( targetNamespace , localName ) ; }
|
org . junit . Assert . assertEquals ( qname_2 , qname )
|
testThen ( ) { java . util . List < org . apache . commons . functor . core . composite . TestNullarySequence . RunCounter > list = new java . util . ArrayList < org . apache . commons . functor . core . composite . TestNullarySequence . RunCounter > ( ) ; org . apache . commons . functor . core . composite . NullarySequence seq = new org . apache . commons . functor . core . composite . NullarySequence ( ) ; seq . run ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { org . apache . commons . functor . core . composite . TestNullarySequence . RunCounter counter = new org . apache . commons . functor . core . composite . TestNullarySequence . RunCounter ( ) ; seq . then ( counter ) ; list . add ( counter ) ; seq . run ( ) ; for ( int j = 0 ; j < ( list . size ( ) ) ; j ++ ) { "<AssertPlaceHolder>" ; } } } size ( ) { throw new java . lang . UnsupportedOperationException ( "Left<sp>as<sp>an<sp>exercise<sp>for<sp>the<sp>reader." ) ; }
|
org . junit . Assert . assertEquals ( ( ( list . size ( ) ) - j ) , ( ( org . apache . commons . functor . core . composite . TestNullarySequence . RunCounter ) ( list . get ( j ) ) ) . count )
|
test_withSecond_noChange ( ) { java . time . LocalDateTime t = TEST_2007_07_15_12_30_40_987654321 . withSecond ( 40 ) ; "<AssertPlaceHolder>" ; } withSecond ( int ) { return with ( dateTime . withSecond ( second ) , offset ) ; }
|
org . junit . Assert . assertSame ( t , TEST_2007_07_15_12_30_40_987654321 )
|
shouldNotEvaluateToEqualDifferentId ( ) { final org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertex originalMarko = org . apache . tinkerpop . gremlin . structure . util . detached . DetachedFactory . detach ( g . V ( convertToVertexId ( "marko" ) ) . next ( ) , true ) ; final org . apache . tinkerpop . gremlin . structure . Vertex secondMarko = graph . addVertex ( "name" , "marko" , "age" , 29 ) ; "<AssertPlaceHolder>" ; } detach ( org . apache . tinkerpop . gremlin . structure . Vertex , boolean ) { return vertex instanceof org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertex ? ( ( org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertex ) ( vertex ) ) : new org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertex ( vertex , withProperties ) ; }
|
org . junit . Assert . assertFalse ( org . apache . tinkerpop . gremlin . structure . util . detached . DetachedFactory . detach ( secondMarko , true ) . equals ( originalMarko ) )
|
testAddonDeploymentEnhancerCalled ( ) { "<AssertPlaceHolder>" ; } getCalls ( ) { return test . org . jboss . forge . furnace . spi . MockAddonDeploymentScenarioEnhancer . calls ; }
|
org . junit . Assert . assertEquals ( 1 , test . org . jboss . forge . furnace . spi . MockAddonDeploymentScenarioEnhancer . getCalls ( ) )
|
invalidIntegerValidValuesConstraintShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createValidValuesDefinition ( ToscaTypes . INTEGER . toString ( ) , com . google . common . collect . Lists . newArrayList ( "42" , "not<sp>an<sp>integer" ) ) , alien4cloud . tosca . container . validation . ToscaSequence . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "name:<sp>[" + ( name ) ) + "],<sp>value:<sp>[" ) + ( value ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( 2 , violations . size ( ) )
|
shouldSetCustomLabelWithNonNullValue ( ) { java . lang . String CUSTOM_LABEL = "customLabel" ; this . teiidServer . setCustomLabel ( CUSTOM_LABEL ) ; "<AssertPlaceHolder>" ; } getCustomLabel ( ) { return this . customLabel ; }
|
org . junit . Assert . assertThat ( this . teiidServer . getCustomLabel ( ) , org . hamcrest . core . Is . is ( CUSTOM_LABEL ) )
|
issue61Test ( ) { net . openhft . chronicle . map . ChronicleMapBuilder < java . lang . String , net . openhft . chronicle . map . Externalizable > builder = net . openhft . chronicle . map . ChronicleMapBuilder . of ( java . lang . String . class , net . openhft . chronicle . map . Externalizable . class ) . averageKeySize ( 200 ) . averageValueSize ( 200 ) . entries ( 100 ) ; net . openhft . chronicle . map . File dbFile = net . openhft . chronicle . set . Builder . getPersistenceFile ( ) ; try ( net . openhft . chronicle . map . ChronicleMap < java . lang . String , net . openhft . chronicle . map . Externalizable > datasetMap = builder . createPersistedTo ( dbFile ) ) { System . out . printf ( "%s%n" , datasetMap ) ; java . lang . String key = "esg_dataroot/obs4MIPs/observations/atmos/husNobs/mon/grid/NASA-JPL/AIRS/v20110608/husNobs_AIRS_L3_RetStd-v5_200209-201105.nc" ; datasetMap . put ( key , new net . openhft . chronicle . map . DatasetTrackerIssue61Test . Value ( "value" ) ) ; net . openhft . chronicle . map . DatasetTrackerIssue61Test . Value saved = ( ( net . openhft . chronicle . map . DatasetTrackerIssue61Test . Value ) ( datasetMap . get ( key ) ) ) ; "<AssertPlaceHolder>" ; } } get ( java . lang . Object ) { return defaultGet ( key ) ; }
|
org . junit . Assert . assertEquals ( "value" , saved . value )
|
testSetIndication ( ) { org . drugis . addis . entities . Indication newValue = d_domain . getIndications ( ) . get ( 0 ) ; com . jgoodies . binding . value . ValueModel vm = d_wizard . getIndicationModel ( ) ; org . drugis . common . JUnitUtil . testSetter ( vm , null , newValue ) ; "<AssertPlaceHolder>" ; } getIndicationModel ( ) { return d_mgr . getLabeledModel ( org . drugis . addis . presentation . AbstractMetaAnalysisPresentation . getBean ( ) . getIndication ( ) ) ; }
|
org . junit . Assert . assertEquals ( newValue , d_wizard . getIndicationModel ( ) . getValue ( ) )
|
testEvaluateTwoIndexCrossProduct2 ( ) { final java . lang . String indexSparqlString = "" + ( ( ( ( "SELECT<sp>?e<sp>?l<sp>?c<sp>" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l<sp>" ) + "}" ) ; final java . lang . String indexSparqlString2 = "" + ( ( ( ( "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 0 + "{" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 2 ) + "}" ) ; final java . lang . String queryString = "" + ( ( ( ( ( ( ( "SELECT<sp>?e<sp>?c<sp>?l<sp>?o<sp>?f<sp>?g<sp>" + "{" ) + "<sp>?e<sp>a<sp>?c<sp>.<sp>" ) + "<sp>?e<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" 1 ) + "<sp>?f<sp><uri:talksTo><sp>?g<sp>.<sp>" ) + "}" ) ; final org . eclipse . rdf4j . query . parser . sparql . SPARQLParser sp = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery index1 = sp . parseQuery ( indexSparqlString , null ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery index2 = sp . parseQuery ( indexSparqlString2 , null ) ; final java . util . List < org . apache . rya . indexing . external . tupleSet . ExternalTupleSet > index = com . google . common . collect . Lists . newArrayList ( ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ais1 = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( index1 . getTupleExpr ( ) ) ) ) ; final org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ais2 = new org . apache . rya . indexing . external . tupleSet . SimpleExternalTupleSet ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( index2 . getTupleExpr ( ) ) ) ) ; index . add ( ais1 ) ; index . add ( ais2 ) ; final org . eclipse . rdf4j . query . parser . ParsedQuery pq = sp . parseQuery ( queryString , null ) ; final org . eclipse . rdf4j . query . algebra . TupleExpr tup = pq . getTupleExpr ( ) . clone ( ) ; provider . setIndices ( index ) ; final org . apache . rya . indexing . pcj . matching . PCJOptimizer pcj = new org . apache . rya . indexing . pcj . matching . PCJOptimizer ( index , false , provider ) ; pcj . optimize ( tup , null , null ) ; final org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator ipv = new org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator ( true ) ; "<AssertPlaceHolder>" ; } isValid ( org . eclipse . rdf4j . query . algebra . TupleExpr ) { org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator . TupleValidateVisitor tv = new org . apache . rya . indexing . IndexPlanValidator . IndexPlanValidator . TupleValidateVisitor ( ) ; te . visit ( tv ) ; return tv . isValid ( ) ; }
|
org . junit . Assert . assertEquals ( false , ipv . isValid ( tup ) )
|
testServiceTypeIsValid ( ) { java . util . Set < java . lang . String > services = com . google . common . collect . ImmutableSet . of ( "foo" , "bar" ) ; validator = new com . cloudera . csd . validation . constraints . components . ValidServiceDependencyValidatorImpl ( services ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { if ( ( null == nameForCrossEntityAggregate ) || ( nameForCrossEntityAggregate . isEmpty ( ) ) ) { return true ; } return com . cloudera . csd . validation . monitoring . MonitoringConventions . isValidMetricNameFormat ( nameForCrossEntityAggregate ) ; }
|
org . junit . Assert . assertTrue ( validator . isValid ( "foo" , context ) )
|
deveObterOqueUFFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFInfoConsultaCadastro infoConsultaCadastro = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFInfoConsultaCadastro ( ) ; infoConsultaCadastro . setUf ( "SC" ) ; "<AssertPlaceHolder>" ; } getUf ( ) { return this . uf ; }
|
org . junit . Assert . assertEquals ( "SC" , infoConsultaCadastro . getUf ( ) )
|
nietValideSynchronisatiePersoon ( ) { final nl . bzk . brp . model . internbericht . ProtocolleringOpdracht protocolleringOpdracht = maakProtocolleringOpdracht ( SoortDienst . SYNCHRONISATIE_PERSOON , datumMaterieelSelectie , datumAanvangMaterielePeriode , datumEindeMaterielePeriode , datumTijdAanvangFormelePeriode , null , null ) ; "<AssertPlaceHolder>" ; } isValide ( ) { boolean resultaat ; if ( ( levering ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "Levering<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( ( personen ) == null ) || ( personen . isEmpty ( ) ) ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "Personen<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( levering . getToegangLeveringsautorisatieId ( ) ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "ToegangAbonnementId<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( levering . getDienstId ( ) ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "DienstId<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( ( levering . getDatumTijdKlaarzettenLevering ( ) ) == null ) || ( levering . getDatumTijdKlaarzettenLevering ( ) . heeftGeenWaarde ( ) ) ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "DatumTijdKlaarzettenLevering<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( getSoortDienst ( ) ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "Soort<sp>dienst<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . SOORTDIENSTEN_MET_SOORT_SYNCHRONISATIE_VERPLICHT . contains ( getSoortDienst ( ) ) ) && ( ( ( levering . getSoortSynchronisatie ( ) ) == null ) || ( levering . getSoortSynchronisatie ( ) . heeftGeenWaarde ( ) ) ) ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "ToegangAbonnementId<sp>dient<sp>gevuld<sp>te<sp>zijn." 0 , getSoortDienst ( ) ) ; } else { switch ( soortDienst ) { case ATTENDERING : case MUTATIELEVERING_OP_BASIS_VAN_DOELBINDING : resultaat = isValideAttenderingOfMutatieLeveringDoelbinding ( ) ; break ; case GEEF_DETAILS_PERSOON : case GEEF_DETAILS_PERSOON_BULK : resultaat = isValideGeefDetailsPersoon ( getHistorievorm ( ) ) ; break ; case MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE : case PLAATSEN_AFNEMERINDICATIE : case VERWIJDEREN_AFNEMERINDICATIE : resultaat = isValideAfnemerindicatie ( ) ; break ; case SYNCHRONISATIE_PERSOON : resultaat = isValideSynchronisatiePersoon ( ) ; break ; case GEEF_MEDEBEWONERS_VAN_PERSOON : resultaat = isValideGeefMedebewonersVanPersoon ( ) ; break ; default : final java . lang . String foutmelding = "Voor<sp>deze<sp>catalogusoptie<sp>is<sp>geen<sp>protocollering<sp>validatie<sp>ingesteld:<sp>" + ( soortDienst ) ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . error ( foutmelding ) ; throw new java . lang . IllegalArgumentException ( foutmelding ) ; } if ( ! resultaat ) { nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( ( "De<sp>protocollering<sp>is<sp>niet<sp>valide<sp>voor<sp>de<sp>catalogusoptie:<sp>{},<sp>" + ( ( "datum<sp>materieel<sp>selectie:<sp>{},<sp>datum<sp>aanvang<sp>materiele<sp>periode:<sp>{},<sp>" + "datum<sp>einde<sp>materiele<sp>periode:<sp>{},<sp>datum<sp>tijd<sp>aanv<sp>form<sp>periode:<sp>{},<sp>" ) + "ToegangAbonnementId<sp>dient<sp>gevuld<sp>te<sp>zijn." 1 ) ) , soortDienst , levering . getDatumMaterieelSelectie ( ) , levering . getDatumAanvangMaterielePeriodeResultaat ( ) , levering . getDatumEindeMaterielePeriodeResultaat ( ) , levering . getDatumTijdAanvangFormelePeriodeResultaat ( ) , levering . getDatumTijdEindeFormelePeriodeResultaat ( ) , historievorm ) ; } } return resultaat ; }
|
org . junit . Assert . assertFalse ( protocolleringOpdracht . isValide ( ) )
|
getBeanInfoFromMockedInterface ( mockit . ExpectationsUsingMockedTest$BusinessInterface ) { java . lang . Class < ? extends mockit . ExpectationsUsingMockedTest . BusinessInterface > mockClass = mock . getClass ( ) ; mockit . BeanInfo info = mockit . Introspector . getBeanInfo ( mockClass ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( info )
|
createNewOrderWithCustomAddress ( ) { net . magja . model . address . BasicAddress customerAddress = new net . magja . model . address . BasicAddress ( ) ; customerAddress . setFirstName ( "Atang" ) ; customerAddress . setLastName ( "Sutisna" ) ; customerAddress . setStreet ( "41123" 2 ) ; customerAddress . setCity ( "Bandung" ) ; customerAddress . setRegion ( "41123" 3 ) ; customerAddress . setPostCode ( "41123" ) ; customerAddress . setCountryCode ( "ID" ) ; customerAddress . setTelephone ( "022-09898989898" ) ; customerAddress . setCompany ( "Rachmart<sp>Family" ) ; net . magja . service . order . OrderRemoteServiceITest . log . info ( "41123" 0 , customerAddress ) ; java . util . List < net . magja . model . order . OrderFormItem > items = com . google . common . collect . ImmutableList . of ( new net . magja . model . order . OrderFormItem ( 1223L , 1.0 ) ) ; net . magja . model . order . OrderForm orderForm = new net . magja . model . order . OrderForm ( 2L , "IDR" , items , customerAddress , customerAddress ) ; net . magja . service . order . OrderRemoteServiceITest . log . info ( "41123" 1 , orderForm ) ; net . magja . service . order . OrderRemoteServiceITest . log . info ( "shippingAddress<sp>{}" , orderForm . getShippingAddress ( ) ) ; net . magja . service . order . OrderRemoteServiceITest . log . info ( "billingAddress<sp>{}" , orderForm . getBillingAddress ( ) ) ; java . lang . Object order = service . createEx ( orderForm ) ; "<AssertPlaceHolder>" ; } createEx ( net . magja . service . order . OrderForm ) { try { java . lang . String result = soapClient . callSingle ( ResourcePath . SalesOrderCreateEx , orderForm . serializeToApi ( ) ) ; return result ; } catch ( org . apache . axis2 . AxisFault e ) { log . debug ( ( "Error<sp>when<sp>creating<sp>OrderForm<sp>" + orderForm ) , e ) ; throw new net . magja . service . ServiceException ( ( "Error<sp>when<sp>creating<sp>OrderForm<sp>" + orderForm ) , e ) ; } }
|
org . junit . Assert . assertNotNull ( order )
|
testExpandSqueezeChain ( ) { lombok . val origShape = new long [ ] { 3 , 4 } ; for ( int i = 0 ; i < 3 ; i ++ ) { for ( org . nd4j . linalg . primitives . Pair < org . nd4j . linalg . api . ndarray . INDArray , java . lang . String > p : org . nd4j . linalg . checkutil . NDArrayCreationUtil . getAllTestMatricesWithShape ( origShape [ 0 ] , origShape [ 1 ] , 12345 , DataType . FLOAT ) ) { org . nd4j . linalg . api . ndarray . INDArray inArr = p . getFirst ( ) . muli ( 100 ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable in = sd . var ( "in" , inArr ) ; org . nd4j . autodiff . samediff . SDVariable expand = sd . expandDims ( in , i ) ; org . nd4j . autodiff . samediff . SDVariable squeeze = sd . squeeze ( expand , i ) ; org . nd4j . linalg . api . ndarray . INDArray out = sd . execAndEndResult ( ) ; java . lang . String msg = ( ( "expand/Squeeze=" + i ) + ",<sp>source=" ) + ( p . getSecond ( ) ) ; "<AssertPlaceHolder>" ; } } } getSecond ( ) { return second ; }
|
org . junit . Assert . assertEquals ( msg , out , inArr )
|
deveObterNumeroAtoConcessorioDrawbackComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemDetalheExportacao detalheExportacao = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemDetalheExportacao ( ) ; final java . math . BigInteger numeroAtoConcessorioDrawback = new java . math . BigInteger ( "99999999999" ) ; detalheExportacao . setNumeroAtoConcessorioDrawback ( numeroAtoConcessorioDrawback ) ; "<AssertPlaceHolder>" ; } getAtoConcessorioDrawback ( ) { return this . atoConcessorioDrawback ; }
|
org . junit . Assert . assertEquals ( numeroAtoConcessorioDrawback , detalheExportacao . getAtoConcessorioDrawback ( ) )
|
testAnnotationNameClashWithRegularClass ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( "package<sp>org.drools.test\n" + "import<sp>" ) + ( org . drools . compiler . integrationtests . AnnotationsTest . Duration . class . getCanonicalName ( ) ) ) + ";<sp>" ) + "<sp>durat<sp>:<sp>long<sp>" 1 ) + "<sp>@role(<sp>event<sp>)" ) + "<sp>@duration(<sp>durat<sp>)<sp>" ) + "<sp>durat<sp>:<sp>long<sp>" ) + "<sp>durat<sp>:<sp>long<sp>" 0 ) + "" ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "annotations-test" , kieBaseTestConfiguration , drl ) ; final org . kie . api . definition . type . FactType ft = kbase . getFactType ( "org.drools.test" , "Annot" ) ; "<AssertPlaceHolder>" ; } getKieBaseFromKieModuleFromDrl ( java . lang . String , org . drools . testcoverage . common . util . KieBaseTestConfiguration , java . lang . String [ ] ) { final java . util . List < org . kie . api . io . Resource > resources = org . drools . testcoverage . common . util . KieUtil . getResourcesFromDrls ( drls ) ; return org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromResources ( org . drools . testcoverage . common . util . KieUtil . generateReleaseId ( moduleGroupId ) , kieBaseTestConfiguration , resources . toArray ( new org . kie . api . io . Resource [ ] { } ) ) ; }
|
org . junit . Assert . assertNotNull ( ft )
|
testValidateAndTrimSecurityRoleFunctionKey ( ) { org . finra . herd . model . api . xml . SecurityRoleFunctionKey securityRoleFunctionKey = new org . finra . herd . model . api . xml . SecurityRoleFunctionKey ( SECURITY_ROLE , SECURITY_FUNCTION ) ; when ( alternateKeyHelper . validateStringParameter ( "security<sp>role<sp>name" , org . finra . herd . service . helper . SECURITY_ROLE ) ) . thenReturn ( org . finra . herd . service . helper . SECURITY_ROLE_2 ) ; when ( alternateKeyHelper . validateStringParameter ( "security<sp>function<sp>name" , org . finra . herd . service . helper . SECURITY_FUNCTION ) ) . thenReturn ( org . finra . herd . service . helper . SECURITY_FUNCTION_2 ) ; securityRoleFunctionHelper . validateAndTrimSecurityRoleFunctionKey ( securityRoleFunctionKey ) ; "<AssertPlaceHolder>" ; verify ( alternateKeyHelper ) . validateStringParameter ( "security<sp>role<sp>name" , org . finra . herd . service . helper . SECURITY_ROLE ) ; verify ( alternateKeyHelper ) . validateStringParameter ( "security<sp>function<sp>name" , org . finra . herd . service . helper . SECURITY_FUNCTION ) ; verifyNoMoreInteractions ( alternateKeyHelper ) ; } validateAndTrimSecurityRoleFunctionKey ( org . finra . herd . model . api . xml . SecurityRoleFunctionKey ) { org . springframework . util . Assert . notNull ( securityRoleFunctionKey , "A<sp>security<sp>role<sp>to<sp>function<sp>mapping<sp>key<sp>must<sp>be<sp>specified." ) ; securityRoleFunctionKey . setSecurityRoleName ( alternateKeyHelper . validateStringParameter ( "security<sp>role<sp>name" , securityRoleFunctionKey . getSecurityRoleName ( ) ) ) ; securityRoleFunctionKey . setSecurityFunctionName ( alternateKeyHelper . validateStringParameter ( "security<sp>function<sp>name" , securityRoleFunctionKey . getSecurityFunctionName ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . SecurityRoleFunctionKey ( SECURITY_ROLE_2 , SECURITY_FUNCTION_2 ) , securityRoleFunctionKey )
|
emptyValue ( ) { java . lang . String rac = "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=)" + "(CONNECT_DATA=(SERVICE_NAME=)))" ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . OracleNetConnectionDescriptorParser parser = new com . navercorp . pinpoint . plugin . jdbc . oracle . parser . OracleNetConnectionDescriptorParser ( rac ) ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . KeyValue keyValue = parser . parse ( ) ; logger . info ( keyValue . toString ( ) ) ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Description des = new com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Description ( keyValue ) ; "<AssertPlaceHolder>" ; } getServiceName ( ) { return this . serviceName ; }
|
org . junit . Assert . assertEquals ( des . getServiceName ( ) , null )
|
testBuildTransition2 ( ) { org . statefulj . fsm . model . State < org . statefulj . fsm . FSMBuilderTest . FooState > barState = new org . statefulj . fsm . model . impl . StateImpl < org . statefulj . fsm . FSMBuilderTest . FooState > ( "BAR" ) ; org . statefulj . fsm . FSMBuilderTest . FooState fooState = new org . statefulj . fsm . FSMBuilderTest . FooState ( ) ; this . fooStateFSM = FSM . FSMBuilder . newBuilder ( org . statefulj . fsm . FSMBuilderTest . FooState . class ) . buildState ( "FOO" ) . buildTransition ( "bar" ) . setToState ( barState ) . done ( ) . done ( ) . addState ( barState ) . build ( ) ; this . fooStateFSM . onEvent ( fooState , "bar" ) ; "<AssertPlaceHolder>" ; } getCurrentState ( T ) { return this . persister . getCurrent ( obj ) ; }
|
org . junit . Assert . assertEquals ( barState , this . fooStateFSM . getCurrentState ( fooState ) )
|
loadAtEndShouldBe15 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( serviceRoute ) , java . util . Collections . < jsprit . core . algorithm . state . Job > emptyList ( ) ) ; jsprit . core . algorithm . state . Capacity routeState = stateManager . getRouteState ( serviceRoute , InternalStates . LOAD_AT_END , jsprit . core . algorithm . state . Capacity . class ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 15 , routeState . get ( 0 ) )
|
testCountFilesAndCollectionsUnderPath ( ) { java . lang . String subdirPrefix = "testCountFilesAndCollectionsUnderPath" ; java . lang . String fileName = "testListCollectionsUnderPath.txt" ; int count = 30 ; org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . testingProperties ) ; java . lang . String targetIrodsCollection = org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . testingPropertiesHelper . buildIRODSCollectionAbsolutePathFromTestProperties ( org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . testingProperties , ( ( ( org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . IRODS_TEST_SUBDIR_PATH ) + "/" ) + subdirPrefix ) ) ; org . irods . jargon . core . pub . io . IRODSFile irodsFile = org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . irodsFileSystem . getIRODSFileFactory ( irodsAccount ) . instanceIRODSFile ( targetIrodsCollection ) ; irodsFile . mkdir ( ) ; irodsFile . close ( ) ; java . lang . String myTarget = "" ; for ( int i = 0 ; i < count ; i ++ ) { myTarget = ( ( targetIrodsCollection + "/c" ) + ( 10000 + i ) ) + subdirPrefix ; irodsFile = org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . irodsFileSystem . getIRODSFileFactory ( irodsAccount ) . instanceIRODSFile ( myTarget ) ; irodsFile . mkdir ( ) ; irodsFile . close ( ) ; } for ( int i = 0 ; i < count ; i ++ ) { myTarget = ( ( targetIrodsCollection + "/c" ) + ( 10000 + i ) ) + fileName ; irodsFile = org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . irodsFileSystem . getIRODSFileFactory ( irodsAccount ) . instanceIRODSFile ( myTarget ) ; irodsFile . createNewFile ( ) ; irodsFile . close ( ) ; } org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAO actual = org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getCollectionAndDataObjectListAndSearchAO ( irodsAccount ) ; int ctr = actual . countDataObjectsAndCollectionsUnderPath ( targetIrodsCollection ) ; "<AssertPlaceHolder>" ; } countDataObjectsAndCollectionsUnderPath ( java . lang . String ) { if ( absolutePathToParent == null ) { throw new java . lang . IllegalArgumentException ( "absolutePathToParent<sp>is<sp>null" ) ; } org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImpl . log . info ( "countDataObjectsAndCollectionsUnder:<sp>{}" , absolutePathToParent ) ; final org . irods . jargon . core . pub . domain . ObjStat objStat = retrieveObjectStatForPath ( absolutePathToParent ) ; org . irods . jargon . core . utils . MiscIRODSUtils . evaluateSpecCollSupport ( objStat ) ; final java . lang . String effectiveAbsolutePath = org . irods . jargon . core . utils . MiscIRODSUtils . determineAbsolutePathBasedOnCollTypeInObjectStat ( objStat ) ; org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImpl . log . info ( "determined<sp>effectiveAbsolutePathToBe:{}" , effectiveAbsolutePath ) ; if ( ! ( objStat . isSomeTypeOfCollection ( ) ) ) { org . irods . jargon . core . pub . CollectionAndDataObjectListAndSearchAOImpl . log . error ( "this<sp>is<sp>a<sp>file,<sp>not<sp>a<sp>directory,<sp>and<sp>therefore<sp>I<sp>cannot<sp>get<sp>a<sp>count<sp>of<sp>the<sp>children:<sp>{}" , absolutePathToParent ) ; throw new org . irods . jargon . core . exception . JargonException ( ( "attempting<sp>to<sp>count<sp>children<sp>under<sp>a<sp>file<sp>at<sp>path:" + absolutePathToParent ) ) ; } return ( collectionListingUtils . countCollectionsUnderPath ( objStat ) ) + ( collectionListingUtils . countDataObjectsUnderPath ( objStat ) ) ; }
|
org . junit . Assert . assertTrue ( ( ctr >= count ) )
|
testStop ( ) { appender . start ( ) ; appender . stop ( ) ; "<AssertPlaceHolder>" ; appender . doAppend ( "Test<sp>message" ) ; verify ( chat , never ( ) ) . sendMessage ( any ( org . jivesoftware . smack . packet . Message . class ) ) ; } stop ( ) { boolean doStop = ch . qos . logback . classic . net . XmppAppender . isStarted ( ) ; super . stop ( ) ; if ( ( doStop && ( ( conn ) != null ) ) && ( conn . isConnected ( ) ) ) { conn . disconnect ( ) ; chat = null ; } }
|
org . junit . Assert . assertFalse ( appender . isStarted ( ) )
|
testMethodWithInnerClassDollarSign ( ) { java . lang . String awtWindowClass = "java.awt.Window" ; org . adoptopenjdk . jitwatch . model . JITDataModel model = new org . adoptopenjdk . jitwatch . model . JITDataModel ( ) ; org . adoptopenjdk . jitwatch . model . MetaClass metaClass = null ; try { metaClass = model . buildAndGetMetaClass ( org . adoptopenjdk . jitwatch . util . ClassUtil . loadClassWithoutInitialising ( awtWindowClass ) ) ; } catch ( java . lang . ClassNotFoundException cnfe ) { cnfe . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } java . lang . String bytecodeSig = "static<sp>int<sp>access$600(java.awt.Window)" ; org . adoptopenjdk . jitwatch . model . MemberSignatureParts msp = org . adoptopenjdk . jitwatch . model . MemberSignatureParts . fromBytecodeSignature ( awtWindowClass , bytecodeSig ) ; org . adoptopenjdk . jitwatch . model . IMetaMember foundVarArgsMethod = metaClass . getMemberForSignature ( msp ) ; "<AssertPlaceHolder>" ; } getMemberForSignature ( org . adoptopenjdk . jitwatch . model . MemberSignatureParts ) { org . adoptopenjdk . jitwatch . model . IMetaMember result = null ; if ( DEBUG_LOGGING_SIG_MATCH ) { org . adoptopenjdk . jitwatch . model . MetaClass . logger . debug ( "Comparing:<sp>{}<sp>members<sp>of<sp>{}" , getMetaMembers ( ) . size ( ) , this ) ; } for ( org . adoptopenjdk . jitwatch . model . IMetaMember member : getMetaMembers ( ) ) { if ( member . matchesSignature ( msp , true ) ) { result = member ; break ; } } return result ; }
|
org . junit . Assert . assertNotNull ( foundVarArgsMethod )
|
testConvertWithNoRelations ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; java . lang . Long id = 1L ; org . lnu . is . domain . specoffer . SpecOfferType expected = new org . lnu . is . domain . specoffer . SpecOfferType ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; expected . setId ( id ) ; org . lnu . is . resource . specoffer . type . SpecOfferTypeResource source = new org . lnu . is . resource . specoffer . type . SpecOfferTypeResource ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; source . setId ( id ) ; org . lnu . is . domain . specoffer . SpecOfferType actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
nullMDC ( ) { org . slf4j . MDC . clear ( ) ; jee . setExpression ( "mdc.isEmpty()" ) ; jee . start ( ) ; ch . qos . logback . classic . spi . LoggingEvent event = makeLoggingEvent ( null ) ; "<AssertPlaceHolder>" ; } evaluate ( ch . qos . logback . access . spi . IAccessEvent ) { java . lang . String url = event . getRequestURL ( ) ; for ( java . lang . String expected : URLList ) { if ( url . contains ( expected ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( jee . evaluate ( event ) )
|
testOFPFlowActionSetFieldOFPFlowMatch ( ) { org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionSetField target = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionSetField ( match ) ; "<AssertPlaceHolder>" ; } getMatch ( ) { return match ; }
|
org . junit . Assert . assertThat ( target . getMatch ( ) , org . hamcrest . CoreMatchers . is ( match ) )
|
testIsAlmostNowComparedToOneSecondsBeforeNow ( ) { java . util . Date nowMinusOneSecond = org . apache . commons . lang3 . time . DateUtils . addSeconds ( new java . util . Date ( ) , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } isAlmostNow ( java . util . Date ) { boolean inRange = org . digidoc4j . utils . DateUtils . isInRangeOneMinute ( new java . util . Date ( ) , date ) ; org . digidoc4j . utils . DateUtils . logger . debug ( ( "Is<sp>almost<sp>now:<sp>" + inRange ) ) ; return inRange ; }
|
org . junit . Assert . assertTrue ( org . digidoc4j . utils . DateUtils . isAlmostNow ( nowMinusOneSecond ) )
|
shouldCheckSubclasses ( ) { com . orientechnologies . orient . core . command . OBasicCommandContext context = new com . orientechnologies . orient . core . command . OBasicCommandContext ( ) ; context . setDatabase ( database ) ; com . orientechnologies . orient . core . metadata . schema . OClass parentClass = createClassInstance ( ) ; com . orientechnologies . orient . core . metadata . schema . OClass childClass = createChildClassInstance ( parentClass ) ; com . orientechnologies . orient . core . sql . executor . CheckClassTypeStep step = new com . orientechnologies . orient . core . sql . executor . CheckClassTypeStep ( childClass . getName ( ) , parentClass . getName ( ) , context , false ) ; com . orientechnologies . orient . core . sql . executor . OResultSet result = step . syncPull ( context , 20 ) ; "<AssertPlaceHolder>" ; } stream ( ) { com . orientechnologies . orient . object . db . OObjectLazyListTest . EntityObjectWithList listObject = getTestObject ( ) ; listObject = databaseTx . save ( listObject ) ; com . orientechnologies . orient . object . db . OObjectLazyListTest . EntityObject newObject = new com . orientechnologies . orient . object . db . OObjectLazyListTest . EntityObject ( ) ; newObject . setFieldValue ( "NewObject" ) ; com . orientechnologies . orient . object . db . OObjectLazyListTest . EntityObject newObject2 = new com . orientechnologies . orient . object . db . OObjectLazyListTest . EntityObject ( ) ; newObject2 . setFieldValue ( "NewObject2" ) ; listObject . getEntityObjects ( ) . add ( 0 , newObject ) ; listObject . getEntityObjects ( ) . add ( listObject . getEntityObjects ( ) . size ( ) , newObject2 ) ; listObject = databaseTx . save ( listObject ) ; count = 0 ; listObject . getEntityObjects ( ) . stream ( ) . forEach ( ( entityObject ) -> { assertNotNull ( entityObject ) ; ( count ) ++ ; } ) ; org . junit . Assert . assertEquals ( listObject . getEntityObjects ( ) . size ( ) , count ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . stream ( ) . count ( ) )
|
testOr3Expression ( ) { com . hundredwordsgof . interpreter . Context context = new com . hundredwordsgof . interpreter . Context ( ) ; com . hundredwordsgof . interpreter . TerminalExpression firstTerminalExpression = new com . hundredwordsgof . interpreter . TerminalExpression ( true ) ; com . hundredwordsgof . interpreter . TerminalExpression secondTerminalExpression = new com . hundredwordsgof . interpreter . TerminalExpression ( false ) ; com . hundredwordsgof . interpreter . OrExpression orExpression = new com . hundredwordsgof . interpreter . OrExpression ( firstTerminalExpression , secondTerminalExpression ) ; orExpression . interpret ( context ) ; "<AssertPlaceHolder>" ; } isResult ( ) { return result ; }
|
org . junit . Assert . assertEquals ( true , context . isResult ( ) )
|
testCreateCGIContentLengthWithNonNumberHeader ( ) { when ( request . getHeader ( "Content-Length" ) ) . thenReturn ( "abc" ) ; "<AssertPlaceHolder>" ; } createCGIContentLength ( javax . servlet . http . HttpServletRequest , boolean ) { java . lang . String cgiContentLength = ( disallowEmptyResults ) ? "-1" : "" ; java . lang . String contentLength = request . getHeader ( "Content-Length" ) ; if ( ! ( com . google . common . base . Strings . isNullOrEmpty ( contentLength ) ) ) { try { long len = java . lang . Long . parseLong ( contentLength ) ; if ( len > 0 ) { cgiContentLength = java . lang . String . valueOf ( len ) ; } } catch ( java . lang . NumberFormatException ex ) { sonia . scm . web . cgi . DefaultCGIExecutor . logger . warn ( "received<sp>request<sp>with<sp>invalid<sp>content-length<sp>header<sp>value:<sp>{}" , contentLength ) ; } } return cgiContentLength ; }
|
org . junit . Assert . assertEquals ( "" , sonia . scm . web . cgi . DefaultCGIExecutor . createCGIContentLength ( request , false ) )
|
testXmlConfig ( ) { cm = new org . infinispan . manager . DefaultCacheManager ( "jdbc-config.xml" ) ; org . infinispan . Cache < java . lang . String , java . lang . String > cache = cm . getCache ( "anotherCache" ) ; cache . put ( "a" , "a" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { boolean statisticsEnabled = statsCollector . getStatisticsEnabled ( ) ; long start = 0 ; if ( statisticsEnabled ) { start = timeService . time ( ) ; } V value = super . get ( key ) ; if ( statisticsEnabled ) { long end = timeService . time ( ) ; if ( value == null ) { statsCollector . recordMisses ( 1 , ( end - start ) ) ; } else { statsCollector . recordHits ( 1 , ( end - start ) ) ; } } return value ; }
|
org . junit . Assert . assertEquals ( "a" , cache . get ( "a" ) )
|
testRemoveMasterAndMediatorRegistrationControlEntry ( ) { java . util . Map < io . joynr . accesscontrol . global . jee . persistence . ControlEntryType , java . util . function . Supplier < java . lang . Boolean > > globalDomainAccessControllerSubjectCalls = new java . util . HashMap ( ) ; globalDomainAccessControllerSubjectCalls . put ( ControlEntryType . MASTER , ( ) -> { return globalDomainAccessControlListEditorSubject . removeMasterRegistrationControlEntry ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . USER_ID , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . DOMAIN , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . INTERFACE_NAME ) ; } ) ; globalDomainAccessControllerSubjectCalls . put ( ControlEntryType . MEDIATOR , ( ) -> { return globalDomainAccessControlListEditorSubject . removeMediatorRegistrationControlEntry ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . USER_ID , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . DOMAIN , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . INTERFACE_NAME ) ; } ) ; java . util . Map < io . joynr . accesscontrol . global . jee . persistence . ControlEntryType , java . util . function . Consumer < joynr . infrastructure . DacTypes . MasterRegistrationControlEntry > > multicastVerifiers = new java . util . HashMap ( ) ; multicastVerifiers . put ( ControlEntryType . MASTER , ( mrce ) -> { verify ( globalDomainAccessControllerBeanMock ) . doFireMasterRegistrationControlEntryChanged ( eq ( ChangeType . REMOVE ) , eq ( mrce ) ) ; } ) ; multicastVerifiers . put ( ControlEntryType . MEDIATOR , ( mrce ) -> { verify ( globalDomainAccessControllerBeanMock ) . doFireMediatorRegistrationControlEntryChanged ( eq ( ChangeType . REMOVE ) , eq ( mrce ) ) ; } ) ; for ( io . joynr . accesscontrol . global . jee . persistence . ControlEntryType type : new io . joynr . accesscontrol . global . jee . persistence . ControlEntryType [ ] { io . joynr . accesscontrol . global . jee . persistence . ControlEntryType . MASTER , io . joynr . accesscontrol . global . jee . persistence . ControlEntryType . MEDIATOR } ) { joynr . infrastructure . DacTypes . MasterRegistrationControlEntry mrce = new joynr . infrastructure . DacTypes . MasterRegistrationControlEntry ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . USER_ID , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . DOMAIN , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . INTERFACE_NAME , joynr . infrastructure . DacTypes . TrustLevel . LOW , new joynr . infrastructure . DacTypes . TrustLevel [ 0 ] , joynr . infrastructure . DacTypes . TrustLevel . HIGH , new joynr . infrastructure . DacTypes . TrustLevel [ 0 ] , joynr . infrastructure . DacTypes . Permission . ASK , new joynr . infrastructure . DacTypes . Permission [ 0 ] ) ; when ( masterRegistrationControlEntryManagerMock . removeByUserIdDomainInterfaceNameAndType ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . USER_ID , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . DOMAIN , io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . INTERFACE_NAME , type ) ) . thenReturn ( mrce ) ; "<AssertPlaceHolder>" ; verify ( masterRegistrationControlEntryManagerMock ) . removeByUserIdDomainInterfaceNameAndType ( eq ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . USER_ID ) , eq ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . DOMAIN ) , eq ( io . joynr . accesscontrol . global . jee . GlobalDomainAccessControlListEditorBeanTest . INTERFACE_NAME ) , eq ( type ) ) ; multicastVerifiers . get ( type ) . accept ( mrce ) ; } } get ( java . lang . String ) { io . joynr . messaging . routing . RoutingTableImpl . logger . trace ( "entering<sp>get(participantId={})" , participantId ) ; dumpRoutingTableEntry ( ) ; io . joynr . messaging . routing . RoutingTableImpl . RoutingEntry routingEntry = hashMap . get ( participantId ) ; if ( routingEntry == null ) { io . joynr . messaging . routing . RoutingTableImpl . logger . trace ( "leaving<sp>get(participantId={})<sp>=<sp>null" , participantId ) ; return null ; } io . joynr . messaging . routing . RoutingTableImpl . logger . trace ( "leaving<sp>get(participantId={})<sp>=<sp>{}" , participantId , routingEntry . getAddress ( ) ) ; return routingEntry . getAddress ( ) ; }
|
org . junit . Assert . assertTrue ( globalDomainAccessControllerSubjectCalls . get ( type ) . get ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.