input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testIsSerializable_withMarkup ( ) { java . lang . String text = "<i>labelText</i>" ; label . setData ( RWT . MARKUP_ENABLED , Boolean . TRUE ) ; label . setText ( text ) ; org . eclipse . swt . widgets . Label deserializedLabel = serializeAndDeserialize ( label ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; }
org . junit . Assert . assertEquals ( text , deserializedLabel . getText ( ) )
testObjectForQueryNoObject ( ) { org . apache . cayenne . ObjectId id = org . apache . cayenne . ObjectId . of ( "Artist" , Artist . ARTIST_ID_PK_COLUMN , 44001 ) ; java . lang . Object object = org . apache . cayenne . Cayenne . objectForQuery ( context , new org . apache . cayenne . query . ObjectIdQuery ( id ) ) ; "<AssertPlaceHolder>" ; } objectForQuery ( org . apache . cayenne . ObjectContext , org . apache . cayenne . query . Query ) { java . util . List < ? > objects = context . performQuery ( query ) ; if ( ( objects . size ( ) ) == 0 ) { return null ; } else if ( ( objects . size ( ) ) > 1 ) { throw new org . apache . cayenne . CayenneRuntimeException ( "Expected<sp>zero<sp>or<sp>one<sp>object,<sp>instead<sp>query<sp>matched:<sp>%d" , objects . size ( ) ) ; } return objects . get ( 0 ) ; }
org . junit . Assert . assertNull ( object )
falseTest ( ) { java . util . List < com . github . anno4j . model . Annotation > annotations = queryService . addCriteria ( "oa:hasBody/ex:value" , "Value3" ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { try { if ( ( _size ) < 0 ) { synchronized ( this ) { if ( ( _size ) < 0 ) { int index = findSize ( ) ; _size = index ; } } } return _size ; } catch ( org . openrdf . repository . RepositoryException e ) { throw new org . openrdf . repository . object . exceptions . ObjectStoreException ( e ) ; } }
org . junit . Assert . assertEquals ( 0 , annotations . size ( ) )
testGetSolutionPath_fromAppContext ( ) { org . pentaho . platform . api . engine . IApplicationContext appContext = mock ( org . pentaho . platform . api . engine . IApplicationContext . class ) ; when ( appContext . getSolutionPath ( "system" ) ) . thenReturn ( f . getParent ( ) ) ; org . pentaho . platform . engine . core . system . PentahoSystem . setApplicationContext ( appContext ) ; java . lang . String solutionPath = org . pentaho . platform . config . SolutionPropertiesFileConfiguration . getSolutionPath ( ) ; "<AssertPlaceHolder>" ; } getParent ( ) { return parent ; }
org . junit . Assert . assertEquals ( f . getParent ( ) , solutionPath )
sublistSize ( ) { final software . amazon . ion . IonSequence sequence = newSequence ( ) ; final java . util . List < software . amazon . ion . IonValue > actual = sequence . subList ( 2 , 5 ) ; "<AssertPlaceHolder>" ; } size ( ) { return _buf_limit ; }
org . junit . Assert . assertEquals ( 3 , actual . size ( ) )
canGetAllValues ( ) { com . javafortesters . chap010collections . examples . Map < java . lang . String , java . lang . String > map = new com . javafortesters . chap010collections . examples . HashMap ( ) ; map . put ( "key1" , "value1" ) ; map . put ( "key2" , "value2" ) ; map . put ( "key3" , "value3" ) ; com . javafortesters . chap010collections . examples . Collection < java . lang . String > values = map . values ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( map . size ( ) , values . size ( ) )
testSafeModeNotSet ( ) { com . nearinfinity . blur . manager . clusterstatus . ZookeeperClusterStatusTest . LOG . warn ( "testSafeModeNotSet" ) ; "<AssertPlaceHolder>" ; new com . nearinfinity . blur . manager . clusterstatus . ZookeeperClusterStatusTest . WaitForAnswerToBeCorrect ( 20L ) { @ com . nearinfinity . blur . manager . clusterstatus . Override public java . lang . Object run ( ) { return clusterStatus . isInSafeMode ( true , com . nearinfinity . blur . manager . clusterstatus . ZookeeperClusterStatusTest . DEFAULT ) ; } } . test ( false ) ; } isInSafeMode ( boolean , java . lang . String ) { if ( useCache ) { java . lang . Long safeModeTimestamp = _safeModeMap . get ( cluster ) ; if ( ( safeModeTimestamp != null ) && ( safeModeTimestamp != ( Long . MIN_VALUE ) ) ) { return safeModeTimestamp < ( java . lang . System . currentTimeMillis ( ) ) ? false : true ; } } long s = java . lang . System . nanoTime ( ) ; try { checkIfOpen ( ) ; java . lang . String blurSafemodePath = com . nearinfinity . blur . manager . clusterstatus . ZookeeperPathConstants . getSafemodePath ( cluster ) ; org . apache . zookeeper . data . Stat stat = _zk . exists ( blurSafemodePath , false ) ; if ( stat == null ) { return false ; } byte [ ] data = _zk . getData ( blurSafemodePath , false , stat ) ; if ( data == null ) { return false ; } long timestamp = java . lang . Long . parseLong ( new java . lang . String ( data ) ) ; long waitTime = timestamp - ( java . lang . System . currentTimeMillis ( ) ) ; if ( waitTime > 0 ) { return true ; } return false ; } catch ( org . apache . zookeeper . KeeperException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . InterruptedException e ) { throw new java . lang . RuntimeException ( e ) ; } finally { long e = java . lang . System . nanoTime ( ) ; com . nearinfinity . blur . manager . clusterstatus . ZookeeperClusterStatus . LOG . debug ( ( ( "trace<sp>isInSafeMode<sp>took<sp>[" + ( ( e - s ) / 1000000.0 ) ) + "<sp>ms]" ) ) ; } }
org . junit . Assert . assertFalse ( clusterStatus . isInSafeMode ( false , com . nearinfinity . blur . manager . clusterstatus . ZookeeperClusterStatusTest . DEFAULT ) )
testGetClinic ( ) { org . oscarehr . common . model . Clinic clinic1 = new org . oscarehr . common . model . Clinic ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( clinic1 ) ; dao . persist ( clinic1 ) ; org . oscarehr . common . model . Clinic clinic2 = new org . oscarehr . common . model . Clinic ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( clinic2 ) ; dao . persist ( clinic2 ) ; org . oscarehr . common . model . Clinic clinic3 = new org . oscarehr . common . model . Clinic ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( clinic3 ) ; dao . persist ( clinic3 ) ; org . oscarehr . common . model . Clinic expectedResult = clinic1 ; org . oscarehr . common . model . Clinic result = dao . getClinic ( ) ; "<AssertPlaceHolder>" ; } getClinic ( ) { javax . persistence . Query query = entityManager . createQuery ( "FROM<sp>ClinicInfoDataObject<sp>c" ) ; query . setMaxResults ( 1 ) ; org . oscarehr . sharingcenter . model . ClinicInfoDataObject retVal = getSingleResultOrNull ( query ) ; if ( retVal != null ) { return retVal ; } org . oscarehr . util . MiscUtils . getLogger ( ) . warn ( "Please<sp>update<sp>the<sp>'Administration/Clinic<sp>Info'<sp>page" ) ; org . oscarehr . sharingcenter . model . ClinicInfoDataObject failsafe = new org . oscarehr . sharingcenter . model . ClinicInfoDataObject ( ) ; failsafe . setFacilityName ( "facility" ) ; failsafe . setLocalAppName ( "app" ) ; failsafe . setName ( "name" ) ; failsafe . setNamespaceId ( "namespace" ) ; failsafe . setOid ( "organization<sp>oid" ) ; failsafe . setUniversalId ( "universal<sp>id" ) ; failsafe . setSourceId ( "source<sp>id" ) ; return failsafe ; }
org . junit . Assert . assertEquals ( expectedResult , result )
testGetOriginalParentFolderPath ( ) { final java . lang . String fileID = "testFileID" ; final java . lang . String origParentFolderPath = "origParentFolderPath" ; final java . lang . String relToAbs_origParentFolderPath = "relToAbs_origParentFolderPath" ; final javax . jcr . Property origParentFolderPathProperty = mock ( javax . jcr . Property . class ) ; when ( origParentFolderPathProperty . getString ( ) ) . thenReturn ( origParentFolderPath ) ; final javax . jcr . Node parentNode = mock ( javax . jcr . Node . class ) ; when ( parentNode . getProperty ( eq ( pentahoJcrConstants . getPHO_ORIGPARENTFOLDERPATH ( ) ) ) ) . thenReturn ( origParentFolderPathProperty ) ; when ( parentNode . hasProperty ( eq ( pentahoJcrConstants . getPHO_ORIGPARENTFOLDERPATH ( ) ) ) ) . thenReturn ( true ) ; final javax . jcr . Node node = mock ( javax . jcr . Node . class ) ; when ( session . getNodeByIdentifier ( eq ( fileID ) ) ) . thenReturn ( node ) ; when ( node . getParent ( ) ) . thenReturn ( parentNode ) ; when ( pathConversionHelper . relToAbs ( eq ( origParentFolderPath ) ) ) . thenReturn ( relToAbs_origParentFolderPath ) ; try { final java . lang . String originalParentFolderPath = defaultDeleteHelper . getOriginalParentFolderPath ( session , pentahoJcrConstants , fileID ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } } getOriginalParentFolderPath ( javax . jcr . Session , org . pentaho . platform . repository2 . unified . jcr . PentahoJcrConstants , java . io . Serializable ) { return org . pentaho . platform . repository2 . unified . jcr . JcrStringHelper . pathDecode ( getOriginalParentFolderPath ( session , pentahoJcrConstants , session . getNodeByIdentifier ( fileId . toString ( ) ) , false ) ) ; }
org . junit . Assert . assertEquals ( relToAbs_origParentFolderPath , originalParentFolderPath )
testShutdownHandlerWithCorrectSecret ( ) { final java . lang . String secretKey = "bigSecret" ; final org . glassfish . grizzly . impl . FutureImpl < java . lang . Boolean > shutdownFuture = org . glassfish . grizzly . impl . SafeFutureImpl . create ( ) ; final org . glassfish . grizzly . http . ajp . ShutdownHandler shutDownHandler = new org . glassfish . grizzly . http . ajp . ShutdownHandler ( ) { @ org . glassfish . grizzly . http . ajp . Override public void onShutdown ( org . glassfish . grizzly . Connection initiator ) { shutdownFuture . result ( true ) ; } } ; org . glassfish . grizzly . http . ajp . AjpAddOn myAjpAddon = new org . glassfish . grizzly . http . ajp . AjpAddOn ( ) { @ org . glassfish . grizzly . http . ajp . Override protected org . glassfish . grizzly . http . ajp . AjpHandlerFilter createAjpHandlerFilter ( ) { final org . glassfish . grizzly . http . ajp . AjpHandlerFilter filter = new org . glassfish . grizzly . http . ajp . AjpHandlerFilter ( ) ; filter . addShutdownHandler ( shutDownHandler ) ; return filter ; } } ; myAjpAddon . configure ( false , secretKey ) ; final org . glassfish . grizzly . http . server . NetworkListener listener = httpServer . getListener ( org . glassfish . grizzly . http . ajp . LISTENER_NAME ) ; listener . deregisterAddOn ( ajpAddon ) ; listener . registerAddOn ( myAjpAddon ) ; startHttpServer ( new org . glassfish . grizzly . http . server . HttpHandler ( ) { @ org . glassfish . grizzly . http . ajp . Override public void service ( org . glassfish . grizzly . http . server . Request request , org . glassfish . grizzly . http . server . Response response ) throws org . glassfish . grizzly . http . ajp . Exception { } } , "/" ) ; org . glassfish . grizzly . Buffer request = org . glassfish . grizzly . memory . Buffers . wrap ( listener . getTransport ( ) . getMemoryManager ( ) , new org . glassfish . grizzly . http . ajp . AjpShutdownPacket ( secretKey ) . toByteArray ( ) ) ; send ( "localhost" , org . glassfish . grizzly . http . ajp . PORT , request ) ; final java . lang . Boolean b = shutdownFuture . get ( 10 , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } get ( org . glassfish . grizzly . filterchain . FilterChainContext . Operation , int ) { final int opIdx = operation . ordinal ( ) ; final org . glassfish . grizzly . filterchain . DefaultFilterChain . FilterStateElement elem = state [ opIdx ] [ filterIndex ] ; if ( ( elem != null ) && ( elem . isValid ) ) { return elem ; } return null ; }
org . junit . Assert . assertTrue ( b )
testGetAttachmentsByProjectIdWithNotDiscard ( ) { java . util . List < com . onboard . domain . model . Attachment > resultList = attachmentService . getAttachmentsByProjectIdWithNotDiscard ( com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . id , com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . start , com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . limit ) ; verify ( mockAttachmentMapper ) . selectByExample ( argThat ( new com . onboard . test . exampleutils . ExampleMatcher < com . onboard . domain . mapper . model . AttachmentExample > ( ) { @ com . onboard . service . collaboration . impl . test . Override public boolean matches ( com . onboard . domain . mapper . model . common . BaseExample example ) { return ( ( ( ( ( com . onboard . test . exampleutils . CriterionVerifier . verifyStart ( example , com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . start ) ) && ( com . onboard . test . exampleutils . CriterionVerifier . verifyLimit ( example , com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . limit ) ) ) && ( com . onboard . test . exampleutils . CriterionVerifier . verifyOrderByClause ( example , "id<sp>desc" ) ) ) && ( com . onboard . test . exampleutils . CriterionVerifier . verifyGraterThan ( example , "attachId" , 0 ) ) ) && ( com . onboard . test . exampleutils . CriterionVerifier . verifyEqualTo ( example , "deleted" , false ) ) ) && ( com . onboard . test . exampleutils . CriterionVerifier . verifyEqualTo ( example , "projectId" , com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . id ) ) ; } } ) ) ; verify ( mockUserService , times ( 2 ) ) . getById ( com . onboard . service . collaboration . impl . test . AttachmentServiceImplTest . id ) ; verify ( mockTagService , times ( 2 ) ) . fillTags ( attachment ) ; "<AssertPlaceHolder>" ; } fillTags ( com . onboard . domain . model . type . Taggable ) { com . onboard . domain . model . TagAttach tagAttach = new com . onboard . domain . model . TagAttach ( ) ; tagAttach . setAttachId ( tagable . getId ( ) ) ; tagAttach . setAttachType ( tagable . getType ( ) ) ; java . util . List < com . onboard . domain . model . TagAttach > tagAttachs = tagAttachMapper . selectByExample ( new com . onboard . domain . mapper . model . TagAttachExample ( tagAttach ) ) ; java . util . List < com . onboard . domain . model . Tag > tags = new java . util . ArrayList < com . onboard . domain . model . Tag > ( ) ; for ( com . onboard . domain . model . TagAttach ta : tagAttachs ) { tags . add ( tagMapper . selectByPrimaryKey ( ta . getTagId ( ) ) ) ; } tagable . setTags ( tags ) ; }
org . junit . Assert . assertEquals ( list , resultList )
testHasMovie ( ) { storage . storeMovie ( org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . ID , org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . DATA ) ; "<AssertPlaceHolder>" ; } hasMovie ( java . lang . String ) { return fileForMovie ( movieId ) . exists ( ) ; }
org . junit . Assert . assertEquals ( true , storage . hasMovie ( org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . ID ) )
importConsumerWithNullUuidOnOwnerShouldSetUuid ( ) { org . candlepin . dto . manifest . v1 . OwnerDTO ownerDTO = mock ( org . candlepin . dto . manifest . v1 . OwnerDTO . class ) ; org . candlepin . model . Owner owner = mock ( org . candlepin . model . Owner . class ) ; org . candlepin . dto . manifest . v1 . ConsumerDTO consumer = mock ( org . candlepin . dto . manifest . v1 . ConsumerDTO . class ) ; org . candlepin . dto . manifest . v1 . ConsumerTypeDTO type = mock ( org . candlepin . dto . manifest . v1 . ConsumerTypeDTO . class ) ; when ( ownerDTO . getId ( ) ) . thenReturn ( "test-owner-id" ) ; when ( consumer . getUuid ( ) ) . thenReturn ( "test-uuid" ) ; when ( consumer . getOwner ( ) ) . thenReturn ( ownerDTO ) ; when ( consumer . getType ( ) ) . thenReturn ( type ) ; org . candlepin . model . IdentityCertificate idCert = new org . candlepin . model . IdentityCertificate ( ) ; idCert . setSerial ( new org . candlepin . model . CertificateSerial ( ) ) ; importer . store ( owner , consumer , new org . candlepin . sync . ConflictOverrides ( ) , idCert ) ; org . mockito . ArgumentCaptor < org . candlepin . model . UpstreamConsumer > arg = org . mockito . ArgumentCaptor . forClass ( org . candlepin . model . UpstreamConsumer . class ) ; verify ( owner ) . setUpstreamConsumer ( arg . capture ( ) ) ; "<AssertPlaceHolder>" ; verify ( curator ) . merge ( owner ) ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( "test-uuid" , arg . getValue ( ) . getUuid ( ) )
updateConfiguredParameterValues_ConfigurableParameter ( ) { org . oscm . domobjects . Product product = givenProductWithParamsHavingDefaultValues ( "Param_ID1" , "Param_ID2" ) ; org . oscm . domobjects . Subscription subscription = givenSubscriptionWithParamsHavingOtherVaues ( "Param_ID1" , "Param_ID2" ) ; java . util . List < org . oscm . subscriptionservice . bean . VOParameter > parameters = givenConfigurableStandardParametersToUpdate ( "Param_ID1" , "Param_ID2" ) ; java . util . List < org . oscm . domobjects . Parameter > result = bean . updateConfiguredParameterValues ( product , parameters , subscription ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
testMeasurementIsAdded ( ) { measure ( ) . time ( exchange ) ; org . openehealth . ipf . commons . test . performance . MeasurementHistory initialHistory = processor . getMeasurementHistory ( exchange ) ; java . util . List < org . openehealth . ipf . commons . test . performance . Measurement > measurementsBefore = initialHistory . getMeasurements ( ) ; processor . process ( exchange ) ; org . openehealth . ipf . commons . test . performance . MeasurementHistory newHistory = processor . getMeasurementHistory ( exchange ) ; java . util . List < org . openehealth . ipf . commons . test . performance . Measurement > measurementsAfter = newHistory . getMeasurements ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return entries . size ( ) ; }
org . junit . Assert . assertEquals ( ( ( measurementsBefore . size ( ) ) + 1 ) , measurementsAfter . size ( ) )
testExternalTaskStacktraceBinary ( ) { testRule . deploy ( "org/camunda/bpm/engine/test/api/externaltask/oneExternalTaskProcess.bpmn20.xml" ) ; runtimeService . startProcessInstanceByKey ( "oneExternalTaskProcess" ) ; java . util . List < org . camunda . bpm . engine . externaltask . LockedExternalTask > tasks = externalTaskService . fetchAndLock ( 5 , org . camunda . bpm . engine . test . api . resources . RuntimeByteArrayTest . WORKER_ID ) . topic ( org . camunda . bpm . engine . test . api . resources . RuntimeByteArrayTest . TOPIC_NAME , org . camunda . bpm . engine . test . api . resources . RuntimeByteArrayTest . LOCK_TIME ) . execute ( ) ; org . camunda . bpm . engine . externaltask . LockedExternalTask task = tasks . get ( 0 ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( nowPlus ( 3000L ) ) ; java . lang . String errorMessage ; java . lang . String exceptionStackTrace ; try { throw new org . apache . ibatis . jdbc . RuntimeSqlException ( "test<sp>cause" ) ; } catch ( java . lang . RuntimeException e ) { exceptionStackTrace = org . apache . commons . lang3 . exception . ExceptionUtils . getStackTrace ( e ) ; errorMessage = e . getMessage ( ) ; } "<AssertPlaceHolder>" ; externalTaskService . handleFailure ( task . getId ( ) , org . camunda . bpm . engine . test . api . resources . RuntimeByteArrayTest . WORKER_ID , errorMessage , exceptionStackTrace , 5 , 3000L ) ; org . camunda . bpm . engine . impl . persistence . entity . ExternalTaskEntity externalTask = ( ( org . camunda . bpm . engine . impl . persistence . entity . ExternalTaskEntity ) ( externalTaskService . createExternalTaskQuery ( ) . singleResult ( ) ) ) ; org . camunda . bpm . engine . impl . persistence . entity . ByteArrayEntity byteArrayEntity = configuration . getCommandExecutorTxRequired ( ) . execute ( new org . camunda . bpm . engine . test . api . resources . GetByteArrayCommand ( externalTask . getErrorDetailsByteArrayId ( ) ) ) ; checkBinary ( byteArrayEntity ) ; } getMessage ( ) { return message ; }
org . junit . Assert . assertNotNull ( exceptionStackTrace )
testPutSpecifiedIndices2d ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( 3 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray toPut = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 } , new int [ ] { 2 , 2 } , 'c' ) ; org . nd4j . linalg . indexing . INDArrayIndex [ ] indices = new org . nd4j . linalg . indexing . INDArrayIndex [ ] { org . nd4j . linalg . indexing . NDArrayIndex . indices ( 0 , 2 ) , org . nd4j . linalg . indexing . NDArrayIndex . indices ( 1 , 3 ) } ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 0 , 1 , 0 , 2 } , new double [ ] { 0 , 0 , 0 , 0 } , new double [ ] { 0 , 3 , 0 , 4 } } ) ; arr . put ( indices , toPut ) ; "<AssertPlaceHolder>" ; } put ( org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { org . nd4j . linalg . indexing . INDArrayIndex [ ] realIndices = new org . nd4j . linalg . indexing . INDArrayIndex [ indices . rank ( ) ] ; for ( int i = 0 ; i < ( realIndices . length ) ; i ++ ) { realIndices [ i ] = new org . nd4j . linalg . indexing . SpecifiedIndex ( indices . slice ( i ) . dup ( ) . data ( ) . asInt ( ) ) ; } return put ( realIndices , element ) ; }
org . junit . Assert . assertEquals ( exp , arr )
addAllIndexEndRemovedTest ( ) { java . util . List < java . lang . Integer > toAddList = new java . util . ArrayList ( 5 ) ; toAddList . add ( 100 ) ; toAddList . add ( 200 ) ; toAddList . add ( 300 ) ; toAddList . add ( 400 ) ; toAddList . add ( 500 ) ; org . threadly . concurrent . collections . ConcurrentArrayList . DataSet < java . lang . Integer > result = org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . removedFromEnd . addAll ( 5 , toAddList ) . addAll ( 0 , toAddList ) ; java . lang . Integer [ ] expectedResult = new java . lang . Integer [ ] { 100 , 200 , 300 , 400 , 500 , 0 , 1 , 2 , 3 , 4 , 100 , 200 , 300 , 400 , 500 , 5 , 6 , 7 , 8 } ; "<AssertPlaceHolder>" ; } makeDataSet ( java . lang . Object [ ] , int , int ) { return new org . threadly . concurrent . collections . ConcurrentArrayList . DataSet ( dataArray , startPosition , endPosition , 0 , 0 ) ; }
org . junit . Assert . assertTrue ( result . equals ( org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . makeDataSet ( expectedResult , 0 , expectedResult . length ) ) )
getSubscriptionsForMyBrokerCustomersFilteredBySubscriptionIdNoSubscriptionReturned ( ) { final java . lang . String not_existing_subscription = "not<sp>existing" ; final int expected = 0 ; java . util . Set < org . oscm . paginator . Filter > filterSet = createFilterSet ( not_existing_subscription , null , null , null , null ) ; final org . oscm . paginator . Pagination pagination = createPagination ( 0 , NUM_CUSTOMER_SUBSCRIPTIONS , null , filterSet ) ; java . util . List < org . oscm . domobjects . Subscription > result = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . domobjects . Subscription > > ( ) { @ org . oscm . subscriptionservice . dao . Override public java . util . List < org . oscm . domobjects . Subscription > call ( ) throws org . oscm . subscriptionservice . dao . Exception { return dao . getSubscriptionsForMyBrokerCustomers ( supplierUser , states , pagination ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( expected , result . size ( ) )
testCreateSecurityRoleMissingOptionalParameters ( ) { org . finra . herd . model . api . xml . SecurityRole securityRole = securityRoleService . createSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleCreateRequest ( SECURITY_ROLE , null ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . SecurityRole ( SECURITY_ROLE , null ) , securityRole )
runnerShouldBeAliveAliveWhenStatusDone ( ) { runner . setStatus ( Runner . Status . DONE ) ; "<AssertPlaceHolder>" ; } isAlive ( ) { return java . util . EnumSet . range ( Status . RUNNING , Status . DONE ) . contains ( status ) ; }
org . junit . Assert . assertThat ( runner . isAlive ( ) , org . hamcrest . core . Is . is ( true ) )
testGetColorScale_ColorScaleFromColorScaleBaseDir ( ) { final java . lang . String colorScaleJSON = getTestColorScale ( ) ; final org . mrgeo . colorscale . ColorScale csExp = org . mrgeo . colorscale . ColorScale . loadFromJSON ( colorScaleJSON ) ; org . mrgeo . core . MrGeoProperties . getInstance ( ) . put ( MrGeoConstants . MRGEO_HDFS_COLORSCALE , ( "file://" + ( org . mrgeo . test . TestUtils . composeInputDir ( org . mrgeo . colorscale . ColorScaleManagerTest . class ) ) ) ) ; org . mrgeo . colorscale . ColorScaleManager . resetColorscales ( ) ; final org . mrgeo . colorscale . ColorScale cs = org . mrgeo . colorscale . ColorScaleManager . fromName ( "ColorScaleTest" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( other instanceof org . mrgeo . data . raster . RasterWritable ) && ( java . util . Arrays . equals ( bytes , ( ( org . mrgeo . data . raster . RasterWritable ) ( other ) ) . bytes ) ) ; }
org . junit . Assert . assertEquals ( true , cs . equals ( csExp ) )
testStaticGetOrderPolicyWithNull ( ) { "<AssertPlaceHolder>" ; } getOrderPolicy ( org . springframework . data . gemfire . wan . OrderPolicyType ) { return orderPolicyType != null ? orderPolicyType . getOrderPolicy ( ) : null ; }
org . junit . Assert . assertNull ( org . springframework . data . gemfire . wan . OrderPolicyType . getOrderPolicy ( null ) )
testWorkItemWhenItDoesNotHaveWorkItemDefinition ( ) { final org . drools . workbench . models . datamodel . workitems . PortableWorkDefinition workDefinition = mock ( org . drools . workbench . models . datamodel . workitems . PortableWorkDefinition . class ) ; final java . lang . String workItemName = "workItem" ; doReturn ( workItemName ) . when ( workDefinition ) . getName ( ) ; doReturn ( workDefinition ) . when ( plugin ) . getWorkItemDefinition ( ) ; final java . lang . String workItem = plugin . getWorkItem ( ) ; "<AssertPlaceHolder>" ; } getWorkItem ( ) { return selectedWorkItemKey ; }
org . junit . Assert . assertEquals ( workItemName , workItem )
testBeanTypeConstructor ( ) { com . vaadin . ui . TreeGrid < com . vaadin . tests . data . bean . Person > treeGrid = new com . vaadin . ui . TreeGrid ( com . vaadin . tests . data . bean . Person . class ) ; "<AssertPlaceHolder>" ; } getBeanType ( ) { return beanType ; }
org . junit . Assert . assertEquals ( com . vaadin . tests . data . bean . Person . class , treeGrid . getBeanType ( ) )
shouldDecorateGetFunctionMapper ( ) { javax . el . FunctionMapper funcationMapper = mock ( javax . el . FunctionMapper . class ) ; given ( this . decorated . getFunctionMapper ( ) ) . willReturn ( funcationMapper ) ; javax . el . FunctionMapper actual = this . decorator . getFunctionMapper ( ) ; "<AssertPlaceHolder>" ; verify ( this . decorated ) . getFunctionMapper ( ) ; } getFunctionMapper ( ) { return null ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( funcationMapper ) )
testIsTrue4 ( ) { org . apache . commons . lang3 . Validate . isTrue ( true , "MSG" , 7 ) ; try { org . apache . commons . lang3 . Validate . isTrue ( false , "MSG" , 7 ) ; org . junit . Assert . fail ( "Expecting<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return getMessage ( Locale . US ) ; }
org . junit . Assert . assertEquals ( "MSG" , ex . getMessage ( ) )
byteBufTest ( ) { io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . directBuffer ( ) ; buf . writeInt ( 1234 ) ; int val = buf . readInt ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 1234 , val )
testDeterminizeFsa ( ) { com . github . steveash . jopenfst . MutableFst fstA = com . github . steveash . jopenfst . io . Convert . importFst ( "data/tests/algorithms/determinize/A" , TropicalSemiring . INSTANCE ) ; com . github . steveash . jopenfst . MutableFst determinized = com . github . steveash . jopenfst . io . Convert . importFst ( "data/tests/algorithms/determinize/expected" , TropicalSemiring . INSTANCE ) ; com . github . steveash . jopenfst . MutableFst fstDeterminized = new com . github . steveash . jopenfst . operations . Determinize ( ) . compute ( fstA ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) { return false ; } com . github . steveash . jopenfst . IndexWeight that = ( ( com . github . steveash . jopenfst . IndexWeight ) ( o ) ) ; if ( ( index ) != ( that . index ) ) { return false ; } return ( java . lang . Double . compare ( that . weight , weight ) ) == 0 ; }
org . junit . Assert . assertTrue ( determinized . equals ( fstDeterminized ) )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . tools . service . builder . test . model . NestedSetsTreeEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "nestedSetsTreeEntryId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "nestedSetsTreeEntryId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testFullChain ( ) { final org . jivesoftware . openfire . keystore . X509CertSelector selector = new org . jivesoftware . openfire . keystore . X509CertSelector ( ) ; selector . setSubject ( validChain [ 0 ] . getSubjectX500Principal ( ) ) ; final org . jivesoftware . openfire . keystore . X509Certificate [ ] chain = validChain ; final org . jivesoftware . openfire . keystore . CertPath result = trustManager . checkChainTrusted ( selector , chain ) ; "<AssertPlaceHolder>" ; } checkChainTrusted ( org . jivesoftware . openfire . keystore . CertSelector , org . jivesoftware . openfire . keystore . X509Certificate [ ] ) { if ( selector == null ) { throw new java . lang . IllegalArgumentException ( "Argument<sp>'selector'<sp>cannot<sp>be<sp>null" ) ; } if ( ( chain == null ) || ( ( chain . length ) == 0 ) ) { throw new java . lang . IllegalArgumentException ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 8 ) ; } org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Attempting<sp>to<sp>verify<sp>a<sp>chain<sp>of<sp>{}<sp>certificates." , chain . length ) ; final org . jivesoftware . openfire . keystore . Set < org . jivesoftware . openfire . keystore . X509Certificate > trustedIssuers = new org . jivesoftware . openfire . keystore . HashSet ( ) ; trustedIssuers . addAll ( this . trustedIssuers ) ; if ( ( acceptSelfSigned ) && ( ( chain . length ) == 1 ) ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Found<sp>accepted<sp>issuer<sp>with<sp>same<sp>DN:<sp>" 0 ) ; final org . jivesoftware . openfire . keystore . X509Certificate cert = chain [ 0 ] ; if ( cert . getSubjectDN ( ) . equals ( cert . getIssuerDN ( ) ) ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." ) ; trustedIssuers . add ( cert ) ; } else { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 4 ) ; } } final org . jivesoftware . openfire . keystore . Set < org . jivesoftware . openfire . keystore . X509Certificate > acceptedIssuers ; if ( checkValidity ) { acceptedIssuers = org . jivesoftware . openfire . keystore . CertificateUtils . filterValid ( trustedIssuers ) ; } else { acceptedIssuers = trustedIssuers ; } final org . jivesoftware . openfire . keystore . Set < org . jivesoftware . openfire . keystore . TrustAnchor > trustAnchors = org . jivesoftware . openfire . keystore . CertificateUtils . toTrustAnchors ( acceptedIssuers ) ; final org . jivesoftware . openfire . keystore . CertStore certificates = org . jivesoftware . openfire . keystore . CertStore . getInstance ( "Collection" , new org . jivesoftware . openfire . keystore . CollectionCertStoreParameters ( org . jivesoftware . openfire . keystore . Arrays . asList ( chain ) ) ) ; final org . jivesoftware . openfire . keystore . PKIXBuilderParameters parameters = new org . jivesoftware . openfire . keystore . PKIXBuilderParameters ( trustAnchors , selector ) ; if ( ! ( checkValidity ) ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 9 ) ; final org . jivesoftware . openfire . keystore . Date validPointInTime = org . jivesoftware . openfire . keystore . CertificateUtils . findValidPointInTime ( chain ) ; if ( validPointInTime == null ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . warn ( ( "The<sp>existing<sp>implementation<sp>is<sp>unable<sp>to<sp>fully<sp>ignore<sp>certificate<sp>validity<sp>periods<sp>for<sp>this<sp>chain,<sp>even<sp>though<sp>it<sp>is<sp>configured<sp>to<sp>do<sp>so.<sp>Certificate<sp>checks<sp>might<sp>fail<sp>because<sp>of<sp>expiration<sp>for<sp>end<sp>entity:<sp>" + ( chain [ 0 ] ) ) ) ; } else { parameters . setDate ( validPointInTime ) ; } } parameters . addCertStore ( certificates ) ; parameters . setRevocationEnabled ( false ) ; org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 7 , chain . length , trustAnchors . size ( ) ) ; org . jivesoftware . openfire . keystore . CertPathBuilder pathBuilder ; try { pathBuilder = org . jivesoftware . openfire . keystore . CertPathBuilder . getInstance ( "PKIX" , "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 0 ) ; } catch ( org . jivesoftware . openfire . keystore . NoSuchProviderException e ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . warn ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 5 , e ) ; pathBuilder = org . jivesoftware . openfire . keystore . CertPathBuilder . getInstance ( "PKIX" ) ; } try { final org . jivesoftware . openfire . keystore . CertPathBuilderResult result = pathBuilder . build ( parameters ) ; return result . getCertPath ( ) ; } catch ( org . jivesoftware . openfire . keystore . CertPathBuilderException ex ) { try { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "**<sp>Accepted<sp>Issuers<sp>(trust<sp>anchors,<sp>\"root<sp>CA\'s\"Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 1 ) ; for ( org . jivesoftware . openfire . keystore . X509Certificate acceptedIssuer : acceptedIssuers ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( ( ( ( "<sp>-<sp>" + ( acceptedIssuer . getSubjectDN ( ) ) ) + "Found<sp>accepted<sp>issuer<sp>with<sp>same<sp>DN:<sp>" 1 ) + ( acceptedIssuer . getIssuerDN ( ) ) ) ) ; } org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 6 ) ; org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( ( "Chain<sp>of<sp>one<sp>appears<sp>to<sp>be<sp>self-signed.<sp>Adding<sp>it<sp>to<sp>the<sp>set<sp>of<sp>trusted<sp>issuers." 2 + ( chain . length ) ) ) ; for ( int i = 0 ; i < ( chain . length ) ; i ++ ) { org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( "<sp>Certificate[{}]<sp>(valid<sp>from<sp>{}<sp>to<sp>{}):" , i , chain [ i ] . getNotBefore ( ) , chain [ i ] . getNotAfter ( ) ) ; org . jivesoftware . openfire . keystore . OpenfireX509TrustManager . Log . debug ( ( "Found<sp>accepted<sp>issuer<sp>with<sp>same<sp>DN:<sp>" 2 + ( chain [ i ] . getSubjectDN ( ) ) ) ) ; org . jivesoftware . openfire .
org . junit . Assert . assertNotNull ( result )
whenEquivalentAndNoVersionInfoForRightHand ( ) { oid1 = org . apache . isis . core . metamodel . adapter . oid . RootOid . create ( cusObjectSpecId , "123" , 90807L ) ; oid2 = org . apache . isis . core . metamodel . adapter . oid . RootOid . create ( cusObjectSpecId , "123" ) ; "<AssertPlaceHolder>" ; } is ( org . apache . isis . core . metamodel . spec . feature . Contributed ) { return new com . google . common . base . Predicate < T > ( ) { @ org . apache . isis . core . metamodel . specloader . specimpl . Override public boolean apply ( org . apache . isis . core . metamodel . spec . feature . ObjectMember input ) { return contributed . isIncluded ( ) ; } } ; }
org . junit . Assert . assertThat ( oid1 , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( oid2 ) ) )
withTargetNodeARightNode ( ) { treegraph . ParentAwareBinaryTreeNode root = new treegraph . ParentAwareBinaryTreeNode ( 6 ) ; root . addLeft ( 4 ) . addRight ( 5 ) ; "<AssertPlaceHolder>" ; } findInOrderSuccessor ( treegraph . ParentAwareBinaryTreeNode ) { if ( node == null ) return null ; if ( ( node . right ) != null ) { return leftMost ( node . right ) ; } treegraph . ParentAwareBinaryTreeNode p = node . parent ; while ( ( p != null ) && ( ( p . parent ) != null ) ) { if ( ( p . parent . left ) == p ) { return p . parent ; } else { p = p . parent ; } } return p ; }
org . junit . Assert . assertEquals ( 6 , s . findInOrderSuccessor ( root . left . right ) . val )
testDisassociatePolicyGroupFromDomains_unknownErrorInRemove_assertException ( ) { boolean exceptionOccured = false ; final javax . persistence . EntityManager mgr = mock ( javax . persistence . EntityManager . class ) ; final org . nhindirect . config . store . Domain domain = mock ( org . nhindirect . config . store . Domain . class ) ; final org . nhindirect . config . store . dao . DomainDao domainDao = mock ( org . nhindirect . config . store . dao . DomainDao . class ) ; when ( domainDao . getDomain ( new java . lang . Long ( 1234 ) ) ) . thenReturn ( domain ) ; final javax . persistence . Query deleteQuery = mock ( javax . persistence . Query . class ) ; doThrow ( new java . lang . RuntimeException ( "Just<sp>Passing<sp>Through" ) ) . when ( deleteQuery ) . executeUpdate ( ) ; when ( mgr . createQuery ( "DELETE<sp>from<sp>CertPolicyGroupDomainReltn<sp>cpr<sp>where<sp>cpr.certPolicyGroup<sp>=<sp>?1" ) ) . thenReturn ( deleteQuery ) ; final org . nhindirect . config . store . CertPolicyGroup group = mock ( org . nhindirect . config . store . CertPolicyGroup . class ) ; final javax . persistence . Query query = mock ( javax . persistence . Query . class ) ; when ( query . getSingleResult ( ) ) . thenReturn ( group ) ; when ( mgr . createQuery ( "SELECT<sp>cpg<sp>from<sp>CertPolicyGroup<sp>cpg<sp>WHERE<sp>cpg.id<sp>=<sp>?1" ) ) . thenReturn ( query ) ; final org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl dao = new org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl ( ) ; dao . setDomainDao ( domainDao ) ; dao . setEntityManager ( mgr ) ; final org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl spyDao = spy ( dao ) ; try { spyDao . disassociatePolicyGroupFromDomains ( 1234 ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException e ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; verify ( query , times ( 1 ) ) . getSingleResult ( ) ; verify ( deleteQuery , times ( 1 ) ) . executeUpdate ( ) ; }
org . junit . Assert . assertTrue ( exceptionOccured )
testFetchByPrimaryKeyExisting ( ) { com . liferay . roster . model . RosterMember newRosterMember = addRosterMember ( ) ; com . liferay . roster . model . RosterMember existingRosterMember = _persistence . fetchByPrimaryKey ( newRosterMember . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _rosterMember . getPrimaryKey ( ) ; }
org . junit . Assert . assertEquals ( existingRosterMember , newRosterMember )
testFacadesOffByDefault ( ) { net . sourceforge . pmd . Rule r = loadFirstRule ( net . sourceforge . pmd . RuleSetFactoryTest . XPATH ) ; "<AssertPlaceHolder>" ; } isDfa ( ) { return rule . isDfa ( ) ; }
org . junit . Assert . assertFalse ( r . isDfa ( ) )
testSetString ( ) { com . liferay . portal . kernel . servlet . StubHttpServletResponse stubHttpServletResponse = new com . liferay . portal . kernel . servlet . StubHttpServletResponse ( ) ; com . liferay . portal . kernel . servlet . BufferCacheServletResponse bufferCacheServletResponse = new com . liferay . portal . kernel . servlet . BufferCacheServletResponse ( stubHttpServletResponse ) ; bufferCacheServletResponse . setString ( com . liferay . portal . kernel . servlet . BufferCacheServletResponseTest . _TEST_STRING ) ; "<AssertPlaceHolder>" ; } getString ( ) { return "everything.read" ; }
org . junit . Assert . assertEquals ( com . liferay . portal . kernel . servlet . BufferCacheServletResponseTest . _TEST_STRING , bufferCacheServletResponse . getString ( ) )
testInvalidProvider ( ) { org . apache . ranger . credentialapi . buildks buildksOBJ = new org . apache . ranger . credentialapi . buildks ( ) ; java . lang . String [ ] argsCreateCommand = new java . lang . String [ ] { "create" , "TestCredential1" , "-value" , "PassworD123" , "-provider" , "jksp://file@/" + ( keystoreFile ) } ; int rc1 = buildksOBJ . createCredential ( argsCreateCommand ) ; "<AssertPlaceHolder>" ; } createCredential ( java . lang . String [ ] ) { int returnCode = - 1 ; java . lang . String command = null ; java . lang . String alias = null ; java . lang . String valueOption = null ; java . lang . String credential = null ; java . lang . String providerOption = null ; java . lang . String providerPath = null ; java . lang . String tempCredential = null ; try { if ( ( args != null ) && ( ( args . length ) == 6 ) ) { command = args [ 0 ] ; alias = args [ 1 ] ; valueOption = args [ 2 ] ; credential = args [ 3 ] ; providerOption = args [ 4 ] ; providerPath = args [ 5 ] ; if ( ! ( org . apache . ranger . credentialapi . buildks . isValidCreateCommand ( command , alias , valueOption , credential , providerOption , providerPath ) ) ) { return returnCode ; } deleteInvalidKeystore ( providerPath ) ; tempCredential = org . apache . ranger . credentialapi . CredentialReader . getDecryptedString ( providerPath , alias ) ; } else { return returnCode ; } if ( tempCredential == null ) { returnCode = createKeyStore ( args ) ; } else { try { System . out . println ( ( ( "The<sp>alias<sp>" + alias ) + "<sp>already<sp>exists!!<sp>Will<sp>try<sp>to<sp>delete<sp>first." ) ) ; boolean isSilentMode = true ; java . lang . String [ ] argsDelete = new java . lang . String [ 4 ] ; argsDelete [ 0 ] = "delete" ; argsDelete [ 1 ] = alias ; argsDelete [ 2 ] = providerOption ; argsDelete [ 3 ] = providerPath ; returnCode = deleteCredential ( argsDelete , isSilentMode ) ; if ( returnCode == 0 ) { returnCode = createKeyStore ( args ) ; } } catch ( java . lang . Exception ex ) { returnCode = - 1 ; } } } catch ( java . lang . Exception ex ) { ex . printStackTrace ( ) ; } return returnCode ; }
org . junit . Assert . assertEquals ( ( - 1 ) , rc1 )
test18PrefixQueryWithFilter ( ) { com . ebay . cloud . cms . query . service . QueryContext context = new com . ebay . cloud . cms . query . service . QueryContext ( raptorContext ) ; context . setAllowFullTableScan ( true ) ; java . lang . String query = "ApplicationService[@name=~\"srp-app-invalid-name.*\"].services[@https=true]<@https,<sp>@activeManifestDiff>[<sp>$max(@port)<sp>><sp>\"123\"]" ; com . ebay . cloud . cms . query . service . IQueryResult queryResult = queryService . query ( query , context ) ; "<AssertPlaceHolder>" ; } getEntities ( ) { return entities ; }
org . junit . Assert . assertEquals ( 0 , queryResult . getEntities ( ) . size ( ) )
applyTest ( ) { java . lang . String [ ] [ ] tests = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "mu" , "mu" } , new java . lang . String [ ] { "1" , "1" } } ; for ( java . lang . String [ ] test : tests ) { liqp . Template template = liqp . Template . parse ( test [ 0 ] ) ; java . lang . String rendered = java . lang . String . valueOf ( template . render ( ) ) ; "<AssertPlaceHolder>" ; } } render ( ) { return render ( new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; }
org . junit . Assert . assertThat ( rendered , org . hamcrest . CoreMatchers . is ( test [ 1 ] ) )
testMultple_load_sheet_skip_notFound ( ) { com . gh . mygreen . xlsmapper . XlsMapper mapper = new com . gh . mygreen . xlsmapper . XlsMapper ( ) ; mapper . getConiguration ( ) . setContinueTypeBindFailure ( true ) . setIgnoreSheetNotFound ( true ) ; try ( java . io . InputStream in = new java . io . FileInputStream ( inputFile ) ) { com . gh . mygreen . xlsmapper . validation . MultipleSheetBindingErrors < com . gh . mygreen . xlsmapper . fieldprocessor . AnnoSheetTest . NamedSheet2 > errors = mapper . loadMultipleDetail ( in , com . gh . mygreen . xlsmapper . fieldprocessor . AnnoSheetTest . NamedSheet2 . class ) ; "<AssertPlaceHolder>" . isEmpty ( ) ; } } getAll ( ) { return list ; }
org . junit . Assert . assertThat ( errors . getAll ( ) )
testMinAndMaxInRange ( ) { parameter . setMinimumValue ( ( - 1 ) ) ; parameter . setMaximumValue ( 1 ) ; parameter . configure ( org . apache . flink . api . java . utils . ParameterTool . fromArgs ( new java . lang . String [ ] { "--test" , "0" } ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( new java . lang . Long ( 0 ) , parameter . getValue ( ) )
create_if_exists_should_recycle_existing_component ( ) { @ com . artemis . annotations . Wire ( injectInherited = true ) class TestSystem extends com . artemis . ComponentMapperTest . BasicSystem { @ com . artemis . Override protected void process ( com . artemis . Entity e ) { com . artemis . ComponentMapperTest . Pos c1 = mPos . create ( e ) ; com . artemis . ComponentMapperTest . Pos c2 = mPos . create ( e ) ; "<AssertPlaceHolder>" ; } } createAndProcessWorld ( new TestSystem ( ) ) ; } create ( java . lang . Class ) { return com . artemis . generator . model . artemis . ComponentDescriptor . create ( type , new com . artemis . FluidGeneratorPreferences ( ) ) ; }
org . junit . Assert . assertEquals ( c1 , c2 )
isSearchAvailable_OrgWithAccess ( ) { org . oscm . internal . vo . VOUserDetails userDetails = new org . oscm . internal . vo . VOUserDetails ( ) ; userDetails . setOrganizationId ( org . oscm . ui . beans . marketplace . ServicePagingBeanTest . ALLOWED_ORG1 ) ; doReturn ( userDetails ) . when ( bean ) . getUserFromSessionWithoutException ( ) ; config . setRestricted ( true ) ; boolean rc = bean . isSearchAvailable ( ) ; "<AssertPlaceHolder>" ; } isSearchAvailable ( ) { boolean isRestricted = getConfig ( ) . isRestricted ( ) ; if ( ! isRestricted ) { return true ; } org . oscm . internal . vo . VOUserDetails user = getUserFromSessionWithoutException ( ) ; if ( user != null ) { java . lang . String org = user . getOrganizationId ( ) ; if ( org != null ) { return getConfig ( ) . getAllowedOrganizations ( ) . contains ( org ) ; } } return true ; }
org . junit . Assert . assertTrue ( rc )
testWarnLoggerForLargeData ( ) { org . apache . zeppelin . interpreter . remote . RemoteInterpreterProcessListener listener = mock ( org . apache . zeppelin . interpreter . remote . RemoteInterpreterProcessListener . class ) ; org . apache . zeppelin . interpreter . remote . AppendOutputRunner runner = new org . apache . zeppelin . interpreter . remote . AppendOutputRunner ( listener ) ; java . lang . String data = "data\n" ; int numEvents = 100000 ; for ( int i = 0 ; i < numEvents ; i ++ ) { runner . appendBuffer ( "noteId" , "paraId" , 0 , data ) ; } org . apache . zeppelin . interpreter . remote . AppendOutputRunnerTest . TestAppender appender = new org . apache . zeppelin . interpreter . remote . AppendOutputRunnerTest . TestAppender ( ) ; org . apache . log4j . Logger logger = org . apache . log4j . Logger . getRootLogger ( ) ; logger . addAppender ( appender ) ; runner . run ( ) ; java . util . List < org . apache . log4j . spi . LoggingEvent > log ; int warnLogCounter ; org . apache . log4j . spi . LoggingEvent sizeWarnLogEntry = null ; do { warnLogCounter = 0 ; log = appender . getLog ( ) ; for ( org . apache . log4j . spi . LoggingEvent logEntry : log ) { if ( org . apache . log4j . Level . WARN . equals ( logEntry . getLevel ( ) ) ) { sizeWarnLogEntry = logEntry ; warnLogCounter += 1 ; } } } while ( warnLogCounter != 2 ) ; java . lang . String loggerString = ( "Processing<sp>size<sp>for<sp>buffered<sp>append-output<sp>is<sp>high:<sp>" + ( ( data . length ( ) ) * numEvents ) ) + "<sp>characters." ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( version ) == ( ( ( org . apache . zeppelin . spark . SparkVersion ) ( versionToCompare ) ) . version ) ; }
org . junit . Assert . assertTrue ( loggerString . equals ( sizeWarnLogEntry . getMessage ( ) ) )
testDestinationBlank ( ) { com . liferay . portal . search . web . internal . search . bar . portlet . SearchBarPortletDisplayBuilder searchBarPortletDisplayBuilder = createSearchBarPortletDisplayBuilder ( ) ; searchBarPortletDisplayBuilder . setDestination ( StringPool . BLANK ) ; com . liferay . portal . search . web . internal . search . bar . portlet . SearchBarPortletDisplayContext searchBarPortletDisplayContext = searchBarPortletDisplayBuilder . build ( ) ; "<AssertPlaceHolder>" ; } isDestinationUnreachable ( ) { return _destinationUnreachable ; }
org . junit . Assert . assertFalse ( searchBarPortletDisplayContext . isDestinationUnreachable ( ) )
testDecisionServiceTask ( ) { org . flowable . cmmn . api . runtime . CaseInstance caseInstance = createCaseInstance ( ) ; "<AssertPlaceHolder>" ; } createCaseInstance ( ) { deployOneHumanTaskCaseModel ( ) ; for ( int i = 0 ; i < ( org . flowable . cmmn . test . task . CmmnTaskQueryTest . NR_CASE_INSTANCES ) ; i ++ ) { cmmnRuntimeService . createCaseInstanceBuilder ( ) . caseDefinitionKey ( "oneTaskCase" ) . variable ( "index" , i ) . start ( ) ; } }
org . junit . Assert . assertNotNull ( caseInstance )
testAddMovieSubtitles4 ( ) { com . moviejukebox . tools . SubtitleToolsTest . LOG . info ( "AddMovieSubtitles4" ) ; java . lang . String actualSubtitles = "YES" ; java . lang . String newSubtitles = com . moviejukebox . tools . SubtitleTools . addMovieSubtitle ( actualSubtitles , "NO" ) ; "<AssertPlaceHolder>" ; } addMovieSubtitle ( com . moviejukebox . model . Movie , java . lang . String ) { java . lang . String newSubtitles = com . moviejukebox . tools . SubtitleTools . addMovieSubtitle ( movie . getSubtitles ( ) , subtitle ) ; movie . setSubtitles ( newSubtitles ) ; }
org . junit . Assert . assertEquals ( "NO" , newSubtitles )
testClone ( ) { cajaCssParser . setCacheProvider ( new org . apache . shindig . common . cache . LruCacheProvider ( 100 ) ) ; java . util . List < java . lang . Object > styleSheet = cajaCssParser . parseImpl ( org . apache . shindig . gadgets . parse . caja . CajaCssLexerParserTest . CSS ) ; java . util . List < java . lang . Object > styleSheet2 = cajaCssParser . parse ( org . apache . shindig . gadgets . parse . caja . CajaCssLexerParserTest . CSS ) ; "<AssertPlaceHolder>" ; } serialize ( org . w3c . dom . Document ) { return ( ( org . apache . shindig . gadgets . parse . HtmlSerializer ) ( doc . getUserData ( org . apache . shindig . gadgets . parse . HtmlSerialization . KEY ) ) ) . serialize ( doc ) ; }
org . junit . Assert . assertEquals ( cajaCssParser . serialize ( styleSheet ) , cajaCssParser . serialize ( styleSheet2 ) )
testGermany ( ) { java . lang . String title = "raw-Germany" ; org . sweble . wikitext . parser . nodes . WtNode ast = parse ( title ) ; org . apache . commons . jxpath . JXPathContext context = org . apache . commons . jxpath . JXPathContext . newContext ( ast ) ; java . lang . StringBuilder b = new java . lang . StringBuilder ( ) ; doQuery ( context , b , "//WtTemplate[contains(name//WtText[@content],\"Infobox<sp>country\")]//WtTemplateArgument[contains(name//WtText[@content],\"capital\")]/value" ) ; java . lang . String actual = de . fau . cs . osr . utils . FileTools . lineEndToUnix ( b . toString ( ) ) ; java . lang . String expected = null ; try { expected = load ( ( ( ( ( org . sweble . wikitext . parser . XPathTest . PATH ) + "/ast/" ) + title ) + ".ast" ) ) ; } catch ( java . io . IOException e ) { } "<AssertPlaceHolder>" ; } load ( java . io . File ) { return org . sweble . wikitext . engine . config . WikiConfigImpl . finishImport ( ( ( org . sweble . wikitext . engine . config . WikiConfigImpl ) ( org . sweble . wikitext . engine . config . WikiConfigImpl . createUnmarshaller ( ) . unmarshal ( file ) ) ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testNoTaskSingle ( ) { assumeEnvironment ( Environment . APPSPOT , Environment . CAPEDWARF ) ; com . google . appengine . api . datastore . Transaction tx = com . google . appengine . api . datastore . DatastoreServiceFactory . getDatastoreService ( ) . beginTransaction ( ) ; final int beforeNumTasks = getDefaultQueue ( ) . fetchStatistics ( ) . getNumTasks ( ) ; try { getDefaultQueue ( ) . add ( tx , TaskOptions . Builder . withDefaults ( ) ) ; } finally { tx . rollback ( ) ; } sync ( 10000 ) ; "<AssertPlaceHolder>" ; } getDefaultQueue ( ) { return com . google . appengine . api . taskqueue . QueueFactory . getDefaultQueue ( ) ; }
org . junit . Assert . assertEquals ( beforeNumTasks , getDefaultQueue ( ) . fetchStatistics ( ) . getNumTasks ( ) )
testInsert ( ) { try ( java . sql . PreparedStatement stmt = conn . prepareStatement ( "INSERT<sp>INTO<sp>testtable<sp>VALUES<sp>(?)" ) ) { stmt . setString ( 1 , "A" ) ; "<AssertPlaceHolder>" ; } checkValue ( "A" ) ; } executeUpdate ( ) { try { return delegator . executeUpdate ( ) ; } catch ( java . sql . SQLException se ) { owner . fireStatementError ( this , se ) ; throw se ; } }
org . junit . Assert . assertEquals ( stmt . executeUpdate ( ) , 1 )
whenAlreadyInterrupted ( ) { java . lang . Thread . currentThread ( ) . interrupt ( ) ; barrier = new org . multiverse . commitbarriers . VetoCommitBarrier ( ) ; try { barrier . tryAwaitOpen ( 1 , TimeUnit . DAYS ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . InterruptedException expected ) { } "<AssertPlaceHolder>" ; } isClosed ( ) { return ( status ) == ( org . multiverse . commitbarriers . CommitBarrier . Status . Closed ) ; }
org . junit . Assert . assertTrue ( barrier . isClosed ( ) )
testHashCode ( ) { com . splicemachine . db . iapi . types . HBaseRowLocation rowLocation1 = new com . splicemachine . db . iapi . types . HBaseRowLocation ( new byte [ ] { 1 , 2 , 3 , - 1 } ) ; com . splicemachine . db . iapi . types . HBaseRowLocation rowLocation2 = new com . splicemachine . db . iapi . types . HBaseRowLocation ( new byte [ ] { 1 , 2 , 3 , - 1 } ) ; "<AssertPlaceHolder>" ; new com . splicemachine . db . iapi . types . HBaseRowLocation ( ) . hashCode ( ) ; new com . splicemachine . db . iapi . types . HBaseRowLocation ( ( ( com . splicemachine . utils . ByteSlice ) ( null ) ) ) . hashCode ( ) ; new com . splicemachine . db . iapi . types . HBaseRowLocation ( ( ( byte [ ] ) ( null ) ) ) . hashCode ( ) ; } hashCode ( ) { int hash = 7 ; hash = ( 47 * hash ) + ( this . isCallableStatement ? 1 : 0 ) ; hash = ( 47 * hash ) + ( ( this . sql ) == null ? 3 : this . sql . hashCode ( ) ) ; hash = ( 47 * hash ) + ( this . schema . hashCode ( ) ) ; hash = ( 47 * hash ) + ( this . type ) ; hash = ( 47 * hash ) + ( this . concurrency ) ; hash = ( 47 * hash ) + ( this . holdability ) ; hash = ( 47 * hash ) + ( this . autogeneratedKeys ) ; return hash ; }
org . junit . Assert . assertEquals ( rowLocation1 . hashCode ( ) , rowLocation2 . hashCode ( ) )
test ( ) { parser . parseOntology ( ) ; "<AssertPlaceHolder>" ; } getEmOntology ( ) { return emOntology ; }
org . junit . Assert . assertTrue ( ( ( parser . getEmOntology ( ) ) != null ) )
shouldBeTrueWhenGivenTrueAndTrue ( ) { final org . pitest . functional . predicate . And < java . lang . Object > testee = and ( ( i ) -> true , ( i ) -> true ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String ) { return this . includedClassPathElement . contains ( a ) ; }
org . junit . Assert . assertTrue ( testee . test ( null ) )
testGetRecentItemCountWithNoResultsPerNodeRequestedReturnsExpectedCount ( ) { java . util . Date since = new java . util . Date ( ) ; dbTester . loadData ( "node_1" ) ; store . addRemoteNode ( org . buddycloud . channelserver . db . jdbc . TEST_SERVER1_NODE2_ID ) ; store . addUserSubscription ( new org . buddycloud . channelserver . pubsub . model . impl . NodeSubscriptionImpl ( TEST_SERVER1_NODE2_ID , TEST_SERVER1_USER1_JID , org . buddycloud . channelserver . pubsub . subscription . Subscriptions . subscribed , null ) ) ; store . addNodeItem ( new org . buddycloud . channelserver . pubsub . model . impl . NodeItemImpl ( TEST_SERVER1_NODE1_ID , "123" , new java . util . Date ( ) , "payload" ) ) ; store . addNodeItem ( new org . buddycloud . channelserver . pubsub . model . impl . NodeItemImpl ( TEST_SERVER1_NODE2_ID , "123" , new java . util . Date ( ) , "payload2" ) ) ; int count = store . getCountRecentItems ( org . buddycloud . channelserver . db . jdbc . TEST_SERVER1_USER1_JID , since , 0 , null , false ) ; "<AssertPlaceHolder>" ; } getCountRecentItems ( org . xmpp . packet . JID , java . util . Date , int , java . lang . String , boolean ) { if ( null == node ) { node = "/posts" ; } if ( ( - 1 ) == maxPerNode ) { maxPerNode = Integer . MAX_VALUE ; } java . lang . String queryPart ; java . lang . String parentOnlyReplacement ; java . sql . PreparedStatement stmt = null ; try { org . xmpp . resultsetmanagement . ResultSet < org . buddycloud . channelserver . pubsub . model . NodeMembership > subscriptions = this . getUserMemberships ( user ) ; java . util . ArrayList < java . lang . String > queryParts = new java . util . ArrayList < java . lang . String > ( ) ; java . util . ArrayList < java . lang . Object > parameters = new java . util . ArrayList < java . lang . Object > ( ) ; for ( org . buddycloud . channelserver . pubsub . model . NodeMembership subscription : subscriptions ) { if ( false == ( subscription . getSubscription ( ) . equals ( Subscriptions . subscribed ) ) ) { continue ; } if ( false == ( subscription . getNodeId ( ) . substring ( ( ( subscription . getNodeId ( ) . length ( ) ) - ( node . length ( ) ) ) ) . equals ( node ) ) ) { continue ; } queryPart = dialect . selectCountRecentItemParts ( ) ; parentOnlyReplacement = "" ; if ( true == parentOnly ) { parentOnlyReplacement = "AND<sp>\"in_reply_to\"<sp>IS<sp>NULL" ; } queryPart = queryPart . replace ( "%parentOnly%" , parentOnlyReplacement ) ; queryParts . add ( queryPart ) ; parameters . add ( subscription . getNodeId ( ) ) ; parameters . add ( new java . sql . Timestamp ( since . getTime ( ) ) ) ; parameters . add ( maxPerNode ) ; } stmt = conn . prepareStatement ( org . apache . commons . lang . StringUtils . join ( queryParts , "<sp>UNION<sp>ALL<sp>" ) ) ; int index = 1 ; for ( java . lang . Object parameter : parameters ) { stmt . setObject ( index , parameter ) ; ++ index ; } java . sql . ResultSet rs = stmt . executeQuery ( ) ; int count = 0 ; while ( rs . next ( ) ) { count += rs . getInt ( 1 ) ; } stmt = null ; return count ; } catch ( java . sql . SQLException e ) { org . buddycloud . channelserver . db . jdbc . JDBCNodeStore . LOGGER . error ( e ) ; throw new org . buddycloud . channelserver . db . exception . NodeStoreException ( e ) ; } finally { close ( stmt ) ; } }
org . junit . Assert . assertEquals ( 0 , count )
testCoerceToType06 ( ) { java . lang . Object result = javax . el . ELManager . getExpressionFactory ( ) . coerceToType ( "" , org . apache . el . lang . Character . class ) ; "<AssertPlaceHolder>" ; } coerceToType ( java . lang . Class , java . lang . String ) { if ( type . equals ( java . lang . String . class ) ) { return value ; } else if ( ( type . equals ( boolean . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Boolean . class ) ) ) { return java . lang . Boolean . valueOf ( value ) ; } else if ( ( type . equals ( byte . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Byte . class ) ) ) { return java . lang . Byte . valueOf ( value ) ; } else if ( ( ( value . length ( ) ) == 1 ) && ( ( type . equals ( char . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Character . class ) ) ) ) { return java . lang . Character . valueOf ( value . charAt ( 0 ) ) ; } else if ( ( type . equals ( double . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Double . class ) ) ) { return java . lang . Double . valueOf ( value ) ; } else if ( ( type . equals ( float . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Float . class ) ) ) { return java . lang . Float . valueOf ( value ) ; } else if ( ( type . equals ( int . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Integer . class ) ) ) { return java . lang . Integer . valueOf ( value ) ; } else if ( ( type . equals ( long . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Long . class ) ) ) { return java . lang . Long . valueOf ( value ) ; } else if ( ( type . equals ( short . class ) ) || ( type . equals ( org . apache . tomcat . websocket . Short . class ) ) ) { return java . lang . Short . valueOf ( value ) ; } else { throw new java . lang . IllegalArgumentException ( org . apache . tomcat . websocket . Util . sm . getString ( "util.invalidType" , value , type . getName ( ) ) ) ; } }
org . junit . Assert . assertEquals ( java . lang . Character . valueOf ( ( ( char ) ( 0 ) ) ) , result )
testGetObjectsAccumulateWithNoMatchingFacts ( ) { java . lang . String drl = "global<sp>java.util.List<sp>list\n" + ( ( ( ( ( ( ( "rule<sp>R<sp>when\n" + "<sp>accumulate(\n" ) + "<sp>Object(false);\n" ) + "<sp>$total<sp>:<sp>count()\n" ) + "<sp>)\n" ) + "then\n" ) + "<sp>list.addAll(((org.drools.core.spi.Activation)kcontext.getMatch()).getObjectsDeep());\n" ) + "end\n" ) ; org . kie . api . runtime . KieSession ksession = new org . kie . internal . utils . KieHelper ( ) . addContent ( drl , ResourceType . DRL ) . build ( ) . newKieSession ( ) ; java . util . List < java . lang . Object > list = new java . util . ArrayList ( ) ; ksession . setGlobal ( "list" , list ) ; ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; ksession . dispose ( ) ; } contains ( java . lang . Object ) { return list . contains ( o ) ; }
org . junit . Assert . assertTrue ( list . contains ( 0L ) )
testConfigBuilder ( ) { final de . metas . dlm . partitioner . config . PartitionConfig config = createAndCheckBuilder0 ( ) ; "<AssertPlaceHolder>" ; } getLines ( ) { return com . google . common . collect . ImmutableList . copyOf ( lines ) ; }
org . junit . Assert . assertThat ( config . getLines ( ) . size ( ) , org . hamcrest . Matchers . is ( 2 ) )
voteMatch_dont_match_when_second_not_matched ( ) { when ( voter1 . voteMatch ( affiliation , organization ) ) . thenReturn ( true ) ; when ( voter2 . voteMatch ( affiliation , organization ) ) . thenReturn ( false ) ; boolean returnValue = compositeMatchVoter . voteMatch ( affiliation , organization ) ; "<AssertPlaceHolder>" ; verify ( voter1 ) . voteMatch ( affiliation , organization ) ; verify ( voter2 ) . voteMatch ( affiliation , organization ) ; verifyNoMoreInteractions ( voter1 , voter2 ) ; } voteMatch ( eu . dnetlib . iis . wf . affmatching . model . AffMatchAffiliation , eu . dnetlib . iis . wf . affmatching . model . AffMatchOrganization ) { java . lang . String filteredAffName = stringFilter . filterChars ( affiliation . getOrganizationName ( ) , charsToFilter ) ; if ( org . apache . commons . lang3 . StringUtils . isEmpty ( filteredAffName ) ) { return false ; } for ( java . lang . String orgName : getOrgNamesFunction . apply ( organization ) ) { java . lang . String filteredOrgName = stringFilter . filterChars ( orgName , charsToFilter ) ; if ( org . apache . commons . lang3 . StringUtils . isEmpty ( filteredOrgName ) ) { continue ; } if ( filteredAffName . equals ( filteredOrgName ) ) { return true ; } } return false ; }
org . junit . Assert . assertFalse ( returnValue )
testEncodeDecode ( ) { byte [ ] rowKey = io . cdap . cdap . data2 . dataset2 . lib . partitioned . PartitionedFileSetDataset . generateRowKey ( io . cdap . cdap . data2 . dataset2 . lib . partitioned . PartitionedFileSetTest . PARTITION_KEY , io . cdap . cdap . data2 . dataset2 . lib . partitioned . PartitionedFileSetTest . PARTITIONING_1 ) ; io . cdap . cdap . api . dataset . lib . PartitionKey decoded = io . cdap . cdap . data2 . dataset2 . lib . partitioned . PartitionedFileSetDataset . parseRowKey ( rowKey , io . cdap . cdap . data2 . dataset2 . lib . partitioned . PartitionedFileSetTest . PARTITIONING_1 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( io . cdap . cdap . data2 . dataset2 . lib . partitioned . PartitionedFileSetTest . PARTITION_KEY , decoded )
shouldResolveScoreOperationChainWithMultipleScoreResolvers ( ) { final uk . gov . gchq . gaffer . store . operation . handler . ScoreOperationChainHandler handler = new uk . gov . gchq . gaffer . store . operation . handler . ScoreOperationChainHandler ( ) ; final java . util . Map < java . lang . Class < ? extends uk . gov . gchq . gaffer . operation . Operation > , uk . gov . gchq . gaffer . store . operation . resolver . ScoreResolver > resolvers = new java . util . HashMap ( ) ; final uk . gov . gchq . gaffer . store . operation . resolver . ScoreResolver scoreResolver = mock ( uk . gov . gchq . gaffer . store . operation . resolver . named . NamedOperationScoreResolver . class ) ; final uk . gov . gchq . gaffer . store . operation . resolver . ScoreResolver scoreResolver1 = mock ( uk . gov . gchq . gaffer . store . operation . resolver . DefaultScoreResolver . class ) ; final uk . gov . gchq . gaffer . store . Context context = mock ( uk . gov . gchq . gaffer . store . Context . class ) ; final uk . gov . gchq . gaffer . store . Store store = mock ( uk . gov . gchq . gaffer . store . Store . class ) ; final uk . gov . gchq . gaffer . user . User user = mock ( uk . gov . gchq . gaffer . user . User . class ) ; final uk . gov . gchq . gaffer . operation . impl . ScoreOperationChain scoreOperationChain = mock ( uk . gov . gchq . gaffer . operation . impl . ScoreOperationChain . class ) ; final uk . gov . gchq . gaffer . store . StoreProperties storeProperties = mock ( uk . gov . gchq . gaffer . store . StoreProperties . class ) ; final uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds op1 = new uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds ( ) ; final uk . gov . gchq . gaffer . operation . impl . add . AddElements op2 = new uk . gov . gchq . gaffer . operation . impl . add . AddElements ( ) ; final java . util . Map < java . lang . Class < ? extends uk . gov . gchq . gaffer . operation . Operation > , java . lang . Integer > opScores = new java . util . LinkedHashMap ( ) ; opScores . put ( uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds . class , 2 ) ; handler . setOpScores ( opScores ) ; final java . lang . String opName = "namedOp" ; final uk . gov . gchq . gaffer . named . operation . NamedOperation < java . lang . Iterable < ? extends uk . gov . gchq . gaffer . data . element . Element > , java . lang . Iterable < ? extends uk . gov . gchq . gaffer . data . element . Element > > namedOp = mock ( uk . gov . gchq . gaffer . named . operation . NamedOperation . class ) ; namedOp . setOperationName ( opName ) ; resolvers . put ( namedOp . getClass ( ) , scoreResolver ) ; resolvers . put ( op2 . getClass ( ) , scoreResolver1 ) ; handler . setScoreResolvers ( resolvers ) ; given ( scoreResolver . getScore ( eq ( namedOp ) , any ( ) ) ) . willReturn ( 3 ) ; given ( scoreResolver1 . getScore ( eq ( op2 ) , any ( ) ) ) . willReturn ( 5 ) ; final uk . gov . gchq . gaffer . operation . OperationChain opChain = new uk . gov . gchq . gaffer . operation . OperationChain ( java . util . Arrays . asList ( op1 , op2 , namedOp ) ) ; given ( context . getUser ( ) ) . willReturn ( user ) ; java . util . Set < java . lang . String > opAuths = new java . util . HashSet ( ) ; opAuths . add ( "TEST_USER" ) ; given ( user . getOpAuths ( ) ) . willReturn ( opAuths ) ; given ( scoreOperationChain . getOperationChain ( ) ) . willReturn ( opChain ) ; given ( store . getProperties ( ) ) . willReturn ( storeProperties ) ; final java . lang . Object result = handler . doOperation ( new uk . gov . gchq . gaffer . operation . impl . ScoreOperationChain . Builder ( ) . operationChain ( opChain ) . build ( ) , context , store ) ; "<AssertPlaceHolder>" ; } build ( ) { return new uk . gov . gchq . gaffer . user . User ( userId , dataAuths , opAuths ) ; }
org . junit . Assert . assertEquals ( 10 , result )
testQueryJobOrderGreaterThan ( ) { com . bullhornsdk . data . model . response . list . ListWrapper < com . bullhornsdk . data . JobOrder > wrapper = bullhornData . query ( com . bullhornsdk . data . JobOrder . class , "id<sp>><sp>10" , null , queryParams ) ; "<AssertPlaceHolder>" ; runAssertions ( "ListWrapper<JobOrder>" , wrapper ) ; } getCount ( ) { return count ; }
org . junit . Assert . assertTrue ( ( ( wrapper . getCount ( ) ) == 10 ) )
testWithDebug ( ) { at . favre . tools . apksigner . ui . Arg parsedArg = at . favre . tools . apksigner . ui . CLIParser . parse ( at . favre . tools . apksigner . ui . CLIParserTest . asArgArray ( ( ( "-" + ( CLIParser . ARG_APK_FILE ) ) + "./<sp>--debug" ) ) ) ; at . favre . tools . apksigner . ui . Arg expectedArg = new at . favre . tools . apksigner . ui . Arg ( new java . lang . String [ ] { "./" } , null , java . util . Collections . emptyList ( ) , false , false , false , false , true , false , null , false , false , null ) ; "<AssertPlaceHolder>" ; } asArgArray ( java . lang . String ) { return org . apache . tools . ant . types . Commandline . translateCommandline ( cmd ) ; }
org . junit . Assert . assertEquals ( expectedArg , parsedArg )
test_WithOnlyCookieNameMatch ( ) { ctx . request ( ) . addCookie ( myCookieWithoutValue ) ; extension . activate ( configWithCookie ) ; boolean actual = extension . accepts ( ctx . request ( ) , null , extension . getAllowedKeyValues ( ) ) ; "<AssertPlaceHolder>" ; } activate ( java . util . Map ) { this . listRoot = org . apache . sling . commons . osgi . PropertiesUtil . toString ( props . get ( com . adobe . acs . commons . genericlists . impl . GenericListJsonResourceProvider . PROP_LIST_ROOT ) , com . adobe . acs . commons . genericlists . impl . GenericListJsonResourceProvider . DEFAULT_LIST_ROOT ) ; }
org . junit . Assert . assertTrue ( actual )
testEnumAttribute ( ) { io . joynr . proxy . ProxyBuilder < joynr . tests . testProxy > proxyBuilder = consumerRuntime . getProxyBuilder ( domain , joynr . tests . testProxy . class ) ; joynr . tests . testProxy proxy = proxyBuilder . setMessagingQos ( messagingQos ) . setDiscoveryQos ( discoveryQos ) . build ( ) ; proxy . setEnumAttribute ( TestEnum . TWO ) ; joynr . tests . testTypes . TestEnum result = proxy . getEnumAttribute ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return build ( new io . joynr . proxy . ProxyCreatedCallback < T > ( ) { @ io . joynr . proxy . Override public void onProxyCreationFinished ( T result ) { io . joynr . proxy . ProxyBuilderDefaultImpl . logger . trace ( "proxy<sp>created:<sp>interface:<sp>{}<sp>domains:<sp>{}" , interfaceName , domains ) ; } @ io . joynr . proxy . Override public void onProxyCreationError ( io . joynr . exceptions . JoynrRuntimeException error ) { io . joynr . proxy . ProxyBuilderDefaultImpl . logger . error ( "error<sp>creating<sp>proxy:<sp>interface:<sp>{}<sp>domains:<sp>{},<sp>error:<sp>{}" , interfaceName , domains , error . getMessage ( ) ) ; } } ) ; }
org . junit . Assert . assertEquals ( TestEnum . TWO , result )
testInvalidConfig_noFilters ( ) { org . revapi . configuration . ConfigurationValidator validator = new org . revapi . configuration . ConfigurationValidator ( ) ; java . lang . String json = "[{\"extension\":<sp>\"revapi.filter\",<sp>\"configuration\"<sp>:<sp>{<sp>}}]" ; org . revapi . configuration . ValidationResult result = validator . validate ( org . jboss . dmr . ModelNode . fromJSONString ( json ) , new org . revapi . basic . ConfigurableElementFilter ( ) ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return ( ( missingSchemas ) == null ) && ( ( errors ) == null ) ; }
org . junit . Assert . assertFalse ( result . isSuccessful ( ) )
testUnzip ( ) { org . opencastproject . util . ZipUtil . unzip ( sampleZip , destDir ) ; java . util . zip . ZipFile test = new java . util . zip . ZipFile ( sampleZip ) ; java . util . Enumeration < ? extends java . util . zip . ZipEntry > entries = test . entries ( ) ; try { while ( entries . hasMoreElements ( ) ) { java . util . zip . ZipEntry entry = entries . nextElement ( ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . AssertionError ae ) { test . close ( ) ; throw ae ; } test . close ( ) ; } getName ( ) { return name ; }
org . junit . Assert . assertTrue ( new java . io . File ( destDir , entry . getName ( ) ) . exists ( ) )
testEmptyFallbackEmptySource ( ) { f . setTargetField ( "jsonObj" ) ; f . setSourceField ( "jsonStr" ) ; f . filter ( fields ) ; "<AssertPlaceHolder>" ; } filter ( com . logsniffer . fields . FieldsMap ) { final java . lang . Object value = fields . get ( sourceField ) ; if ( value != null ) { final com . logsniffer . util . grok . Grok grok = grokBean . getGrok ( groksRegistry ) ; final com . logsniffer . util . grok . GrokMatcher matcher = grok . matcher ( value . toString ( ) ) ; if ( matcher . matches ( ) ) { matcher . setMatchingGroupsToFields ( fields , false ) ; } } }
org . junit . Assert . assertNull ( fields . get ( "jsonObj" ) )
findsPeopleBySexPaginated ( ) { java . util . List < org . springframework . data . mongodb . repository . Person > males = repository . findBySex ( Sex . MALE , org . springframework . data . domain . PageRequest . of ( 0 , 2 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( males . size ( ) , is ( 2 ) )
defaultIsAsc ( ) { "<AssertPlaceHolder>" ; } getDefault ( ) { return org . apache . phoenix . schema . SortOrder . ASC ; }
org . junit . Assert . assertSame ( SortOrder . ASC , org . apache . phoenix . schema . SortOrder . getDefault ( ) )
trimLabelsNanoseconds1 ( ) { java . util . List < java . lang . String > input = java . util . Arrays . asList ( "2014/11/26<sp>09:01:00.000000000" , "2014/11/26<sp>09:02:00.000000002" , "2014/11/26<sp>09:03:00.000000004" , "2014/11/26<sp>09:04:00.000000006" , "2014/11/26<sp>09:05:00.000000008" ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "2014/11/26<sp>09:01:00.000000000" , "09:02:00.000000002" , "09:03:00.000000004" , "09:04:00.000000006" , "09:05:00.000000008" ) ; java . util . List < java . lang . String > found = org . diirt . graphene . TimeScales . trimLabels ( input ) ; "<AssertPlaceHolder>" ; } trimLabels ( java . util . List ) { if ( ( labels . size ( ) ) <= 1 ) { return labels ; } int greatestChangingPrecision = org . diirt . graphene . TimeScales . calculateGreatestChangingField ( labels ) ; java . util . ArrayList < java . lang . String > rtn = new java . util . ArrayList < java . lang . String > ( labels . size ( ) ) ; org . diirt . graphene . TimeScales . DateTrimmer firstDate = new org . diirt . graphene . TimeScales . DateTrimmer ( labels . get ( 0 ) ) ; rtn . add ( firstDate . getCompactForm ( org . diirt . graphene . TimeScales . DateTrimmer . NO_PRECISION , greatestChangingPrecision ) ) ; for ( int i = 1 ; i < ( labels . size ( ) ) ; i ++ ) { java . lang . String prevLabel = labels . get ( ( i - 1 ) ) ; java . lang . String nextLabel = labels . get ( i ) ; int redundancePrecision = org . diirt . graphene . TimeScales . greatestRedundancePrecision ( prevLabel , nextLabel ) ; org . diirt . graphene . TimeScales . DateTrimmer f = new org . diirt . graphene . TimeScales . DateTrimmer ( nextLabel ) ; java . lang . String trimmedLabel = f . getCompactForm ( redundancePrecision , greatestChangingPrecision ) ; rtn . add ( trimmedLabel ) ; } return rtn ; }
org . junit . Assert . assertThat ( found , equalTo ( expected ) )
testPDFBox3747 ( ) { java . io . File file = new java . io . File ( "target/fonts" , "PDFBOX-3747-calibri.ttf" ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; try ( org . sejda . sambox . pdmodel . PDDocument doc = new org . sejda . sambox . pdmodel . PDDocument ( ) ) { org . sejda . sambox . pdmodel . PDPage page = new org . sejda . sambox . pdmodel . PDPage ( ) ; doc . addPage ( page ) ; org . sejda . sambox . pdmodel . font . PDFont font = org . sejda . sambox . pdmodel . font . PDType0Font . load ( doc , file ) ; org . sejda . sambox . pdmodel . PDPageContentStream cs = new org . sejda . sambox . pdmodel . PDPageContentStream ( doc , page ) ; cs . beginText ( ) ; cs . setFont ( font , 10 ) ; cs . showText ( "PDFBOX-3747" ) ; cs . endText ( ) ; cs . close ( ) ; doc . writeTo ( baos ) ; } try ( org . sejda . sambox . pdmodel . PDDocument doc = org . sejda . sambox . input . PDFParser . parse ( org . sejda . io . SeekableSources . inMemorySeekableSourceFrom ( baos . toByteArray ( ) ) ) ) { org . sejda . sambox . text . PDFTextStripper stripper = new org . sejda . sambox . text . PDFTextStripper ( ) ; java . lang . String text = stripper . getText ( doc ) ; "<AssertPlaceHolder>" ; } } getText ( org . sejda . sambox . pdmodel . PDDocument ) { java . io . StringWriter outputStream = new java . io . StringWriter ( ) ; writeText ( doc , outputStream ) ; return outputStream . toString ( ) ; }
org . junit . Assert . assertEquals ( "PDFBOX-3747" , text . trim ( ) )
createRollupBatchWriterReturnsValidObject ( ) { com . rackspacecloud . blueflood . service . RollupExecutionContext execCtx = lfr . createRollupExecutionContext ( ) ; com . rackspacecloud . blueflood . service . RollupBatchWriter batchWriter = lfr . createRollupBatchWriter ( execCtx ) ; "<AssertPlaceHolder>" ; } createRollupBatchWriter ( com . rackspacecloud . blueflood . service . RollupExecutionContext ) { return new com . rackspacecloud . blueflood . service . RollupBatchWriter ( rollupWriteExecutor , executionContext ) ; }
org . junit . Assert . assertNotNull ( batchWriter )
test3Alts ( ) { org . antlr . v4 . tool . Grammar g = new org . antlr . v4 . tool . Grammar ( ( "parser<sp>grammar<sp>T;\n" + "8->5<sp>EPSILON<sp>0,0,0\n" 3 ) ) ; java . lang . String expecting = "8->5<sp>EPSILON<sp>0,0,0\n" 0 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "7:BASIC<sp>0\n" 8 + "1:RULE_STOP<sp>0\n" ) + "2:BASIC<sp>0\n" ) + "7:BASIC<sp>0\n" 4 ) + "8->5<sp>EPSILON<sp>0,0,0\n" 1 ) + "8->5<sp>EPSILON<sp>0,0,0\n" 2 ) + "8->5<sp>EPSILON<sp>0,0,0\n" 6 ) + "7:BASIC<sp>0\n" ) + "8:BLOCK_START<sp>0<sp>9\n" ) + "9:BLOCK_END<sp>0\n" ) + "7:BASIC<sp>0\n" 6 ) + "rule<sp>0:0\n" ) + "8->5<sp>EPSILON<sp>0,0,0\n" 4 ) + "7:BASIC<sp>0\n" 0 ) + "3->4<sp>ATOM<sp>1,0,0\n" ) + "4->9<sp>ATOM<sp>2,0,0\n" ) + "8->5<sp>EPSILON<sp>0,0,0\n" 5 ) + "7:BASIC<sp>0\n" 7 ) + "7:BASIC<sp>0\n" 2 ) + "7:BASIC<sp>0\n" 9 ) + "7:BASIC<sp>0\n" 5 ) + "8->5<sp>EPSILON<sp>0,0,0\n" ) + "7:BASIC<sp>0\n" 1 ) + "7:BASIC<sp>0\n" 3 ) ; org . antlr . v4 . runtime . atn . ATN atn = createATN ( g , true ) ; java . lang . String result = org . antlr . v4 . runtime . atn . ATNSerializer . getDecoded ( atn , java . util . Arrays . asList ( g . getTokenNames ( ) ) ) ; "<AssertPlaceHolder>" ; } getTokenNames ( ) { return org . antlr . v4 . runtime . tree . xpath . XPathLexer . tokenNames ; }
org . junit . Assert . assertEquals ( expecting , result )
findByConsumerAndIdCaseInsensitive ( ) { java . lang . String guestId = "GuEsTiD" ; org . candlepin . model . Consumer consumer = new org . candlepin . model . Consumer ( "testConsumer" , "testUser" , owner , ct ) ; consumer . addGuestId ( new org . candlepin . model . GuestId ( guestId ) ) ; consumerCurator . create ( consumer ) ; org . candlepin . model . GuestId result = curator . findByConsumerAndId ( consumer , guestId . toUpperCase ( ) ) ; "<AssertPlaceHolder>" ; } findByConsumerAndId ( org . candlepin . model . Consumer , java . lang . String ) { return ( ( org . candlepin . model . GuestId ) ( this . currentSession ( ) . createCriteria ( org . candlepin . model . GuestId . class ) . add ( org . hibernate . criterion . Restrictions . eq ( "consumer" , consumer ) ) . add ( org . hibernate . criterion . Restrictions . eq ( "guestIdLower" , guestId . toLowerCase ( ) ) ) . setMaxResults ( 1 ) . uniqueResult ( ) ) ) ; }
org . junit . Assert . assertEquals ( new org . candlepin . model . GuestId ( guestId ) , result )
shouldReturnFlipAnnotationAttributesGivenFlipAnnotation ( ) { org . flips . annotation . FlipOnProfiles flipOnProfiles = mock ( org . flips . annotation . FlipOnProfiles . class ) ; java . lang . annotation . Annotation annotation = flipOnProfiles ; java . util . Map < java . lang . String , java . lang . Object > annotationAttributes = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "activeProfiles" , new java . lang . String [ ] { "dev" } ) ; } } ; org . flips . model . FlipAnnotationAttributes expectedAnnotationAttributes = new org . flips . model . FlipAnnotationAttributes . Builder ( ) . addAll ( annotationAttributes ) . build ( ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . springframework . core . annotation . AnnotationUtils . class ) ; when ( org . flips . utils . org . springframework . core . annotation . AnnotationUtils . getAnnotationAttributes ( annotation ) ) . thenReturn ( annotationAttributes ) ; org . flips . model . FlipAnnotationAttributes flipAnnotationAttributes = org . flips . utils . AnnotationUtils . getAnnotationAttributes ( annotation ) ; "<AssertPlaceHolder>" ; org . powermock . api . mockito . PowerMockito . verifyStatic ( ) ; org . flips . utils . org . springframework . core . annotation . AnnotationUtils . getAnnotationAttributes ( annotation ) ; } getAnnotationAttributes ( java . lang . annotation . Annotation ) { return new org . flips . model . FlipAnnotationAttributes . Builder ( ) . addAll ( org . springframework . core . annotation . AnnotationUtils . getAnnotationAttributes ( annotation ) ) . build ( ) ; }
org . junit . Assert . assertEquals ( expectedAnnotationAttributes , flipAnnotationAttributes )
InReplyToNullNullOProperty ( ) { org . odata4j . core . OProperty < ? > expected = org . odata4j . core . OProperties . null_ ( ReceivedMessage . P_IN_REPLY_TO . getName ( ) , EdmSimpleType . STRING ) ; org . odata4j . core . OProperty < ? > result = this . setDefaultValue ( ReceivedMessage . P_IN_REPLY_TO . build ( ) , ReceivedMessage . P_IN_REPLY_TO . getName ( ) , org . odata4j . core . OProperties . string ( ReceivedMessage . P_IN_REPLY_TO . getName ( ) , "" ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( expected . getValue ( ) , result . getValue ( ) )
testByteBufStringValuePool ( ) { final int capacity = 8 ; final int chars = java . lang . Integer . toString ( capacity ) . length ( ) ; final org . apache . activemq . artemis . utils . collections . TypedProperties . StringValue . ByteBufStringValuePool pool = new org . apache . activemq . artemis . utils . collections . TypedProperties . StringValue . ByteBufStringValuePool ( capacity , chars ) ; final int bytes = new org . apache . activemq . artemis . api . core . SimpleString ( java . lang . Integer . toString ( capacity ) ) . sizeof ( ) ; final io . netty . buffer . ByteBuf bb = io . netty . buffer . Unpooled . buffer ( bytes , bytes ) ; for ( int i = 0 ; i < capacity ; i ++ ) { final org . apache . activemq . artemis . api . core . SimpleString s = new org . apache . activemq . artemis . api . core . SimpleString ( java . lang . Integer . toString ( i ) ) ; bb . resetWriterIndex ( ) ; org . apache . activemq . artemis . api . core . SimpleString . writeSimpleString ( bb , s ) ; bb . resetReaderIndex ( ) ; final org . apache . activemq . artemis . utils . collections . TypedProperties . StringValue expectedPooled = pool . getOrCreate ( bb ) ; bb . resetReaderIndex ( ) ; "<AssertPlaceHolder>" ; bb . resetReaderIndex ( ) ; } } resetReaderIndex ( ) { }
org . junit . Assert . assertSame ( expectedPooled , pool . getOrCreate ( bb ) )
testAnummerWijzigingBijhoudingIsAlOverig ( ) { isAnummerWijziging = true ; final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonNummerverwijzingHistorie historie = new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonNummerverwijzingHistorie ( nieuwePersoon ) ; historie . setVorigeAdministratienummer ( 9876543210L ) ; nieuwePersoon . addPersoonNummerverwijzingHistorie ( historie ) ; vulPersoonGroepen ( bestaandePersoon , true ) ; vulPersoonGroepen ( nieuwePersoon , true ) ; final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonAdres persoonAdres = new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonAdres ( bestaandePersoon ) ; persoonAdres . addPersoonAdresHistorie ( new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonAdresHistorie ( persoonAdres , nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . FunctieAdres . WOONADRES , maakLandOfGebied ( ) , REDEN_WIJZIGING_AMBTSHALVE ) ) ; bestaandePersoon . addPersoonAdres ( persoonAdres ) ; final java . util . List < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . AdministratieveHandeling > nieuweAdministratieveHandelingen = testService ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , nieuweAdministratieveHandelingen . size ( ) )
testToStringWithConfigs ( ) { org . eclipse . kura . core . net . NetInterfaceAddressConfigImpl value = createConfig ( ) ; java . lang . String expected = "NetConfig:<sp>NetConfigIP4<sp>[winsServers=[],<sp>super.toString()=NetConfigIP" + ( ( ( ( ( ( "<sp>[status=netIPv4StatusEnabledLAN,<sp>autoConnect=true,<sp>dhcp=false,<sp>address=null," + "<sp>networkPrefixLength=-1,<sp>subnetMask=null,<sp>gateway=null,<sp>dnsServers=[]," ) + "<sp>domains=[],<sp>properties={}]]<sp>-<sp>" ) + "NetConfig:<sp>NetConfigIP4<sp>[winsServers=[],<sp>super.toString()=NetConfigIP" ) + "<sp>[status=netIPv4StatusEnabledWAN,<sp>autoConnect=false,<sp>dhcp=false,<sp>address=null," ) + "<sp>networkPrefixLength=-1,<sp>subnetMask=null,<sp>gateway=null,<sp>dnsServers=[]," ) + "<sp>domains=[],<sp>properties={}]]<sp>-<sp>" ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( "]" 1 ) . append ( this . id ) . append ( "]" 0 ) . append ( this . topic ) . append ( ",<sp>qos=" ) . append ( this . qos ) . append ( ",<sp>retain=" ) . append ( this . retain ) . append ( ",<sp>createdOn=" ) . append ( this . createdOn ) . append ( ",<sp>publishedOn=" ) . append ( this . publishedOn ) . append ( ",<sp>publishedMessageId=" ) . append ( this . publishedMessageId ) . append ( ",<sp>confirmedOn=" ) . append ( this . confirmedOn ) . append ( ",<sp>payload=" ) . append ( java . util . Arrays . toString ( this . payload ) ) . append ( ",<sp>priority=" ) . append ( this . priority ) . append ( ",<sp>sessionId=" ) . append ( this . sessionId ) . append ( "]" 2 ) . append ( this . droppedOn ) . append ( "]" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , value . toString ( ) )
givenEmptyList_whenElementIsAdded_thenGetReturnsThatElement ( ) { java . util . List < java . lang . Object > list = new com . baeldung . java . list . CustomList ( ) ; boolean succeeded = list . add ( null ) ; "<AssertPlaceHolder>" ; } add ( E ) { java . lang . Object [ ] temp = java . util . Arrays . copyOf ( internal , ( ( internal . length ) + 1 ) ) ; temp [ internal . length ] = element ; internal = temp ; return true ; }
org . junit . Assert . assertTrue ( succeeded )
shouldFailGetNodeNullParent ( ) { try { tools . getNode ( NULL_NODE , "Person" , true ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } getNode ( javax . jcr . Node , java . lang . String , boolean ) { org . modeshape . jcr . api . JcrTools . isNotNull ( node , "node" ) ; org . modeshape . jcr . api . JcrTools . isNotNull ( relativePath , "relativePath" ) ; javax . jcr . Node result = null ; try { result = node . getNode ( relativePath ) ; } catch ( javax . jcr . PathNotFoundException e ) { if ( required ) { throw e ; } } return result ; }
org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalArgumentException ) )
testGetLastTaskName_1 ( ) { org . audit4j . core . util . StopWatch fixture = new org . audit4j . core . util . StopWatch ( "" ) ; fixture . setKeepTaskList ( true ) ; fixture . start ( "" ) ; halt ( ) ; fixture . stop ( ) ; java . lang . String result = fixture . getLastTaskName ( ) ; "<AssertPlaceHolder>" ; } getLastTaskName ( ) { if ( ( this . lastTaskInfo ) == null ) { throw new java . lang . IllegalStateException ( "No<sp>tasks<sp>run:<sp>can't<sp>get<sp>last<sp>task<sp>name" ) ; } return this . lastTaskInfo . getTaskName ( ) ; }
org . junit . Assert . assertEquals ( "" , result )
countCrossingsBetweenLayers_crossFormed ( ) { getCrossFormedGraph ( ) ; counter = new org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter ( new int [ getNumPorts ( order ( ) ) ] ) ; "<AssertPlaceHolder>" ; } countCrossingsBetweenLayers ( org . eclipse . elk . alg . layered . graph . LNode [ ] , org . eclipse . elk . alg . layered . graph . LNode [ ] ) { java . util . List < org . eclipse . elk . alg . layered . graph . LPort > ports = initPortPositionsCounterClockwise ( leftLayerNodes , rightLayerNodes ) ; indexTree = new org . eclipse . elk . alg . layered . p3order . counting . BinaryIndexedTree ( ports . size ( ) ) ; return countCrossingsOnPorts ( ports ) ; }
org . junit . Assert . assertThat ( counter . countCrossingsBetweenLayers ( order ( ) [ 0 ] , order ( ) [ 1 ] ) , org . hamcrest . CoreMatchers . is ( 1 ) )
testDisableAutoEscaping ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . autoEscaping ( false ) . build ( ) ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( "{{<sp>text<sp>}}" ) ; java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; context . put ( "text" , "<br<sp>/>" ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer , context ) ; "<AssertPlaceHolder>" ; } toString ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "<br<sp>/>" , writer . toString ( ) )
testEqualsSameTcp ( ) { org . openhab . binding . modbus . internal . pooling . ModbusTCPSlaveEndpoint e1 = new org . openhab . binding . modbus . internal . pooling . ModbusTCPSlaveEndpoint ( "127.0.0.1" , 500 ) ; org . openhab . binding . modbus . internal . pooling . ModbusTCPSlaveEndpoint e2 = new org . openhab . binding . modbus . internal . pooling . ModbusTCPSlaveEndpoint ( "127.0.0.1" , 500 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( e1 , e2 )
testGetSignaturesWhereSignatureDoesNotHaveLastCertificate ( ) { org . digidoc4j . Container container = new org . digidoc4j . impl . ddoc . DDocOpener ( ) . open ( "src/test/resources/testFiles/invalid-containers/signature_without_last_certificate.ddoc" ) ; "<AssertPlaceHolder>" ; } getSignatures ( ) { return m_signatures ; }
org . junit . Assert . assertEquals ( 0 , container . getSignatures ( ) . size ( ) )
testNotNullConfigurationCommand ( ) { for ( com . digi . xbee . api . io . IOLine ioLine : ioLines ) "<AssertPlaceHolder>" ; } getConfigurationATCommand ( ) { return atCommand ; }
org . junit . Assert . assertNotNull ( ioLine . getConfigurationATCommand ( ) )
testConstruct_parameterizedConstructor_nullDetails ( ) { boolean exceptionOccured = false ; try { new org . nhindirect . common . tx . model . Tx ( TxMessageType . DSN , null ) ; } catch ( java . lang . IllegalArgumentException e ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( exceptionOccured )
testJDK9NoParsePhaseTag ( ) { java . lang . String [ ] logLines = new java . lang . String [ ] { "range_check" 7 , "range_check" 2 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 5 , "</task>" 8 , "<sp>4:<sp>aload_0<sp>" 2 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 6 , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" 1 , "39:<sp>iadd<sp>" 1 , "range_check" 6 , "range_check" 0 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 9 , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" 2 , "range_check" 3 , "<sp>4:<sp>aload_0<sp>" 9 , "range_check" 4 , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" 4 , "<sp>4:<sp>aload_0<sp>" 0 , "range_check" 5 , "</task>" 1 , "39:<sp>iadd<sp>" 4 , "read" 4 , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" 0 , "read" 2 , "<sp>4:<sp>aload_0<sp>" 7 , "read" 5 , "<sp><uncommon_trap<sp>reason='unloaded'<sp>method='871'<sp>klass='881'<sp>bci='9'<sp>action='reinterpret'<sp>index='2'/>" , "read" 6 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 7 , "39:<sp>iadd<sp>" 5 , "</task>" 4 , "range_check" 8 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 8 , "<sp>4:<sp>aload_0<sp>" 4 , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" 5 , "</task>" 6 , "read" 0 , "39:<sp>iadd<sp>" 3 , "</task>" 5 , "range_check" 9 , "</task>" 5 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 2 , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" , "</task>" } ; java . lang . String [ ] bytecodeLines = new java . lang . String [ ] { "</task>" 7 , "read" 7 , "<sp>4:<sp>aload_0<sp>" , "range_check" 1 , "<sp>8:<sp>if_icmplt<sp>28<sp>" , "<sp><task_done<sp>inlined_bytes='21'<sp>success='1'<sp>count='8763'<sp>stamp='3.634'<sp>nmsize='1096'/>" 3 , "read" 8 , "read" 9 , "39:<sp>iadd<sp>" 7 , "</task>" 2 , "<sp>4:<sp>aload_0<sp>" 6 , "read" 1 , "39:<sp>iadd<sp>" 0 , "</task>" 0 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 0 , "<sp>4:<sp>aload_0<sp>" 1 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 1 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 3 , "<sp>4:<sp>aload_0<sp>" 3 , "</task>" 9 , "38:<sp>iconst_1<sp>" , "39:<sp>iadd<sp>" , "39:<sp>iadd<sp>" 9 , "<sp>4:<sp>aload_0<sp>" 5 , "</task>" 3 , "<sp>8:<sp>if_icmplt<sp>28<sp>" 4 , "48:<sp>ireturn<sp>" } ; org . adoptopenjdk . jitwatch . model . IMetaMember member = org . adoptopenjdk . jitwatch . test . UnitTestUtil . createTestMetaMember ( "39:<sp>iadd<sp>" 2 , "read" , new java . lang . Class [ 0 ] , int . class ) ; org . adoptopenjdk . jitwatch . model . JITDataModel model = new org . adoptopenjdk . jitwatch . model . JITDataModel ( ) ; model . setVmVersionRelease ( "<sp>4:<sp>aload_0<sp>" 8 ) ; org . adoptopenjdk . jitwatch . model . bytecode . BytecodeAnnotations result = org . adoptopenjdk . jitwatch . test . UnitTestUtil . buildAnnotations ( true , false , model , member , logLines , bytecodeLines ) ; org . adoptopenjdk . jitwatch . model . bytecode . BytecodeAnnotationList list = result . getAnnotationList ( member ) ; "<AssertPlaceHolder>" ; org . adoptopenjdk . jitwatch . test . UnitTestUtil . checkAnnotation ( list , 8 , "39:<sp>iadd<sp>" 6 , BCAnnotationType . BRANCH ) ; org . adoptopenjdk . jitwatch . test . UnitTestUtil . checkAnnotation ( list , 12 , "39:<sp>iadd<sp>" 8 , BCAnnotationType . INLINE_FAIL ) ; org . adoptopenjdk . jitwatch . test . UnitTestUtil . checkAnnotation ( list , 23 , "39:<sp>iadd<sp>" 6 , BCAnnotationType . BRANCH ) ; org . adoptopenjdk . jitwatch . test . UnitTestUtil . checkAnnotation ( list , 29 , "read" 3 , BCAnnotationType . INLINE_SUCCESS ) ; org . adoptopenjdk . jitwatch . test . UnitTestUtil . checkAnnotation ( list , 43 , "range_check" , BCAnnotationType . UNCOMMON_TRAP ) ; } annotatedLineCount ( ) { return annotationMap . size ( ) ; }
org . junit . Assert . assertEquals ( 5 , list . annotatedLineCount ( ) )
testParseMultipleNameNodes ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( false ) ; java . lang . String nameservice = "ns1" ; org . apache . hadoop . hdfs . MiniDFSNNTopology topology = new org . apache . hadoop . hdfs . MiniDFSNNTopology ( ) . addNameservice ( new org . apache . hadoop . hdfs . MiniDFSNNTopology . NSConf ( nameservice ) . addNN ( new org . apache . hadoop . hdfs . MiniDFSNNTopology . NNConf ( "nn1" ) . setIpcPort ( 10001 ) ) . addNN ( new org . apache . hadoop . hdfs . MiniDFSNNTopology . NNConf ( "nn2" ) . setIpcPort ( 10002 ) ) . addNN ( new org . apache . hadoop . hdfs . MiniDFSNNTopology . NNConf ( "nn3" ) . setIpcPort ( 10003 ) ) ) ; org . apache . hadoop . hdfs . MiniDFSCluster . configureNameNodes ( topology , false , conf ) ; conf . set ( DFSConfigKeys . DFS_HA_NAMENODE_ID_KEY , "nn1" ) ; java . util . List < org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo > nns = org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo . getRemoteNameNodes ( conf ) ; java . util . List < org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo > nns2 = org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo . getRemoteNameNodes ( conf , nameservice ) ; "<AssertPlaceHolder>" ; } getRemoteNameNodes ( org . apache . hadoop . conf . Configuration , java . lang . String ) { if ( nsId == null ) { return java . util . Collections . emptyList ( ) ; } java . util . List < org . apache . hadoop . conf . Configuration > otherNodes = org . apache . hadoop . hdfs . HAUtil . getConfForOtherNodes ( conf ) ; java . util . List < org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo > nns = new java . util . ArrayList < org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo > ( ) ; for ( org . apache . hadoop . conf . Configuration otherNode : otherNodes ) { java . lang . String otherNNId = org . apache . hadoop . hdfs . HAUtil . getNameNodeId ( otherNode , nsId ) ; java . net . InetSocketAddress otherIpcAddr = org . apache . hadoop . hdfs . server . namenode . NameNode . getServiceAddress ( otherNode , true ) ; final java . lang . String scheme = org . apache . hadoop . hdfs . DFSUtil . getHttpClientScheme ( conf ) ; java . net . URL otherHttpAddr = org . apache . hadoop . hdfs . DFSUtil . getInfoServerWithDefaultHost ( otherIpcAddr . getHostName ( ) , otherNode , scheme ) . toURL ( ) ; nns . add ( new org . apache . hadoop . hdfs . server . namenode . ha . RemoteNameNodeInfo ( otherNode , otherNNId , otherIpcAddr , otherHttpAddr ) ) ; } return nns ; }
org . junit . Assert . assertEquals ( nns , nns2 )
shouldNonDefaultConstructorReturnTheCorrectNumberOfSolutions ( ) { int solutionsToBeReturned = 4 ; org . uma . jmetal . operator . impl . selection . NaryRandomSelection < org . uma . jmetal . solution . Solution < ? > > selection = new org . uma . jmetal . operator . impl . selection . NaryRandomSelection < org . uma . jmetal . solution . Solution < ? > > ( solutionsToBeReturned ) ; int result = ( ( int ) ( org . springframework . test . util . ReflectionTestUtils . getField ( selection , "numberOfSolutionsToBeReturned" ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( solutionsToBeReturned , result )
testChangeType ( ) { testItem . getProcess ( ) . setDefaultContext ( "Default" ) ; java . lang . String [ ] paramNames = new java . lang . String [ ] { "new1" , "new2" , "new3" } ; org . talend . designer . core . model . utils . emf . talendfile . ContextType defaultGroup = createContextType ( "Default" , paramNames ) ; testItem . getProcess ( ) . getContext ( ) . add ( defaultGroup ) ; ( ( org . talend . designer . core . model . utils . emf . talendfile . ContextParameterType ) ( defaultGroup . getContextParameter ( ) . get ( 0 ) ) ) . setType ( "id_Date" ) ; org . talend . designer . core . model . utils . emf . talendfile . ContextType group1 = createContextType ( "group1" , paramNames ) ; testItem . getProcess ( ) . getContext ( ) . add ( group1 ) ; org . talend . repository . model . migration . FixUnevenItemContextParametersMigrationTask migration = new org . talend . repository . model . migration . FixUnevenItemContextParametersMigrationTask ( ) ; migration . execute ( testItem ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return map . get ( key ) ; }
org . junit . Assert . assertEquals ( ( ( org . talend . designer . core . model . utils . emf . talendfile . ContextParameterType ) ( group1 . getContextParameter ( ) . get ( 0 ) ) ) . getType ( ) , "id_Date" )
shouldRejectifMissingNameOnPost ( ) { host . setName ( null ) ; res = hv . validate ( host , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( res , org . openstack . atlas . api . mgmt . validation . validators . POST ) , res . passedValidation ( ) )
testSignAndVerifyFailure ( ) { com . trilead . ssh2 . signature . ED25519KeyAlgorithm testCase = new com . trilead . ssh2 . signature . ED25519KeyAlgorithm ( ) ; byte [ ] message = "Signature<sp>Test<sp>2" . getBytes ( StandardCharsets . UTF_8 ) ; java . security . KeyPairGenerator factory = java . security . KeyPairGenerator . getInstance ( "EdDSA" , new net . i2p . crypto . eddsa . EdDSASecurityProvider ( ) ) ; java . security . KeyPair keyPair = factory . generateKeyPair ( ) ; net . i2p . crypto . eddsa . EdDSAPrivateKey privateKey = ( ( net . i2p . crypto . eddsa . EdDSAPrivateKey ) ( keyPair . getPrivate ( ) ) ) ; net . i2p . crypto . eddsa . EdDSAPublicKey publicKey = ( ( net . i2p . crypto . eddsa . EdDSAPublicKey ) ( keyPair . getPublic ( ) ) ) ; byte [ ] signature = testCase . generateSignature ( "Other<sp>Message" . getBytes ( StandardCharsets . UTF_8 ) , privateKey , new java . security . SecureRandom ( ) ) ; "<AssertPlaceHolder>" ; } verifySignature ( byte [ ] , byte [ ] , U extends java . security . PublicKey ) { try { java . security . Signature signature = ( null == ( provider ) ) ? java . security . Signature . getInstance ( signatureAlgorithm ) : java . security . Signature . getInstance ( signatureAlgorithm , provider ) ; signature . initVerify ( dpk ) ; signature . update ( message ) ; return signature . verify ( ds ) ; } catch ( java . security . GeneralSecurityException ex ) { throw new java . io . IOException ( "Could<sp>not<sp>verify<sp>signature" , ex ) ; } }
org . junit . Assert . assertFalse ( testCase . verifySignature ( message , signature , publicKey ) )
testGeldigeAutorisatieSoortAutorisatieVerplicht ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . NADEREBIJHOUDINGSAARD_CODE . getId ( ) ) ; final nl . bzk . brp . service . bevraging . zoekpersoongeneriek . AbstractZoekPersoonVerzoek bevragingVerzoek = maakBevragingVerzoek ( attribuutElement , "C" , Zoekoptie . EXACT ) ; final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatieBundel = maakAutorisatiebundel ( false , attribuutElement ) ; final java . util . Set < nl . bzk . brp . domain . algemeen . Melding > meldingen = valideerZoekCriteriaService . valideerZoekCriteria ( bevragingVerzoek , autorisatieBundel ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , meldingen . size ( ) )
isDefaultValidNoDefaultAdapter ( ) { creatBillingAdapter ( BillingAdapterIdentifier . NATIVE_BILLING . toString ( ) , false ) ; creatBillingAdapter ( org . oscm . billingadapterservice . bean . BillingAdapterDAOIT . BILLING_ID , false ) ; boolean isValid = isDefaultAdapterValid ( ) . booleanValue ( ) ; "<AssertPlaceHolder>" ; } isDefaultAdapterValid ( ) { return runTX ( new java . util . concurrent . Callable < java . lang . Boolean > ( ) { @ org . oscm . billingadapterservice . bean . Override public org . oscm . billingadapterservice . bean . Boolean call ( ) throws org . oscm . billingadapterservice . bean . Exception { return new java . lang . Boolean ( billAdapterDAO . isDefaultValid ( ) ) ; } } ) ; }
org . junit . Assert . assertFalse ( isValid )
test_String ( ) { com . gh . mygreen . xlsmapper . xml . OgnlValueFormatter formatter = new com . gh . mygreen . xlsmapper . xml . OgnlValueFormatter ( ) ; java . lang . String exp = formatter . format ( "Hello\"こんにちは" ) ; org . junit . Assert . assertThat ( exp , is ( "\"Hello\\\"こんにちは\"" ) ) ; "<AssertPlaceHolder>" ; } evalOgnl ( java . lang . String ) { try { ognl . OgnlContext context = new ognl . OgnlContext ( ) ; java . lang . Object obj = ognl . Ognl . getValue ( expression , context , new java . lang . Object ( ) ) ; return ( ( A ) ( obj ) ) ; } catch ( ognl . OgnlException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertThat ( ( ( java . lang . String ) ( evalOgnl ( exp ) ) ) , is ( "Hello\"こんにちは" ) )