input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
listResults2 ( ) { com . querydsl . sql . QueryResults < java . lang . Integer > results = query ( ) . from ( employee ) . limit ( 2 ) . offset ( 10 ) . orderBy ( employee . id . asc ( ) ) . select ( employee . id ) . fetchResults ( ) ; "<AssertPlaceHolder>" ; } getTotal ( ) { return total ; }
org . junit . Assert . assertEquals ( 10 , results . getTotal ( ) )
givenVoidAsMethodReturnType_whenBuildRepresentation_thenDoNotAddAnything ( ) { final com . autentia . web . rest . wadl . builder . ApplicationContext appCtx = new com . autentia . web . rest . wadl . builder . ApplicationContext ( com . autentia . web . rest . wadl . builder . RepresentationBuilderTest . IGNORED_METHOD_CONTEXT_ITERATOR , new com . autentia . web . rest . wadl . builder . namespace . GrammarsDiscoverer ( new com . autentia . xml . schema . ClassTypeDiscoverer ( new com . autentia . web . rest . wadl . builder . namespace . QNameBuilderFactory ( ) . getBuilder ( ) ) ) ) ; final com . autentia . web . rest . wadl . builder . MethodContext methodCtxMock = mock ( com . autentia . web . rest . wadl . builder . MethodContext . class ) ; doReturn ( appCtx ) . when ( methodCtxMock ) . getParentContext ( ) ; doReturn ( new java . util . HashSet < org . springframework . http . MediaType > ( ) { { add ( MediaType . APPLICATION_JSON ) ; } } ) . when ( methodCtxMock ) . getMediaTypes ( ) ; doReturn ( JavaMethod . WITHOUT_PARAMETERS ) . when ( methodCtxMock ) . getJavaMethod ( ) ; final java . util . Collection < net . java . dev . wadl . _2009 . _02 . Representation > representations = representationBuilder . build ( methodCtxMock ) ; "<AssertPlaceHolder>" ; } build ( java . lang . String ) { final java . util . Collection < net . java . dev . wadl . _2009 . _02 . Resources > resourcesElements = new java . util . ArrayList < net . java . dev . wadl . _2009 . _02 . Resources > ( ) ; resourcesElements . add ( new net . java . dev . wadl . _2009 . _02 . Resources ( ) . withBase ( baseUrl ) . withResource ( resourceBuilder . build ( ) ) ) ; return resourcesElements ; }
org . junit . Assert . assertThat ( representations , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . empty ( ) ) )
testSerialization ( ) { org . jfree . chart . labels . HighLowItemLabelGenerator g1 = new org . jfree . chart . labels . HighLowItemLabelGenerator ( ) ; org . jfree . chart . labels . HighLowItemLabelGenerator g2 = ( ( org . jfree . chart . labels . HighLowItemLabelGenerator ) ( org . jfree . chart . TestUtilities . serialised ( g1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( g1 , g2 )
testSocialPreloadViewResolution ( ) { org . apache . shindig . gadgets . spec . GadgetSpec spec = new org . apache . shindig . gadgets . spec . GadgetSpec ( GADGET_URL , org . apache . shindig . gadgets . preload . PipelinedDataPreloaderTest . XML_IN_DEFAULT_CONTAINER ) ; java . lang . String socialResult = "[{id:'p',<sp>result:1},<sp>{id:'a',<sp>result:2}]" ; org . apache . shindig . gadgets . preload . PipelinedDataPreloaderTest . RecordingRequestPipeline pipeline = new org . apache . shindig . gadgets . preload . PipelinedDataPreloaderTest . RecordingRequestPipeline ( socialResult ) ; org . apache . shindig . gadgets . preload . PipelinedDataPreloader preloader = new org . apache . shindig . gadgets . preload . PipelinedDataPreloader ( pipeline , containerConfig ) ; view = "profile" ; contextParams . put ( "st" , "token" ) ; org . apache . shindig . gadgets . Gadget gadget = new org . apache . shindig . gadgets . Gadget ( ) . setContext ( context ) . setSpec ( spec ) . setCurrentView ( spec . getView ( GadgetSpec . DEFAULT_VIEW ) ) ; org . apache . shindig . gadgets . spec . PipelinedData . Batch batch = getBatch ( gadget ) ; java . util . Collection < java . util . concurrent . Callable < org . apache . shindig . gadgets . preload . PreloadedData > > tasks = preloader . createPreloadTasks ( context , batch ) ; "<AssertPlaceHolder>" ; } size ( ) { java . util . List < java . lang . Object [ ] > s = stackHolder . get ( ) ; if ( s == null ) { return 0 ; } else { return s . size ( ) ; } }
org . junit . Assert . assertEquals ( 1 , tasks . size ( ) )
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . HospitalAdmissionDiagnosisSectionOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . HospitalAdmissionDiagnosisSectionOperations ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
hasFiveGroups ( ) { final java . lang . String uuid = org . uberfire . commons . uuid . UUID . uuid ( ) ; final java . lang . String [ ] split = uuid . split ( "-" ) ; "<AssertPlaceHolder>" ; } split ( java . lang . String ) { final java . lang . String [ ] s = new java . lang . String [ 2 ] ; final int pos = attribute . indexOf ( ':' ) ; if ( pos == ( - 1 ) ) { s [ 0 ] = "basic" ; s [ 1 ] = attribute ; } else { s [ 0 ] = attribute . substring ( 0 , pos ) ; s [ 1 ] = ( pos == ( attribute . length ( ) ) ) ? "" : attribute . substring ( ( pos + 1 ) ) ; } return s ; }
org . junit . Assert . assertEquals ( 5 , split . length )
testPutWithDeferredAllocation ( ) { java . util . List < com . google . datastore . v1 . Mutation > pbs = new java . util . LinkedList ( ) ; pbs . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setInsert ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . INCOMPLETE_ENTITY_1 . toPb ( ) ) . build ( ) ) ; pbs . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setInsert ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . INCOMPLETE_ENTITY_2 . toPb ( ) ) . build ( ) ) ; pbs . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setUpsert ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . ENTITY1 . toPb ( ) ) . build ( ) ) ; batchWriter . put ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . ENTITY1 ) ; batchWriter . putWithDeferredIdAllocation ( com . google . cloud . datastore . BaseDatastoreBatchWriterTest . INCOMPLETE_ENTITY_1 , com . google . cloud . datastore . BaseDatastoreBatchWriterTest . INCOMPLETE_ENTITY_2 ) ; "<AssertPlaceHolder>" ; } toMutationPbList ( ) { java . util . List < com . google . datastore . v1 . Mutation > mutationsPb = new java . util . ArrayList ( ) ; for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . IncompleteKey > entity : toAddAutoId ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setInsert ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . Key > entity : toAdd ( ) . values ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setInsert ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . Key > entity : toUpdate ( ) . values ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setUpdate ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . FullEntity < com . google . cloud . datastore . Key > entity : toPut ( ) . values ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setUpsert ( entity . toPb ( ) ) . build ( ) ) ; } for ( com . google . cloud . datastore . Key key : toDelete ( ) ) { mutationsPb . add ( com . google . cloud . datastore . com . google . datastore . v1 . Mutation . newBuilder ( ) . setDelete ( key . toPb ( ) ) . build ( ) ) ; } return mutationsPb ; }
org . junit . Assert . assertEquals ( pbs , batchWriter . toMutationPbList ( ) )
testBuildWithParameters ( ) { org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; org . lnu . is . domain . family . type . FamilyType addressType = new org . lnu . is . domain . family . type . FamilyType ( ) ; java . lang . String value = "fasd" ; org . lnu . is . domain . person . family . PersonFamily context = new org . lnu . is . domain . person . family . PersonFamily ( ) ; context . setPerson ( person ) ; context . setFamilyType ( addressType ) ; context . setName ( value ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonFamily<sp>e<sp>WHERE<sp>(<sp>e.person<sp>=<sp>:person<sp>AND<sp>e.familyType<sp>=<sp>:familyType<sp>AND<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . family . PersonFamily > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testCallback ( ) { org . apache . jackrabbit . oak . spi . security . authentication . callback . UserManagerCallback cb = new org . apache . jackrabbit . oak . spi . security . authentication . callback . UserManagerCallback ( ) ; org . apache . jackrabbit . api . security . user . UserManager uMgr = org . mockito . Mockito . mock ( org . apache . jackrabbit . api . security . user . UserManager . class ) ; cb . setUserManager ( uMgr ) ; "<AssertPlaceHolder>" ; } getUserManager ( ) { root . refresh ( ) ; return getUserManager ( root ) ; }
org . junit . Assert . assertSame ( uMgr , cb . getUserManager ( ) )
testCreateMessageStoreWithEnableSSLInputTrue ( ) { org . powermock . api . mockito . PowerMockito . whenNew ( java . util . Properties . class ) . withNoArguments ( ) . thenReturn ( propertiesMock ) ; org . powermock . api . mockito . PowerMockito . whenNew ( io . cloudslang . content . mail . entities . SimpleAuthenticator . class ) . withArguments ( anyString ( ) , anyString ( ) ) . thenReturn ( authenticatorMock ) ; doNothing ( ) . when ( getMailMessageSpy ) . addSSLSettings ( anyBoolean ( ) , anyString ( ) , anyString ( ) , anyString ( ) , anyString ( ) ) ; doReturn ( storeMock ) . when ( getMailMessageSpy ) . configureStoreWithSSL ( propertiesMock , authenticatorMock ) ; doNothing ( ) . when ( storeMock ) . connect ( ) ; addRequiredInputs ( ) ; inputs . setEnableSSL ( io . cloudslang . content . mail . services . GetMailMessageTest . STR_TRUE ) ; inputs . setEnableTLS ( io . cloudslang . content . mail . services . GetMailMessageTest . STR_FALSE ) ; getMailMessageSpy . processInputs ( inputs ) ; "<AssertPlaceHolder>" ; org . powermock . api . mockito . PowerMockito . verifyNew ( java . util . Properties . class ) . withNoArguments ( ) ; org . powermock . api . mockito . PowerMockito . verifyNew ( io . cloudslang . content . mail . entities . SimpleAuthenticator . class ) . withArguments ( anyString ( ) , anyString ( ) ) ; verify ( getMailMessageSpy ) . addSSLSettings ( anyBoolean ( ) , anyString ( ) , anyString ( ) , anyString ( ) , anyString ( ) ) ; verify ( getMailMessageSpy ) . configureStoreWithSSL ( propertiesMock , authenticatorMock ) ; } createMessageStore ( ) { io . cloudslang . content . mail . services . Properties props = new io . cloudslang . content . mail . services . Properties ( ) ; if ( ( timeout ) > 0 ) { props . put ( ( ( "mail." + ( protocol ) ) + ".timeout" ) , timeout ) ; } io . cloudslang . content . mail . services . Authenticator auth = new io . cloudslang . content . mail . entities . SimpleAuthenticator ( username , password ) ; io . cloudslang . content . mail . services . Store store ; if ( ( enableTLS ) || ( enableSSL ) ) { addSSLSettings ( trustAllRoots , keystore , keystorePassword , trustKeystoreFile , trustPassword ) ; } if ( enableTLS ) { store = tryTLSOtherwiseTrySSL ( props , auth ) ; } else if ( enableSSL ) { store = connectUsingSSL ( props , auth ) ; } else { store = configureStoreWithoutSSL ( props , auth ) ; store . connect ( ) ; } return store ; }
org . junit . Assert . assertEquals ( storeMock , getMailMessageSpy . createMessageStore ( ) )
recordingLookuo ( ) { java . lang . String expected = "http://musicbrainz.org/ws/2/recording/470d06f8-6c0c-443d-b521-4c4eed9f0e7e?inc=artists+tags+ratings" ; java . lang . String actual = org . musicbrainz . android . api . webservice . QueryBuilder . recordingLookup ( "470d06f8-6c0c-443d-b521-4c4eed9f0e7e" ) ; "<AssertPlaceHolder>" ; } recordingLookup ( java . lang . String ) { return org . musicbrainz . android . api . webservice . QueryBuilder . buildQuery ( ( ( ( org . musicbrainz . android . api . webservice . QueryBuilder . LOOKUP_RECORDING ) + mbid ) + ( org . musicbrainz . android . api . webservice . QueryBuilder . LOOKUP_RECORDING_PARAMS ) ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
entrySet ( ) { "<AssertPlaceHolder>" ; } entrySet ( ) { return new EntrySet ( ) ; }
org . junit . Assert . assertEquals ( expected . entrySet ( ) , map . entrySet ( ) )
testBRY9902Normaal ( ) { final nl . bzk . brp . model . bijhouding . BijhoudingsBericht simplegGeboorteBericht = maakSimpleInschrijvingBericht2 ( ) ; nl . bzk . brp . bijhouding . business . util . BerichtAdministratieUtil . verrijktBerichtMetIdentificeerbaarObjectIndex ( simplegGeboorteBericht ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtIdentificeerbaar > berichtenDieDeRegelOvertreden = bedrijfsregel . voerRegelUit ( simplegGeboorteBericht ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , berichtenDieDeRegelOvertreden . size ( ) )
testInvalidPort ( ) { com . streamsets . pipeline . stage . origin . mongodb . MongoDBSource origin = new com . streamsets . pipeline . stage . origin . mongodb . MongoDBSourceBuilder ( ) . connectionString ( ( ( "mongodb://" + ( com . streamsets . pipeline . stage . origin . mongodb . MongoDBSourceIT . mongoContainerIp ) ) + ":abcd" ) ) . database ( com . streamsets . pipeline . stage . origin . mongodb . MongoDBSourceIT . DATABASE_NAME ) . collection ( com . streamsets . pipeline . stage . origin . mongodb . MongoDBSourceIT . CAPPED_COLLECTION ) . initialOffset ( "2015-06-01<sp>00:00:00" ) . build ( ) ; com . streamsets . pipeline . sdk . SourceRunner runner = new com . streamsets . pipeline . sdk . SourceRunner . Builder ( com . streamsets . pipeline . stage . origin . mongodb . MongoDBSource . class , origin ) . addOutputLane ( "lane" ) . build ( ) ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = runner . runValidateConfigs ( ) ; "<AssertPlaceHolder>" ; com . streamsets . pipeline . stage . origin . mongodb . MongoDBSourceIT . LOG . info ( issues . get ( 0 ) . toString ( ) ) ; } size ( ) { return delegate . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , issues . size ( ) )
testIterate ( ) { com . samskivert . util . AbstractIntSet set = createSet ( new int [ ] { 3 , 5 , 5 , 9 , 5 , 7 , 1 } ) ; java . util . Set < java . lang . Integer > jset = new java . util . TreeSet < java . lang . Integer > ( ) ; jset . addAll ( set ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( other instanceof com . samskivert . swing . RuntimeAdjust . Adjust ) && ( _name . equals ( ( ( com . samskivert . swing . RuntimeAdjust . Adjust ) ( other ) ) . _name ) ) ; }
org . junit . Assert . assertTrue ( jset . equals ( set ) )
testBounceString ( ) { java . lang . String received = server . bounce_string ( org . jacorb . test . bugs . bug739 . Bug739Test . line ) ; "<AssertPlaceHolder>" ; } bounce_string ( java . lang . String ) { return value ; }
org . junit . Assert . assertEquals ( org . jacorb . test . bugs . bug739 . Bug739Test . line , received )
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . RecentLayoutRevision . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "recentLayoutRevisionId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . portal . kernel . model . RecentLayoutRevision > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
shouldValidateWellFormedCertificate ( ) { java . util . List < org . openstack . atlas . util . ca . zeus . ErrorEntry > errors = new java . util . ArrayList < org . openstack . atlas . util . ca . zeus . ErrorEntry > ( ) ; org . openstack . atlas . util . ca . zeus . ZeusUtils . parseCert ( org . openstack . atlas . util . ca . zeus . ZeusUtilsTest . workingUserCrt , errors ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( unpackedArgs . length ) == 0 ; }
org . junit . Assert . assertTrue ( errors . isEmpty ( ) )
testReportZeroTTL ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; int modOperationsTTL = 0 ; map . put ( "instance-modification" , "P0D" ) ; processEngineConfiguration . setBatchOperationsForHistoryCleanup ( map ) ; processEngineConfiguration . initHistoryCleanup ( ) ; java . util . Date startDate = org . camunda . bpm . engine . impl . util . ClockUtil . getCurrentTime ( ) ; int daysInThePast = - 11 ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( org . apache . commons . lang3 . time . DateUtils . addDays ( startDate , daysInThePast ) ) ; org . camunda . bpm . engine . batch . Batch modificationBatch = createModificationBatch ( ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( org . apache . commons . lang3 . time . DateUtils . addDays ( startDate , ( - 7 ) ) ) ; managementService . deleteBatch ( modificationBatch . getId ( ) , false ) ; org . camunda . bpm . engine . history . CleanableHistoricBatchReportResult result = historyService . createCleanableHistoricBatchReport ( ) . singleResult ( ) ; "<AssertPlaceHolder>" ; checkResultNumbers ( result , 1 , 1 , modOperationsTTL ) ; } singleResult ( ) { this . resultType = org . camunda . bpm . engine . impl . AbstractQuery . ResultType . SINGLE_RESULT ; if ( ( commandExecutor ) != null ) { return ( ( U ) ( commandExecutor . execute ( this ) ) ) ; } return executeSingleResult ( org . camunda . bpm . engine . impl . context . Context . getCommandContext ( ) ) ; }
org . junit . Assert . assertNotNull ( result )
getInputStream ( ) { storage . addFileContentEntry ( entry1 , img1File ) ; java . io . InputStream is = storage . getInputStream ( entry1 ) ; "<AssertPlaceHolder>" ; is . close ( ) ; } getInputStream ( java . lang . String ) { if ( entryName != null ) { byte [ ] bytes = fdataTable . get ( entryName ) ; if ( bytes != null ) { return new java . io . ByteArrayInputStream ( bytes ) ; } } return null ; }
org . junit . Assert . assertTrue ( ( is instanceof java . io . ByteArrayInputStream ) )
complexLocation ( ) { final org . sentilo . web . catalog . domain . LngLat point1 = new org . sentilo . web . catalog . domain . LngLat ( 0.0 , 0.0 ) ; final org . sentilo . web . catalog . domain . LngLat point2 = new org . sentilo . web . catalog . domain . LngLat ( 0.0 , 6.0 ) ; final org . sentilo . web . catalog . domain . LngLat point3 = new org . sentilo . web . catalog . domain . LngLat ( 12.0 , 6.0 ) ; final org . sentilo . web . catalog . domain . LngLat [ ] coordinates = new org . sentilo . web . catalog . domain . LngLat [ ] { point1 , point2 , point3 } ; final org . sentilo . web . catalog . domain . Location location = new org . sentilo . web . catalog . domain . Location ( coordinates ) ; "<AssertPlaceHolder>" ; } getNumberOfCoordinates ( ) { return ( coordinates ) != null ? coordinates . length : 0 ; }
org . junit . Assert . assertTrue ( ( ( location . getNumberOfCoordinates ( ) ) == 3 ) )
testGetAdHocDataProviderForReadWhenExists ( ) { org . apache . hadoop . fs . Path testPath = org . mrgeo . hdfs . utils . HadoopFileUtils . createUniqueTmp ( ) ; try { org . mrgeo . data . adhoc . AdHocDataProvider dp = org . mrgeo . data . DataProviderFactory . getAdHocDataProvider ( testPath . toString ( ) , AccessMode . READ , providerProperties ) ; "<AssertPlaceHolder>" ; } finally { org . mrgeo . hdfs . utils . HadoopFileUtils . delete ( testPath ) ; } } toString ( ) { java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; result . append ( "[<sp>" ) ; java . util . Map < java . lang . String , java . lang . String > attr = geometry . getAllAttributes ( ) ; for ( java . lang . String key : geometry . getAllAttributes ( ) . keySet ( ) ) { result . append ( key ) . append ( ":<sp>" ) . append ( attr . get ( key ) ) ; result . append ( ",<sp>" ) ; } result . append ( "geom:<sp>" ) . append ( org . mrgeo . mapreduce . WktConverter . toWkt ( geometry ) ) ; result . append ( "<sp>]" ) ; return result . toString ( ) ; }
org . junit . Assert . assertNotNull ( dp )
testDisabled ( ) { codeine . jsons . project . DiscardOldCommandsJson discardOldCommandsJson = new codeine . jsons . project . DiscardOldCommandsJson ( ) ; codeine . plugins . DiscardOldCommandSelector tested = new codeine . plugins . DiscardOldCommandSelector ( discardOldCommandsJson , allsCommands , TimeUnit . DAYS . toMillis ( 2 ) ) ; allsCommands . add ( new codeine . api . CommandExecutionStatusInfo ( ) ) ; "<AssertPlaceHolder>" ; } commandsToDelete ( ) { if ( ! ( discardOldCommandsJson . enabled ( ) ) ) { return com . google . common . collect . Lists . newArrayList ( ) ; } java . util . List < codeine . api . CommandExecutionStatusInfo > $ = com . google . common . collect . Lists . newArrayList ( ) ; if ( null != ( discardOldCommandsJson . max_days ( ) ) ) { for ( codeine . api . CommandExecutionStatusInfo commandExecutionStatusInfo : allsCommands ) { long total_time = ( commandExecutionStatusInfo . finishTimeForRemoval ( ) ) + ( TimeUnit . DAYS . toMillis ( discardOldCommandsJson . max_days ( ) ) ) ; if ( total_time < ( timeNow ) ) { $ . add ( commandExecutionStatusInfo ) ; } } } java . util . List < codeine . api . CommandExecutionStatusInfo > whatsLeft = com . google . common . collect . Lists . newArrayList ( allsCommands ) ; whatsLeft . removeAll ( $ ) ; if ( ( null == ( discardOldCommandsJson . max_commands ( ) ) ) || ( ( whatsLeft . size ( ) ) <= ( discardOldCommandsJson . max_commands ( ) ) ) ) { return $ ; } for ( java . util . Iterator < codeine . api . CommandExecutionStatusInfo > iterator = whatsLeft . iterator ( ) ; iterator . hasNext ( ) ; ) { codeine . api . CommandExecutionStatusInfo commandExecutionStatusInfo = iterator . next ( ) ; if ( null == commandExecutionStatusInfo ) { iterator . remove ( ) ; } } java . util . Collections . sort ( whatsLeft , new java . util . Comparator < codeine . api . CommandExecutionStatusInfo > ( ) { @ codeine . plugins . Override public int compare ( codeine . api . CommandExecutionStatusInfo arg0 , codeine . api . CommandExecutionStatusInfo arg1 ) { return ( arg0 . finishTimeForRemoval ( ) ) == ( arg1 . finishTimeForRemoval ( ) ) ? 0 : ( arg0 . finishTimeForRemoval ( ) ) < ( arg1 . finishTimeForRemoval ( ) ) ? - 1 : 1 ; } } ) ; $ . addAll ( whatsLeft . subList ( 0 , ( ( whatsLeft . size ( ) ) - ( discardOldCommandsJson . max_commands ( ) ) ) ) ) ; return $ ; }
org . junit . Assert . assertEquals ( com . google . common . collect . Lists . newArrayList ( ) , tested . commandsToDelete ( ) )
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . hitsp . operations . ProblemListSectionOperations obj = new org . openhealthtools . mdht . uml . cda . hitsp . operations . ProblemListSectionOperations ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
cascadeFromMethodReturningAThrowableSubclass ( mockit . CascadingParametersTest$AClass ) { mockit . CascadingParametersTest . CustomException t = mock . getException ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNull ( t )
toTextShouldWriteAvroDataAsDatumText ( ) { org . apache . avro . generic . GenericRecord savedRecord = new org . apache . avro . generic . GenericData . Record ( org . apache . crunch . test . Person . SCHEMA$ ) ; savedRecord . put ( "name" , "John<sp>Doe" ) ; savedRecord . put ( "age" , 42 ) ; savedRecord . put ( "siblingnames" , com . google . common . collect . Lists . newArrayList ( "Jimmy" , "Jane" ) ) ; populateGenericFile ( com . google . common . collect . Lists . newArrayList ( savedRecord ) , Person . SCHEMA . ) ; org . apache . crunch . Pipeline pipeline = new org . apache . crunch . impl . mr . MRPipeline ( org . apache . crunch . io . avro . AvroFileSourceTargetIT . class , tmpDir . getDefaultConfiguration ( ) ) ; org . apache . crunch . PCollection < org . apache . crunch . test . Person > genericCollection = pipeline . read ( org . apache . crunch . io . At . avroFile ( avroFile . getAbsolutePath ( ) , org . apache . crunch . types . avro . Avros . records ( org . apache . crunch . test . Person . class ) ) ) ; java . io . File outputFile = tmpDir . getFile ( "output" ) ; org . apache . crunch . Target textFile = org . apache . crunch . io . To . textFile ( outputFile . getAbsolutePath ( ) ) ; pipeline . write ( genericCollection , textFile ) ; pipeline . run ( ) ; org . apache . crunch . test . Person person = genericCollection . materialize ( ) . iterator ( ) . next ( ) ; java . lang . String outputString = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( outputFile , "part-m-00000" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( "Tuple3[" ) ; sb . append ( first ) . append ( "," ) . append ( second ) . append ( "," ) . append ( third ) ; return sb . append ( "]" ) . toString ( ) ; }
org . junit . Assert . assertTrue ( outputString . contains ( person . toString ( ) ) )
testGetParameters ( ) { org . lnu . is . domain . paper . usage . PaperUsage entity = new org . lnu . is . domain . paper . usage . PaperUsage ( ) ; java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; entity . setName ( name ) ; entity . setAbbrName ( abbrName ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "name" , name ) ; expected . put ( "abbrName" , abbrName ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testCombinedPositionCalculator2 ( ) { org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision [ ] subDimensions ; subDimensions = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision [ 5 ] ; subDimensions [ 0 ] = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision ( 300 , 3 ) ; subDimensions [ 1 ] = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision ( 3000 , 3 ) ; subDimensions [ 2 ] = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision ( 30000 , 3 ) ; subDimensions [ 3 ] = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision ( 3000000 , 3 ) ; subDimensions [ 4 ] = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivision ( 3000000 , 3 ) ; org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivider . CombinedPositionContructor combinedPositionCalculator = new org . eclipse . birt . data . engine . olap . data . impl . facttable . DimensionDivider . CombinedPositionContructor ( subDimensions ) ; int [ ] subdimensionNumber = new int [ 5 ] ; int [ ] dimensionPosition = new int [ 5 ] ; subdimensionNumber [ 0 ] = 0 ; subdimensionNumber [ 1 ] = 0 ; subdimensionNumber [ 2 ] = 1 ; subdimensionNumber [ 3 ] = 1 ; subdimensionNumber [ 4 ] = 2 ; dimensionPosition [ 0 ] = 64 ; dimensionPosition [ 1 ] = 512 ; dimensionPosition [ 2 ] = 10024 ; dimensionPosition [ 3 ] = 1000024 ; dimensionPosition [ 4 ] = 2000024 ; java . math . BigInteger bigInteger = combinedPositionCalculator . calculateCombinedPosition ( subdimensionNumber , dimensionPosition ) ; long l = ( ( ( 64L << 44 ) | ( 512L << 34 ) ) | ( 24L << 20 ) ) | 24 ; java . math . BigInteger bigInteger1 = java . math . BigInteger . valueOf ( l ) ; bigInteger1 = bigInteger1 . shiftLeft ( 20 ) ; bigInteger1 = bigInteger1 . or ( java . math . BigInteger . valueOf ( 24 ) ) ; "<AssertPlaceHolder>" ; equal ( combinedPositionCalculator . calculateDimensionPosition ( subdimensionNumber , bigInteger . toByteArray ( ) ) , dimensionPosition ) ; dimensionPosition [ 0 ] = 64 ; dimensionPosition [ 1 ] = 512 ; dimensionPosition [ 2 ] = ( 1024 * 16 ) | ( 1024 * 8 ) ; dimensionPosition [ 3 ] = 1000324 ; dimensionPosition [ 4 ] = 2030024 ; bigInteger = combinedPositionCalculator . calculateCombinedPosition ( subdimensionNumber , dimensionPosition ) ; equal ( combinedPositionCalculator . calculateDimensionPosition ( subdimensionNumber , bigInteger . toByteArray ( ) ) , dimensionPosition ) ; } valueOf ( org . eclipse . birt . report . data . oda . jdbc . ui . model . FilterConfig . Type ) { assert type != null ; switch ( type ) { case PROCEDURE : return org . eclipse . birt . report . data . oda . jdbc . ui . model . TableType . PROCEDURE ; case TABLE : return org . eclipse . birt . report . data . oda . jdbc . ui . model . TableType . TABLE ; case VIEW : return org . eclipse . birt . report . data . oda . jdbc . ui . model . TableType . VIEW ; case ALL : return org . eclipse . birt . report . data . oda . jdbc . ui . model . TableType . ALL ; default : assert false ; return org . eclipse . birt . report . data . oda . jdbc . ui . model . TableType . ALL ; } }
org . junit . Assert . assertEquals ( bigInteger , bigInteger1 )
testBenchmarksFromFiles ( ) { java . lang . String path = "../examples/" ; java . util . List < java . lang . String > examples = new java . util . ArrayList < java . lang . String > ( ) ; examples . add ( "mamdani/AllTerms" ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 3 ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 1 ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 5 ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 5 ) ; examples . add ( "../examples/" 9 ) ; examples . add ( "../examples/" 4 ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 7 ) ; examples . add ( "mamdani/matlab/tipper1" ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 2 ) ; examples . add ( "../examples/" 8 ) ; examples . add ( "takagi-sugeno/approximation" ) ; examples . add ( "takagi-sugeno/SimpleDimmer" ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" ) ; examples . add ( "takagi-sugeno/matlab/invkine1" ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 3 ) ; examples . add ( "takagi-sugeno/matlab/juggler" ) ; examples . add ( "../examples/" 0 ) ; examples . add ( "../examples/" 1 ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 0 ) ; examples . add ( "takagi-sugeno/matlab/slcp" ) ; examples . add ( "../examples/" 7 ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 4 ) ; examples . add ( "takagi-sugeno/matlab/sltbu_fl" ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 6 ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 8 ) ; examples . add ( "../examples/" 2 ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 0 ) ; examples . add ( "takagi-sugeno/matlab/invkine1" 8 ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 1 ) ; examples . add ( "../examples/" 6 ) ; examples . add ( "takagi-sugeno/matlab/fpeaks" 7 ) ; java . lang . StringBuilder writer = new java . lang . StringBuilder ( ) ; int [ ] errors = new int [ examples . size ( ) ] ; for ( int i = 0 ; i < ( examples . size ( ) ) ; ++ i ) { java . lang . String example = examples . get ( i ) ; com . fuzzylite . FuzzyLite . logger ( ) . log ( Level . INFO , "takagi-sugeno/matlab/invkine1" 9 , new java . lang . Object [ ] { i + 1 , examples . size ( ) , example } ) ; com . fuzzylite . Engine engine = new com . fuzzylite . imex . FllImporter ( ) . fromFile ( new java . io . File ( path , ( example + "takagi-sugeno/matlab/fpeaks" 6 ) ) ) ; com . fuzzylite . Benchmark benchmark = new com . fuzzylite . Benchmark ( example , engine , com . fuzzylite . FuzzyLite . getMachEps ( ) ) ; benchmark . prepare ( new java . io . FileReader ( new java . io . File ( path , ( example + "takagi-sugeno/matlab/invkine1" 4 ) ) ) , 1024 ) ; benchmark . run ( 1 ) ; if ( i == 0 ) { writer . append ( "takagi-sugeno/matlab/invkine1" 2 ) . append ( benchmark . format ( benchmark . results ( ) , Benchmark . TableShape . Horizontal , Benchmark . TableContents . HeaderAndBody ) ) . append ( "takagi-sugeno/matlab/invkine1" 2 ) ; } else { writer . append ( benchmark . format ( benchmark . results ( ) , Benchmark . TableShape . Horizontal , Benchmark . TableContents . Body ) ) . append ( "takagi-sugeno/matlab/invkine1" 2 ) ; } errors [ i ] = benchmark . accuracyErrors ( ) ; } com . fuzzylite . FuzzyLite . logger ( ) . info ( writer . toString ( ) ) ; for ( int i = 0 ; i < ( examples . size ( ) ) ; ++ i ) { "<AssertPlaceHolder>" ; } } get ( int ) { return this . xy . get ( index ) ; }
org . junit . Assert . assertThat ( ( ( "../examples/" 5 + ( examples . get ( i ) ) ) + "../examples/" 3 ) , errors [ i ] , org . hamcrest . CoreMatchers . is ( 0 ) )
testCreatesDispatcherAsSingleton ( ) { com . eclipsesource . tabris . tracking . internal . EventDispatcher dispatcher1 = com . eclipsesource . tabris . tracking . internal . EventDispatcherProvider . getDispatcher ( ) ; com . eclipsesource . tabris . tracking . internal . EventDispatcher dispatcher2 = com . eclipsesource . tabris . tracking . internal . EventDispatcherProvider . getDispatcher ( ) ; "<AssertPlaceHolder>" ; } getDispatcher ( ) { if ( ( com . eclipsesource . tabris . tracking . internal . EventDispatcherProvider . dispatcher ) == null ) { com . eclipsesource . tabris . tracking . internal . EventDispatcherProvider . dispatcher = new com . eclipsesource . tabris . tracking . internal . EventDispatcher ( ) ; } return com . eclipsesource . tabris . tracking . internal . EventDispatcherProvider . dispatcher ; }
org . junit . Assert . assertSame ( dispatcher1 , dispatcher2 )
testSamplerAggregation ( ) { com . liferay . portal . search . aggregation . bucket . SamplerAggregation samplerAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . sampler ( "name" ) ; "<AssertPlaceHolder>" ; } sampler ( java . lang . String ) { return new com . liferay . portal . search . internal . aggregation . bucket . SamplerAggregationImpl ( name ) ; }
org . junit . Assert . assertNotNull ( samplerAggregation )
testGetHeaderTooltip_Initial ( ) { "<AssertPlaceHolder>" ; } getHeaderTooltip ( ) { checkWidget ( ) ; return headerTooltip ; }
org . junit . Assert . assertNull ( column . getHeaderTooltip ( ) )
testEncryptUsernameToken ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; inProperties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; java . util . Properties cryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "insecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; inProperties . setDecryptionCryptoProperties ( cryptoProperties ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inhandler ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( WSSConstants . USERNAMETOKEN ) ; actions . add ( XMLSecurityConstants . ENCRYPT ) ; properties . setActions ( actions ) ; properties . addEncryptionPart ( new org . apache . xml . security . stax . ext . SecurePart ( new javax . xml . namespace . QName ( org . apache . wss4j . stax . ext . WSSConstants . NS_WSSE10 , "UsernameToken" ) , SecurePart . Modifier . Element ) ) ; properties . setEncryptionUser ( "myalias" ) ; properties . setTokenUser ( "username" ) ; properties . setEncryptionSymAlgorithm ( XMLSecurityConstants . NS_XENC_AES128 ) ; java . util . Properties outCryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "outsecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; properties . setEncryptionCryptoProperties ( outCryptoProperties ) ; properties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
testNameNodeAdded ( ) { final org . apache . oozie . fluentjob . api . action . SparkActionBuilder builder = getBuilderInstance ( ) ; builder . withNameNode ( org . apache . oozie . fluentjob . api . action . TestSparkActionBuilder . NAME_NODE ) ; final org . apache . oozie . fluentjob . api . action . SparkAction action = builder . build ( ) ; "<AssertPlaceHolder>" ; } getNameNode ( ) { return attributes . getNameNode ( ) ; }
org . junit . Assert . assertEquals ( org . apache . oozie . fluentjob . api . action . TestSparkActionBuilder . NAME_NODE , action . getNameNode ( ) )
testParseActionTypeErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "aaa" , "bbb" ) ; put ( "ccc" , "ddd" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . FlowActionOutputQuery ( params ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odenos . core . component . network . BasicQuery . checkMapExactly ( this . actions , new java . lang . String [ ] { } ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) )
validationOfUnknownPropertyDefaultNamespaceSuccess ( ) { java . lang . String roomWithValidNamespaces = "<?xml<sp>version='1.0'<sp>encoding='UTF-8'?>" + ( ( ( ( ( ( ( ( ( ( ( ( "Rooms" 0 http : org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer ( ) . getEntitySet ( "Rooms" ) ; java . io . InputStream reqContent = createContentAsStream ( roomWithValidNamespaces ) ; org . apache . olingo . odata2 . client . api . ep . EntityStream stream = new org . apache . olingo . odata2 . client . api . ep . EntityStream ( ) ; stream . setContent ( reqContent ) ; stream . setReadProperties ( org . apache . olingo . odata2 . client . api . ep . DeserializerProperties . init ( ) . build ( ) ) ; org . apache . olingo . odata2 . client . core . ep . deserializer . XmlEntityDeserializer xec = new org . apache . olingo . odata2 . client . core . ep . deserializer . XmlEntityDeserializer ( ) ; org . apache . olingo . odata2 . api . ep . entry . ODataEntry result = xec . readEntry ( entitySet , stream ) ; "<AssertPlaceHolder>" ; } readEntry ( org . apache . olingo . odata2 . api . edm . EdmEntitySet , org . apache . olingo . odata2 . client . api . ep . EntityStream ) { return new org . apache . olingo . odata2 . client . core . ep . deserializer . JsonEntityDeserializer ( ) . readEntry ( entitySet , content ) ; }
org . junit . Assert . assertNotNull ( result )
testUnit ( ) { System . out . println ( "Testing<sp>unit<sp>1" ) ; java . lang . String expResult = "0.1<sp>km/h" ; java . lang . String result = com . github . kayak . core . description . SignalDescriptionTest . data . getUnit ( ) ; "<AssertPlaceHolder>" ; } getUnit ( ) { return unit ; }
org . junit . Assert . assertEquals ( expResult , result )
testStructSizes ( ) { if ( ! ( BridJ . Switch . StructsByValue . enabled ) ) return ; org . bridj . StructIO io = org . bridj . StructIO . getInstance ( org . bridj . StructByValueTest . SimpleStruct . class ) ; org . bridj . Pointer < org . bridj . dyncall . DyncallLibrary . DCstruct > struct = org . bridj . DyncallStructs . buildDCstruct ( io . desc ) ; "<AssertPlaceHolder>" ; } buildDCstruct ( org . bridj . StructDescription ) { if ( ! ( BridJ . Switch . StructsByValue . enabled ) ) { return null ; } java . util . List < org . bridj . StructFieldDescription > aggregatedFields = desc . getAggregatedFields ( ) ; @ org . bridj . SuppressWarnings ( "deprecation" ) org . bridj . Pointer < org . bridj . dyncall . DyncallLibrary . DCstruct > struct = dcNewStruct ( aggregatedFields . size ( ) , org . bridj . DyncallStructs . toDCAlignment ( desc . getStructAlignment ( ) ) ) . withReleaser ( new org . bridj . Pointer . Releaser ( ) { public void release ( org . bridj . Pointer < ? > p ) { dcFreeStruct ( p . as ( org . bridj . dyncall . DyncallLibrary . DCstruct . class ) ) ; } } ) ; org . bridj . DyncallStructs . fillDCstruct ( desc . structType , struct , aggregatedFields ) ; dcCloseStruct ( struct ) ; long expectedSize = desc . getStructSize ( ) ; long size = dcStructSize ( struct ) ; if ( expectedSize != size ) { org . bridj . BridJ . error ( ( ( ( ( ( ( "Struct<sp>size<sp>computed<sp>for<sp>" + ( org . bridj . util . Utils . toString ( desc . structType ) ) ) + "<sp>by<sp>BridJ<sp>(" ) + expectedSize ) + "<sp>bytes)<sp>and<sp>dyncall<sp>(" ) + size ) + "<sp>bytes)<sp>differ<sp>!" ) ) ; return null ; } return struct ; }
org . junit . Assert . assertNotNull ( struct )
testSequentialMeansPlaceholder ( ) { org . nd4j . OpValidationSuite . ignoreFailing ( ) ; for ( int dim0 : new int [ ] { 10 , - 1 } ) { java . lang . String msg = "Dimension<sp>0<sp>=<sp>" + dim0 ; System . out . println ( msg ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable in = sd . var ( "in" , new long [ ] { dim0 , 9 , 8 } ) ; org . nd4j . autodiff . samediff . SDVariable mean1 = sd . mean ( in , 2 ) ; org . nd4j . autodiff . samediff . SDVariable mean2 = sd . mean ( mean1 , 1 ) ; org . nd4j . linalg . api . ndarray . INDArray inArr = org . nd4j . linalg . factory . Nd4j . create ( 10 , 9 , 8 ) ; sd . associateArrayWithVariable ( inArr , in ) ; org . nd4j . linalg . api . ndarray . INDArray out = sd . execAndEndResult ( ) ; long [ ] shape = out . shape ( ) ; "<AssertPlaceHolder>" ; } } shape ( ) { return sameDiff . shape ( this ) ; }
org . junit . Assert . assertArrayEquals ( msg , new long [ ] { 10 } , shape )
testGetStagingBucketName_OneFolder ( ) { java . lang . String expectedBucketName = "test" ; org . powermock . api . mockito . PowerMockito . doReturn ( "/test" ) . when ( jobExecutor , "getS3FileObjectPath" ) ; java . lang . String bucketName = jobExecutor . getStagingBucketName ( ) ; "<AssertPlaceHolder>" ; } getStagingBucketName ( ) { java . lang . String bucketName = "" ; java . lang . String pathToStagingDir = getS3FileObjectPath ( ) ; bucketName = pathToStagingDir . substring ( 1 , pathToStagingDir . length ( ) ) . split ( "/" ) [ 0 ] ; return bucketName ; }
org . junit . Assert . assertEquals ( expectedBucketName , bucketName )
testOrOnEmptyOptionalAndEmptySupplierOptional ( ) { final com . annimon . stream . Optional < java . lang . Integer > optional = com . annimon . stream . Optional . < java . lang . Integer > empty ( ) . or ( new com . annimon . stream . function . Supplier < com . annimon . stream . Optional < java . lang . Integer > > ( ) { @ com . annimon . stream . Override public com . annimon . stream . Optional < java . lang . Integer > get ( ) { return com . annimon . stream . Optional . empty ( ) ; } } ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return new com . annimon . stream . test . hamcrest . OptionalIntMatcher . IsEmptyMatcher ( ) ; }
org . junit . Assert . assertThat ( optional , isEmpty ( ) )
testIndexOutOfBoundsException ( ) { com . ibm . ws . logging . internal . impl . CountingOutputStream out = new com . ibm . ws . logging . internal . impl . CountingOutputStream ( new java . io . ByteArrayOutputStream ( ) ) ; try { out . write ( new byte [ 0 ] , 0 , ( - 1 ) ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { } "<AssertPlaceHolder>" ; } count ( ) { return counter . get ( ) ; }
org . junit . Assert . assertEquals ( 0 , out . count ( ) )
ResolverShouldHaveCorrectAuthority ( ) { com . salesforce . grpc . contrib . NameResolverProvider provider = com . salesforce . grpc . contrib . StaticResolver . provider ( staticAddress ) ; com . salesforce . grpc . contrib . NameResolver resolver = provider . newNameResolver ( java . net . URI . create ( "mesh://some.service" ) , Attributes . EMPTY ) ; "<AssertPlaceHolder>" . isEqualTo ( "some.service" ) ; } getServiceAuthority ( ) { return authority ; }
org . junit . Assert . assertThat ( resolver . getServiceAuthority ( ) )
testGetContentWithoutContent ( ) { com . documentum . fc . client . IDfSession session = getRepository ( ) . getSessionForOperator ( getRepository ( ) . getRepositoryName ( ) ) ; try { final java . lang . String expectedName = "_#_" + ( name . getMethodName ( ) ) ; final com . documentum . fc . client . IDfSysObject dmDocument = createObject ( session , "dm_document" , expectedName ) ; dmDocument . setString ( "subject" , "test<sp>purpose" ) ; dmDocument . setString ( "a_status" , "draft" ) ; dmDocument . save ( ) ; java . lang . String docId = dmDocument . getObjectId ( ) . toString ( ) ; final org . pockito . xcp . test . domain . Document document = org . pockito . xcp . entitymanager . XcpEntityManagerTest . em . find ( org . pockito . xcp . test . domain . Document . class , docId ) ; "<AssertPlaceHolder>" ; java . io . File tempFile = java . io . File . createTempFile ( "temp" , java . lang . Long . toString ( java . lang . System . nanoTime ( ) ) ) ; tempFile . deleteOnExit ( ) ; org . pockito . xcp . entitymanager . XcpEntityManagerTest . em . getAttachment ( document , tempFile . getParent ( ) , tempFile . getName ( ) , "text" ) ; } finally { getRepository ( ) . releaseSession ( session ) ; } } find ( java . lang . Class , java . lang . Object ) { checkNotNull ( primaryKey ) ; @ org . pockito . xcp . entitymanager . SuppressWarnings ( "unchecked" ) T bean = ( ( T ) ( cacheGet ( cacheGetKey ( entityClass , primaryKey . toString ( ) ) ) ) ) ; if ( bean != null ) { return bean ; } org . pockito . xcp . entitymanager . AnnotationInfo ai = getAnnotationInfo ( entityClass ) ; return doFind ( entityClass , ai , primaryKey ) ; }
org . junit . Assert . assertNotNull ( document )
deveObterDataUltimaModificacaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; final java . time . LocalDate dataUltimaModificacaoSituacaoCadastral = java . time . LocalDate . from ( java . time . format . DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) . parse ( "20/10/2010" ) ) ; retorno . setDataUltimaModificacaoSituacaoCadastral ( dataUltimaModificacaoSituacaoCadastral ) ; "<AssertPlaceHolder>" ; } getDataUltimaModificacaoSituacaoCadastral ( ) { return this . dataUltimaModificacaoSituacaoCadastral ; }
org . junit . Assert . assertEquals ( dataUltimaModificacaoSituacaoCadastral , retorno . getDataUltimaModificacaoSituacaoCadastral ( ) )
testTranslateContextKnownTypeVeryPositive ( ) { int context = 2 ; java . lang . String result = org . goodoldai . jeff . report . xml . XMLChunkUtility . translateContext ( context , textEchunk1 ) ; java . lang . String expResult = "VERY_POSITIVE" . toLowerCase ( ) ; "<AssertPlaceHolder>" ; } translateContext ( int , org . goodoldai . jeff . explanation . ExplanationChunk ) { java . lang . Class cl = echunk . getClass ( ) ; java . lang . reflect . Field [ ] fields = cl . getFields ( ) ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { try { java . lang . reflect . Field field = fields [ i ] ; if ( ( field . getInt ( field . getName ( ) ) ) == context ) { return field . getName ( ) . toLowerCase ( ) ; } } catch ( java . lang . IllegalArgumentException ex ) { throw new org . goodoldai . jeff . explanation . ExplanationException ( ex . getMessage ( ) ) ; } catch ( java . lang . IllegalAccessException ex ) { throw new org . goodoldai . jeff . explanation . ExplanationException ( ex . getMessage ( ) ) ; } } return java . lang . String . valueOf ( context ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testParse7 ( ) { java . lang . String input = "<sp>" ; long [ ] result = org . drools . core . base . evaluators . TimeIntervalParser . parse ( input ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( ( paramText == null ) || ( ( paramText . trim ( ) . length ( ) ) == 0 ) ) { return new long [ 0 ] ; } java . lang . String [ ] params = paramText . split ( "," ) ; long [ ] result = new long [ params . length ] ; for ( int i = 0 ; i < ( params . length ) ; i ++ ) { result [ i ] = org . drools . core . base . evaluators . TimeIntervalParser . parseSingle ( params [ i ] ) ; } return result ; }
org . junit . Assert . assertEquals ( 0 , result . length )
shouldExistsById ( ) { repository . save ( person ) ; "<AssertPlaceHolder>" ; } exists ( T extends com . github . jloisel . reactive . entity . api . ReactiveEntity ) { return exists ( entity . getId ( ) ) ; }
org . junit . Assert . assertTrue ( repository . exists ( person . getId ( ) ) )
testSendRawMessage_noOutbound ( ) { com . streamreduce . core . model . Connection connection = org . mockito . Mockito . mock ( com . streamreduce . core . model . Connection . class ) ; com . streamreduce . core . model . Account account = org . mockito . Mockito . mock ( com . streamreduce . core . model . Account . class ) ; org . mockito . Mockito . when ( connection . getAccount ( ) ) . thenReturn ( account ) ; java . util . HashSet < com . streamreduce . core . model . OutboundConfiguration > outboundConfigurations = com . google . common . collect . Sets . newHashSet ( org . mockito . Mockito . mock ( com . streamreduce . core . model . OutboundConfiguration . class ) ) ; org . mockito . Mockito . when ( connection . getOutboundConfigurations ( ) ) . thenReturn ( outboundConfigurations ) ; com . streamreduce . core . service . OutboundStorageServiceImpl outboundStorageService = new com . streamreduce . core . service . OutboundStorageServiceImpl ( ) ; net . sf . json . JSONObject jsonObject = new net . sf . json . JSONObject ( ) ; jsonObject . put ( "test" , "foo" ) ; "<AssertPlaceHolder>" ; } sendRawMessage ( net . sf . json . JSONObject , com . streamreduce . core . model . Connection ) { if ( ( org . apache . commons . collections . MapUtils . isEmpty ( jsonObject ) ) || ( org . springframework . util . CollectionUtils . isEmpty ( connection . getOutboundConfigurations ( ) ) ) ) { return 0 ; } int numberOfMessagesRoutedOutbound = 0 ; for ( com . streamreduce . core . model . OutboundConfiguration outboundConfiguration : connection . getOutboundConfigurations ( ) ) { if ( outboundConfiguration . getDataTypes ( ) . contains ( OutboundDataType . RAW ) ) { try { routePayloadOutbound ( outboundConfiguration , jsonObject . toString ( ) , OutboundDataType . RAW ) ; numberOfMessagesRoutedOutbound ++ ; } catch ( java . lang . Exception e ) { logger . error ( "Unable<sp>to<sp>route<sp>message<sp>outbound" , e ) ; } } } return numberOfMessagesRoutedOutbound ; }
org . junit . Assert . assertEquals ( 0 , outboundStorageService . sendRawMessage ( jsonObject , connection ) )
pi ( ) { org . arend . core . context . param . SingleDependentLink x = singleParam ( "x" , Nat ( ) ) ; org . arend . core . context . param . SingleDependentLink y = singleParam ( "y" , Nat ( ) ) ; org . arend . core . context . param . SingleDependentLink xy = singleParam ( true , vars ( "x" , "y" ) , Nat ( ) ) ; org . arend . core . context . param . SingleDependentLink _Impl = singleParam ( false , java . util . Collections . singletonList ( null ) , Nat ( ) ) ; org . arend . core . context . binding . Binding A = new org . arend . core . context . binding . TypedBinding ( "A" , Pi ( Nat ( ) , Pi ( Nat ( ) , Universe ( 0 ) ) ) ) ; org . arend . core . expr . Expression expr1 = Pi ( xy , Pi ( _Impl , Apps ( Ref ( A ) , Ref ( xy ) , Ref ( xy . getNext ( ) ) ) ) ) ; org . arend . core . expr . Expression expr2 = Pi ( x , Pi ( y , Pi ( _Impl , Apps ( Ref ( A ) , Ref ( x ) , Ref ( y ) ) ) ) ) ; "<AssertPlaceHolder>" ; } Ref ( org . arend . core . context . binding . Binding ) { return new org . arend . ReferenceExpression ( binding ) ; }
org . junit . Assert . assertEquals ( expr1 , expr2 )
testUpdateCalendarField_Null ( ) { com . jmethods . catatumbo . entities . CalendarField entity = new com . jmethods . catatumbo . entities . CalendarField ( ) ; java . util . Calendar now = java . util . Calendar . getInstance ( ) ; entity . setCreationDate ( now ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; entity . setCreationDate ( null ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . update ( entity ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . load ( com . jmethods . catatumbo . entities . CalendarField . class , entity . getId ( ) ) ; "<AssertPlaceHolder>" ; } getCreationDate ( ) { return creationDate ; }
org . junit . Assert . assertTrue ( ( ( entity . getCreationDate ( ) ) == null ) )
testOverwriteEntry ( ) { com . google . code . siren4j . converter . ResourceRegistry registry = com . google . code . siren4j . converter . ResourceRegistryImpl . newInstance ( "com.google.code.siren4j" ) ; registry . putEntry ( "course" , com . google . code . siren4j . component . testpojos . Author . class , true ) ; java . lang . Class < ? > result = registry . getClassByEntityName ( "course" ) ; "<AssertPlaceHolder>" ; } getClassByEntityName ( java . lang . String ) { if ( org . apache . commons . lang3 . StringUtils . isBlank ( name ) ) { throw new java . lang . IllegalArgumentException ( "name<sp>cannot<sp>be<sp>null<sp>or<sp>empty." ) ; } return entries . get ( name ) ; }
org . junit . Assert . assertEquals ( com . google . code . siren4j . component . testpojos . Author . class , result )
testTransactionStatement ( ) { java . lang . String script = "transaction<sp>{}" ; cfml . parsing . cfscript . script . CFScriptStatement scriptStatement = null ; scriptStatement = parseScript ( script ) ; if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } getMessages ( ) { return messages ; }
org . junit . Assert . assertNotNull ( scriptStatement )
testDoesLspDbMatchPositive ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . pcep . types . rev181109 . open . object . open . Tlvs tlvs = org . opendaylight . bgpcep . pcep . topology . provider . SyncOptimizationTest . createTlvs ( 1L , false , false ) ; org . mockito . Mockito . doReturn ( tlvs ) . when ( this . pcepSession ) . getLocalTlvs ( ) ; org . mockito . Mockito . doReturn ( tlvs ) . when ( this . pcepSession ) . getRemoteTlvs ( ) ; final org . opendaylight . bgpcep . pcep . topology . provider . SyncOptimization syncOpt = new org . opendaylight . bgpcep . pcep . topology . provider . SyncOptimization ( this . pcepSession ) ; "<AssertPlaceHolder>" ; } doesLspDbMatch ( ) { return this . dbVersionMatch ; }
org . junit . Assert . assertTrue ( syncOpt . doesLspDbMatch ( ) )
metadata_xmlAssociationEndMultiplicityfalse ( ) { final java . lang . String entryName = "bar/90_contents/odatacol1/00_$metadata.xml" ; final java . lang . String filename = "/00_$metadata_associaton_multi_attr_notexist.xml" ; java . net . URL fileUrl = java . lang . ClassLoader . getSystemResource ( ( ( com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . RESOURCE_PATH ) + filename ) ) ; java . io . File file = new java . io . File ( fileUrl . getPath ( ) ) ; java . io . FileInputStream fis = null ; try { fis = new java . io . FileInputStream ( file ) ; com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner testBarRunner = new com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner ( ) ; boolean res = testBarRunner . registUserSchema ( entryName , fis , null ) ; "<AssertPlaceHolder>" ; return ; } catch ( com . fujitsu . dc . core . DcCoreException dce ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } catch ( java . lang . Exception ex ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } org . junit . Assert . fail ( "DcCoreException" ) ; } registUserSchema ( java . lang . String , java . io . InputStream , com . fujitsu . dc . core . model . DavCmp ) { org . odata4j . edm . EdmDataServices metadata = null ; try { java . io . InputStreamReader isr = new java . io . InputStreamReader ( new org . apache . commons . io . input . CloseShieldInputStream ( inputStream ) ) ; org . odata4j . stax2 . XMLFactoryProvider2 provider = org . odata4j . stax2 . staximpl . StaxXMLFactoryProvider2 . getInstance ( ) ; org . odata4j . stax2 . XMLInputFactory2 factory = provider . newXMLInputFactory2 ( ) ; org . odata4j . stax2 . XMLEventReader2 reader = factory . createXMLEventReader ( isr ) ; com . fujitsu . dc . core . odata . DcEdmxFormatParser parser = new com . fujitsu . dc . core . odata . DcEdmxFormatParser ( ) ; metadata = parser . parseMetadata ( reader ) ; } catch ( java . lang . Exception ex ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "XMLParseException:<sp>" + ( ex . getMessage ( ) ) ) , ex . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } catch ( java . lang . StackOverflowError tw ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "XMLParseException:<sp>" + ( tw . getMessage ( ) ) ) , tw . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } try { createComplexTypes ( metadata , davCmp ) ; createEntityTypes ( metadata , davCmp ) ; createAssociations ( metadata , davCmp ) ; } catch ( com . fujitsu . dc . core . DcCoreException e ) { writeOutputStream ( true , "PL-BI-1004" , entryName , e . getMessage ( ) ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "DcCoreException:<sp>" + ( e . getMessage ( ) ) ) ) ; return false ; } catch ( java . lang . Exception e ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "Regist<sp>Entity<sp>Error:<sp>" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2003" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } return true ; }
org . junit . Assert . assertFalse ( res )
testNewAdductFormula_IMolecularFormula ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IAdductFormula af = builder . newInstance ( org . openscience . cdk . interfaces . IAdductFormula . class , builder . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class , java . lang . Object [ ] ) { return factory . ofClass ( clazz , params ) ; }
org . junit . Assert . assertNotNull ( af )
testDestroyTaskNotFound ( ) { mockMvc . perform ( delete ( "/tasks/definitions/myTask" ) . accept ( MediaType . APPLICATION_JSON ) ) . andDo ( print ( ) ) . andExpect ( status ( ) . isNotFound ( ) ) ; "<AssertPlaceHolder>" ; } status ( ) { java . lang . String uriTemplate = appStatusesUriTemplate . expand ( ) . getHref ( ) ; uriTemplate = uriTemplate + "?size=2000" ; return restTemplate . getForObject ( uriTemplate , AppStatusResource . Page . class ) ; }
org . junit . Assert . assertEquals ( 0 , repository . count ( ) )
escapeJSON_2 ( ) { java . lang . String input = "\\" ; java . lang . String escaped = org . oscm . json . EscapeUtils . escapeJSON ( input ) ; "<AssertPlaceHolder>" ; } escapeJSON ( java . lang . String ) { if ( aText == null ) { return null ; } final java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; java . text . StringCharacterIterator iterator = new java . text . StringCharacterIterator ( aText ) ; char character = iterator . current ( ) ; while ( character != ( java . text . StringCharacterIterator . DONE ) ) { if ( character == '\"' ) { result . append ( "\\\"" ) ; } else if ( character == '\\' ) { result . append ( "\\\\" ) ; } else if ( character == '/' ) { result . append ( "\\/" ) ; } else if ( character == '\b' ) { result . append ( "\\b" ) ; } else if ( character == '\f' ) { result . append ( "\\f" ) ; } else if ( character == '\n' ) { result . append ( "\\n" ) ; } else if ( character == '\r' ) { result . append ( "\\r" ) ; } else if ( character == '\t' ) { result . append ( "\\t" ) ; } else { result . append ( character ) ; } character = iterator . next ( ) ; } return result . toString ( ) ; }
org . junit . Assert . assertEquals ( "\\\\" , escaped )
testRoundPriceUseTicksizeScale ( ) { double value = 16.778 ; java . math . BigDecimal price = new java . math . BigDecimal ( value ) . setScale ( 3 , RoundingMode . HALF_UP ) ; java . math . BigDecimal scale = new java . math . BigDecimal ( "0.01" ) . setScale ( 2 , RoundingMode . HALF_UP ) ; java . math . BigDecimal actual = com . sumzerotrading . util . QuoteUtil . roundPrice ( price , scale ) ; java . math . BigDecimal expected = new java . math . BigDecimal ( 16.78 ) . setScale ( 2 , RoundingMode . HALF_UP ) ; "<AssertPlaceHolder>" ; } roundPrice ( java . math . BigDecimal , java . math . BigDecimal ) { return com . sumzerotrading . util . QuoteUtil . roundPrice ( price , ticksize , ticksize . scale ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testUsingANotCompleteQueue ( ) { net . openhft . chronicle . bytes . ref . BinaryLongReference . startCollecting ( ) ; java . io . File tmpDir = net . openhft . chronicle . queue . impl . single . DirectoryUtils . tempDir ( "testUsingANotCompleteQueue" ) ; try { try ( final net . openhft . chronicle . queue . impl . single . ChronicleQueue queue = net . openhft . chronicle . queue . impl . single . SingleChronicleQueueBuilder . binary ( tmpDir ) . testBlockSize ( ) . rollCycle ( RollCycles . TEST_DAILY ) . build ( ) ) { net . openhft . chronicle . queue . impl . single . ExcerptAppender appender = queue . acquireAppender ( ) ; try ( net . openhft . chronicle . wire . DocumentContext dc = appender . writingDocument ( ) ) { dc . wire ( ) . write ( "some" ) . text ( "data" ) ; } java . lang . Thread . sleep ( 100 ) ; net . openhft . chronicle . bytes . ref . BinaryLongReference . forceAllToNotCompleteState ( ) ; } try ( final net . openhft . chronicle . queue . impl . single . ChronicleQueue queue = net . openhft . chronicle . queue . impl . single . SingleChronicleQueueBuilder . binary ( tmpDir ) . testBlockSize ( ) . timeoutMS ( 500 ) . build ( ) ) { net . openhft . chronicle . queue . impl . single . ExcerptTailer tailer = queue . createTailer ( ) ; try ( net . openhft . chronicle . wire . DocumentContext dc = tailer . readingDocument ( ) ) { "<AssertPlaceHolder>" ; } } } finally { net . openhft . chronicle . core . io . IOTools . deleteDirWithFiles ( tmpDir , 20 ) ; } } wire ( ) { return wire ; }
org . junit . Assert . assertEquals ( "data" , dc . wire ( ) . read ( ( ) -> "some" ) . text ( ) )
evaluate ( ) { org . jpmml . evaluator . ModelEvaluator < ? > evaluator = createModelEvaluator ( ) ; checkTargetFields ( java . util . Collections . singletonList ( null ) , evaluator ) ; java . util . Map < org . dmg . pmml . FieldName , ? > arguments = createArguments ( "input" , 1.0 ) ; java . util . Map < org . dmg . pmml . FieldName , ? > results = evaluator . evaluate ( arguments ) ; org . jpmml . evaluator . clustering . ClusterAffinityDistribution < ? > affinityDistribution = ( ( org . jpmml . evaluator . clustering . ClusterAffinityDistribution < ? > ) ( results . get ( evaluator . getTargetName ( ) ) ) ) ; "<AssertPlaceHolder>" ; org . jpmml . evaluator . clustering . RankingTest . checkValue ( "2" , 1.0 , results , "first" ) ; org . jpmml . evaluator . clustering . RankingTest . checkValue ( "3" , 4.0 , results , "second" ) ; org . jpmml . evaluator . clustering . RankingTest . checkValue ( "1" , 16.0 , results , "third" ) ; } getResult ( ) { if ( ( this . result ) == null ) { throw new org . jpmml . evaluator . EvaluationException ( "Regression<sp>result<sp>has<sp>not<sp>been<sp>computed" ) ; } return this . result ; }
org . junit . Assert . assertEquals ( "2" , affinityDistribution . getResult ( ) )
testCreateReasonForReferralSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . ihe . ReasonForReferralSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . ihe . builder . IHEBuilderFactory . createReasonForReferralSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . ihe . ReasonForReferralSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; Diagnostician . INSTANCE . validate ( section ) ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . saveSnippet ( section , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
testFormatOffset ( long , int , java . lang . String ) { java . lang . StringBuilder b = new java . lang . StringBuilder ( ) ; net . sf . extjwnl . princeton . file . PrincetonRandomAccessDictionaryFile . formatOffset ( i , l , b ) ; "<AssertPlaceHolder>" ; } toString ( ) { return net . sf . extjwnl . util . ResourceBundleSet . insertParams ( "[Word:<sp>{0}<sp>[Lemma:<sp>{1}]<sp>{2}<sp>[Index:<sp>{3}]<sp>VerbFrames:<sp>{4}]" , new java . lang . Object [ ] { getPOS ( ) , getLemma ( ) , getSynset ( ) , getIndex ( ) , getVerbFramesAsString ( ) } ) ; }
org . junit . Assert . assertEquals ( s , b . toString ( ) )
validateObjectFailures ( ) { doThrow ( new fm . last . moji . tracker . TrackerException ( ) ) . when ( mockBorrowedTracker ) . noop ( ) ; boolean isValid = factory . validateObject ( mockManagedHost , mockBorrowedTracker ) ; "<AssertPlaceHolder>" ; } validateObject ( fm . last . moji . tracker . pool . ManagedTrackerHost , fm . last . moji . tracker . pool . BorrowedTracker ) { fm . last . moji . tracker . pool . BorrowedTracker borrowed = value ; fm . last . moji . tracker . pool . BorrowedTrackerObjectPoolFactory . log . debug ( "Validating<sp>{}" , borrowed ) ; try { borrowed . noop ( ) ; } catch ( fm . last . moji . tracker . TrackerException e ) { return false ; } return true ; }
org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( false ) )
testNumDimensions ( ) { setUp ( ) ; "<AssertPlaceHolder>" ; } getNumDimensions ( ) { return this . dims . length ; }
org . junit . Assert . assertEquals ( 4 , table . getNumDimensions ( ) )
compare ( ) { for ( com . dslplatform . json . DslJson < java . lang . Object > dslJson : dslJsons ) { com . dslplatform . json . TypesTest . All a = new com . dslplatform . json . TypesTest . All ( ) ; a . b = true ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ; dslJson . serialize ( a , os ) ; com . dslplatform . json . TypesTest . All res = dslJson . deserialize ( com . dslplatform . json . TypesTest . All . class , os . toByteArray ( ) , os . size ( ) ) ; "<AssertPlaceHolder>" ; } } size ( ) { return position ; }
org . junit . Assert . assertEquals ( a . b , res . b )
mapAccessExpr3 ( ) { final org . drools . modelcompiler . builder . generator . TypedExpression expected = typedResult ( "$p.getItems().get(1)" , org . drools . modelcompiler . builder . generator . Integer . class , "$p.items[1]" ) ; final org . drools . modelcompiler . builder . generator . TypedExpression actual = toTypedExpression ( "$p.items[1]" , java . lang . Object . class , new org . drools . modelcompiler . builder . generator . DeclarationSpec ( "$p" , org . drools . modelcompiler . domain . Person . class ) ) ; "<AssertPlaceHolder>" ; } typedResult ( java . lang . String , java . lang . Class , java . lang . String ) { com . github . javaparser . ast . expr . Expression resultExpression = org . drools . modelcompiler . builder . generator . DrlxParseUtil . parseExpression ( expressionResult ) . getExpr ( ) ; return new org . drools . modelcompiler . builder . generator . TypedExpression ( resultExpression , classResult , fieldName ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testBasicProbabilitiesDynamicUpdate ( ) { org . evosuite . seeding . DynamicConstantVariableProbabilityPool pool = new org . evosuite . seeding . DynamicConstantVariableProbabilityPool ( ) ; for ( int i = 0 ; i < 99 ; i ++ ) { pool . add ( "Foo" ) ; } pool . add ( "Bar" ) ; int count1 = 0 ; for ( int i = 0 ; i < 100 ; i ++ ) { if ( pool . getRandomString ( ) . equals ( "Bar" ) ) count1 ++ ; } for ( int i = 0 ; i < 99 ; i ++ ) { pool . add ( "Bar" ) ; } int count2 = 0 ; for ( int i = 0 ; i < 100 ; i ++ ) { if ( pool . getRandomString ( ) . equals ( "Bar" ) ) count2 ++ ; } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return super . equals ( obj ) ; }
org . junit . Assert . assertTrue ( ( count1 < count2 ) )
testGetResultUrlwEntityId ( ) { org . sagebionetworks . client . AsynchJobType type = AsynchJobType . TableAppendRowSet ; java . lang . String actual = type . getResultUrl ( token , tableId ) ; java . lang . String expected = "/entity/0123456/table/append/async/get/abcdefgh" ; "<AssertPlaceHolder>" ; } getResultUrl ( java . lang . String , java . lang . String ) { if ( entityId != null ) { return ( ( ( "/entity/" + entityId ) + ( prefix ) ) + ( org . sagebionetworks . client . SynapseClientImpl . ASYNC_GET ) ) + token ; } return ( ( prefix ) + ( org . sagebionetworks . client . SynapseClientImpl . ASYNC_GET ) ) + token ; }
org . junit . Assert . assertEquals ( actual , expected )
testBuildEmptyParameters ( ) { org . lnu . is . domain . specoffer . SpecOffer specOffer = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; org . lnu . is . domain . wave . type . WaveType waveType = new org . lnu . is . domain . wave . type . WaveType ( ) ; java . lang . Integer licCount = 1 ; java . lang . Integer stateCount = 2 ; java . lang . Integer targetCount = 3 ; java . lang . Integer benefitCount = 4 ; java . util . Date date = new java . util . Date ( ) ; org . lnu . is . domain . specoffer . SpecOfferWave context = new org . lnu . is . domain . specoffer . SpecOfferWave ( ) ; context . setSpecOffer ( specOffer ) ; context . setWaveType ( waveType ) ; context . setLicCount ( licCount ) ; context . setStateCount ( stateCount ) ; context . setTargetCount ( targetCount ) ; context . setBenefitCount ( benefitCount ) ; context . setBeginDate ( date ) ; context . setEndDate ( date ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOfferWave<sp>e<sp>WHERE<sp>(<sp>e.specOffer<sp>=<sp>:specOffer<sp>AND<sp>e.waveType<sp>=<sp>:waveType<sp>AND<sp>e.licCount<sp>=:licCount<sp>AND<sp>e.stateCount<sp>=:stateCount<sp>AND<sp>e.benefitCount<sp>=:benefitCount<sp>AND<sp>e.targetCount<sp>=:targetCount<sp>AND<sp>e.beginDate<sp>>=:beginDate<sp>AND<sp>e.endDate<sp><=:endDate<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferWave > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testSharedSortVariables ( ) { com . epimorphics . lda . support . MultiMap < java . lang . String , java . lang . String > qp = com . epimorphics . lda . tests_support . MakeData . parseQueryString ( "" ) ; com . epimorphics . lda . bindings . Bindings bindings = com . epimorphics . lda . tests_support . MakeData . variables ( "" ) ; com . epimorphics . lda . bindings . Bindings cc = com . epimorphics . lda . bindings . Bindings . createContext ( bindings , qp ) ; com . epimorphics . lda . core . NamedViews nv = new com . epimorphics . lda . tests . FakeNamedViews ( ) ; com . epimorphics . lda . shortnames . ShortnameService sns = new com . epimorphics . lda . tests . SNS ( "p1=eh:/p1;p2=eh:/p2" ) ; com . epimorphics . lda . query . APIQuery aq = com . epimorphics . lda . query . tests . QueryTestUtils . queryFromSNS ( sns ) ; aq . setSortBy ( "p1,p1.p2" ) ; com . epimorphics . lda . query . ContextQueryUpdater cq = new com . epimorphics . lda . query . ContextQueryUpdater ( com . epimorphics . lda . query . ContextQueryUpdater . ListEndpoint , cc , nv , sns , aq ) ; cq . updateQueryAndConstructView ( aq . deferredFilters ) ; java . lang . String q = aq . assembleSelectQuery ( PrefixMapping . Factory . create ( ) ) ; com . epimorphics . lda . query . tests . List < java . lang . String > opts = new com . epimorphics . lda . query . tests . ArrayList < java . lang . String > ( ) ; com . epimorphics . lda . query . tests . List < java . lang . String > lines = com . epimorphics . lda . query . tests . Arrays . asList ( q . split ( "\n" ) ) ; for ( java . lang . String line : lines ) if ( line . startsWith ( "OPTIONAL" ) ) opts . add ( line ) ; "<AssertPlaceHolder>" ; java . lang . String A = opts . get ( 0 ) ; java . lang . String B = opts . get ( 1 ) ; java . lang . String opt0 = "OPTIONAL<sp>{<sp>?item<sp><eh:/p1><sp>?___0<sp>.<sp>}" ; java . lang . String opt1 = "OPTIONAL<sp>{<sp>?___0<sp><eh:/p2><sp>?___1<sp>.<sp>}" ; if ( ( A . equals ( opt0 ) ) && ( B . equals ( opt1 ) ) ) return ; if ( ( A . equals ( opt1 ) ) && ( B . equals ( opt0 ) ) ) return ; org . junit . Assert . fail ( "generated<sp>query<sp>does<sp>not<sp>reuse<sp>?___0" ) ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , opts . size ( ) )
removingUncommittedLabel ( ) { org . neo4j . graphdb . GraphDatabaseService beansAPI = dbRule . getGraphDatabaseAPI ( ) ; org . neo4j . graphdb . Label label = org . neo4j . graphdb . LabelsAcceptanceTest . Labels . MY_LABEL ; org . neo4j . graphdb . Node myNode ; try ( org . neo4j . graphdb . Transaction tx = beansAPI . beginTx ( ) ) { myNode = beansAPI . createNode ( ) ; myNode . addLabel ( label ) ; myNode . removeLabel ( label ) ; "<AssertPlaceHolder>" ; tx . success ( ) ; } } hasLabel ( org . neo4j . graphdb . Label ) { return false ; }
org . junit . Assert . assertFalse ( myNode . hasLabel ( label ) )
testFirstIteration ( ) { org . apache . spark . api . java . JavaSparkContext sc = getContext ( ) ; org . apache . spark . api . java . JavaRDD < java . lang . String > corpusRDD = getCorpusRDD ( sc ) ; org . apache . spark . broadcast . Broadcast < org . deeplearning4j . spark . text . Map < java . lang . String , java . lang . Object > > broadcastTokenizerVarMap = sc . broadcast ( word2vec . getTokenizerVarMap ( ) ) ; org . deeplearning4j . spark . text . functions . TextPipeline pipeline = new org . deeplearning4j . spark . text . functions . TextPipeline ( corpusRDD , broadcastTokenizerVarMap ) ; pipeline . buildVocabCache ( ) ; pipeline . buildVocabWordListRDD ( ) ; org . deeplearning4j . models . word2vec . wordstore . VocabCache < org . deeplearning4j . models . word2vec . VocabWord > vocabCache = pipeline . getVocabCache ( ) ; org . deeplearning4j . models . word2vec . VocabWord token = vocabCache . tokenFor ( "strange" ) ; org . deeplearning4j . models . word2vec . VocabWord word = vocabCache . wordFor ( "strange" ) ; org . deeplearning4j . spark . text . TextPipelineTest . log . info ( ( "Strange<sp>token:<sp>" + token ) ) ; org . deeplearning4j . spark . text . TextPipelineTest . log . info ( ( "Strange<sp>word:<sp>" + word ) ) ; org . deeplearning4j . spark . text . Map < java . lang . String , java . lang . Object > word2vecVarMap = word2vec . getWord2vecVarMap ( ) ; word2vecVarMap . put ( "totalWordCount" , pipeline . getTotalWordCount ( ) ) ; double [ ] expTable = word2vec . getExpTable ( ) ; org . apache . spark . api . java . JavaRDD < java . util . concurrent . atomic . AtomicLong > sentenceCountRDD = pipeline . getSentenceCountRDD ( ) ; org . apache . spark . api . java . JavaRDD < org . deeplearning4j . spark . text . List < org . deeplearning4j . models . word2vec . VocabWord > > vocabWordListRDD = pipeline . getVocabWordListRDD ( ) ; org . deeplearning4j . spark . text . functions . CountCumSum countCumSum = new org . deeplearning4j . spark . text . functions . CountCumSum ( sentenceCountRDD ) ; org . apache . spark . api . java . JavaRDD < java . lang . Long > sentenceCountCumSumRDD = countCumSum . buildCumSum ( ) ; org . apache . spark . api . java . JavaPairRDD < org . deeplearning4j . spark . text . List < org . deeplearning4j . models . word2vec . VocabWord > , java . lang . Long > vocabWordListSentenceCumSumRDD = vocabWordListRDD . zip ( sentenceCountCumSumRDD ) ; org . apache . spark . broadcast . Broadcast < org . deeplearning4j . spark . text . Map < java . lang . String , java . lang . Object > > word2vecVarMapBroadcast = sc . broadcast ( word2vecVarMap ) ; org . apache . spark . broadcast . Broadcast < double [ ] > expTableBroadcast = sc . broadcast ( expTable ) ; org . deeplearning4j . spark . text . Iterator < scala . Tuple2 < org . deeplearning4j . spark . text . List < org . deeplearning4j . models . word2vec . VocabWord > , java . lang . Long > > iterator = vocabWordListSentenceCumSumRDD . collect ( ) . iterator ( ) ; org . deeplearning4j . spark . models . embeddings . word2vec . FirstIterationFunctionAdapter firstIterationFunction = new org . deeplearning4j . spark . models . embeddings . word2vec . FirstIterationFunctionAdapter ( word2vecVarMapBroadcast , expTableBroadcast , pipeline . getBroadCastVocabCache ( ) ) ; java . lang . Iterable < Map . Entry < org . deeplearning4j . models . word2vec . VocabWord , org . nd4j . linalg . api . ndarray . INDArray > > ret = firstIterationFunction . call ( iterator ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return new org . nd4j . linalg . collection . CompactHeapStringList . CompactHeapStringListIterator ( ) ; }
org . junit . Assert . assertTrue ( ret . iterator ( ) . hasNext ( ) )
testBuildMapWithComlexBeanAndRebuild_shouldBeEqualToOriginalBean ( ) { org . openengsb . core . util . beans . BeanWithComplexAttributes bean = new org . openengsb . core . util . beans . BeanWithComplexAttributes ( new org . openengsb . core . util . beans . CustomStringClass ( "foo:bar" ) , new java . math . BigDecimal ( "1" ) ) ; java . util . Map < java . lang . String , java . lang . Object > map = org . openengsb . core . util . BeanUtilsExtended . buildObjectAttributeMap ( bean ) ; org . openengsb . core . util . beans . BeanWithComplexAttributes created = org . openengsb . core . util . BeanUtilsExtended . createBeanFromAttributeMap ( org . openengsb . core . util . beans . BeanWithComplexAttributes . class , map ) ; "<AssertPlaceHolder>" ; } createBeanFromAttributeMap ( java . lang . Class , java . util . Map ) { BeanType instance ; try { instance = beanType . newInstance ( ) ; org . apache . commons . beanutils . BeanUtils . populate ( instance , attributeValues ) ; } catch ( java . lang . Exception e ) { org . springframework . util . ReflectionUtils . handleReflectionException ( e ) ; throw new java . lang . IllegalStateException ( "Should<sp>never<sp>get<sp>here" ) ; } return instance ; }
org . junit . Assert . assertThat ( created , org . hamcrest . Matchers . is ( bean ) )
testPowerOfInteger ( ) { java . util . Map < java . lang . String , java . lang . Object > context = com . google . common . collect . Maps . newHashMap ( ) ; context . put ( "evenExponent" 1 , 2 ) ; context . put ( "evenExponent" , 8 ) ; context . put ( "oddExponent" , 7 ) ; context . put ( "evenExponent" 4 , ( - 2 ) ) ; context . put ( "negativeExponent" , ( - 8 ) ) ; java . lang . String [ ] [ ] testCases = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "evenExponent" 7 , "256" } , new java . lang . String [ ] { "{%<sp>set<sp>x<sp>=<sp>2<sp>**<sp>8<sp>%}{{x}}" , "256" } , new java . lang . String [ ] { "{%<sp>set<sp>x<sp>=<sp>base<sp>**<sp>8<sp>%}{{x}}" , "256" } , new java . lang . String [ ] { "{%<sp>set<sp>x<sp>=<sp>2<sp>**<sp>evenExponent<sp>%}{{x}}" , "256" } , new java . lang . String [ ] { "evenExponent" 3 , "256" } , new java . lang . String [ ] { "evenExponent" 0 , "256" } , new java . lang . String [ ] { "evenExponent" 6 , "0" } , new java . lang . String [ ] { "{%<sp>set<sp>x<sp>=<sp>2<sp>**<sp>-8<sp>%}{{x}}" , "0" } , new java . lang . String [ ] { "evenExponent" 5 , "-128" } , new java . lang . String [ ] { "evenExponent" 2 , "-128" } } ; for ( java . lang . String [ ] testCase : testCases ) { java . lang . String template = testCase [ 0 ] ; java . lang . String expected = testCase [ 1 ] ; java . lang . String rendered = jinja . render ( template , context ) ; "<AssertPlaceHolder>" ; } } render ( java . lang . String , java . lang . Object [ ] ) { java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; context . put ( "iterable" , items ) ; return jinjava . render ( ( ( "{%<sp>for<sp>item<sp>in<sp>iterable|sort" + sortExtra ) + "<sp>%}{{<sp>item<sp>}}{%<sp>endfor<sp>%}" ) , context ) ; }
org . junit . Assert . assertEquals ( expected , rendered )
testMapGetterAttr ( ) { bean . put ( "test" , new com . jitlogic . zorka . core . mbeans . AttrGetter ( this , "class" ) ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { if ( ! ( attrs . containsKey ( attribute ) ) ) { throw new javax . management . AttributeNotFoundException ( ( ( "This<sp>MBean<sp>has<sp>no<sp>'" + attribute ) + "'<sp>attribute." ) ) ; } if ( "this" . equals ( attribute ) ) { return this ; } java . lang . Object v = attrs . get ( attribute ) . getValue ( ) ; return v instanceof com . jitlogic . zorka . common . stats . ValGetter ? ( ( com . jitlogic . zorka . common . stats . ValGetter ) ( v ) ) . get ( ) : v ; }
org . junit . Assert . assertSame ( this . getClass ( ) , bean . getAttribute ( "test" ) )
testLockWithProperAuth ( ) { final org . locationtech . geowave . adapter . vector . plugin . lock . LockingManagement memoryLockManager = new org . locationtech . geowave . adapter . vector . plugin . lock . MemoryLockManager ( "default" ) ; final org . geotools . data . Transaction t1 = org . geotools . data . Transaction . AUTO_COMMIT ; final org . geotools . data . DefaultTransaction t2 = new org . geotools . data . DefaultTransaction ( ) ; t2 . addAuthorization ( "auth5" ) ; org . geotools . data . FeatureLock lock = new org . geotools . data . FeatureLock ( "auth5" , 1 ) ; memoryLockManager . lockFeatureID ( "sometime" , "f5" , t1 , lock ) ; java . lang . Thread commiter = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . locationtech . geowave . adapter . vector . plugin . lock . Override public void run ( ) { try { java . lang . Thread . sleep ( 4000 ) ; memoryLockManager . release ( "auth5" , t1 ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( e ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( e ) ; } } } ) ; long currentTime = java . lang . System . currentTimeMillis ( ) ; commiter . start ( ) ; memoryLockManager . lock ( t2 , "f5" ) ; "<AssertPlaceHolder>" ; commiter . join ( ) ; } lock ( org . geotools . data . Transaction , java . lang . String ) { lock ( transaction , featureID , ( transaction == ( org . geotools . data . Transaction . AUTO_COMMIT ) ? org . locationtech . geowave . adapter . vector . plugin . lock . AbstractLockingManagement . EMPTY_SET : transaction . getAuthorizations ( ) ) , 1 ) ; }
org . junit . Assert . assertTrue ( ( ( ( java . lang . System . currentTimeMillis ( ) ) - currentTime ) < 4000 ) )
defaultTopology ( ) { uk . ac . ebi . beam . Graph g = new uk . ac . ebi . beam . Graph ( 5 ) ; "<AssertPlaceHolder>" ; } topologyOf ( int ) { if ( ( topologies [ u ] ) == null ) return uk . ac . ebi . beam . Topology . unknown ( ) ; return topologies [ u ] ; }
org . junit . Assert . assertThat ( g . topologyOf ( 4 ) , org . hamcrest . CoreMatchers . is ( uk . ac . ebi . beam . Topology . unknown ( ) ) )
setPermutationTest ( ) { int size = 4 ; int [ ] target = new int [ ] { 3 , 1 , 0 , 2 } ; org . openscience . cdk . graph . Permutor permutor = new org . openscience . cdk . graph . Permutor ( size ) ; permutor . setPermutation ( target ) ; "<AssertPlaceHolder>" ; } getCurrentPermutation ( ) { return this . unrankPermutationLexicographically ( currentRank , size ) ; }
org . junit . Assert . assertArrayEquals ( target , permutor . getCurrentPermutation ( ) )
shouldNotChangeAListWhenRemovingAQueryThatIsNotInTheList ( ) { org . neo4j . kernel . api . query . ExecutingQuery query1 = createExecutingQuery ( 1 , "query1" ) ; org . neo4j . kernel . api . query . ExecutingQuery query2 = createExecutingQuery ( 2 , "query2" ) ; org . neo4j . kernel . impl . api . ExecutingQueryList list = ExecutingQueryList . EMPTY . push ( query1 ) ; org . neo4j . kernel . impl . api . ExecutingQueryList result = list . remove ( query2 ) ; "<AssertPlaceHolder>" ; } remove ( long ) { try { writer . deleteDocuments ( org . neo4j . kernel . api . impl . fulltext . LuceneFulltextDocumentStructure . newTermForChangeOrRemove ( entityId ) ) ; } catch ( java . io . IOException e ) { throw new java . io . UncheckedIOException ( e ) ; } }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( list ) )
testHostIP ( ) { org . powermock . api . mockito . PowerMockito . when ( myAddress . getHostName ( ) ) . thenReturn ( me . moocar . logbackgelf . InternetUtilsTest . RESULT_HOSTNAME ) ; org . powermock . api . mockito . PowerMockito . when ( myAddress . getCanonicalHostName ( ) ) . thenReturn ( me . moocar . logbackgelf . InternetUtilsTest . RESULT_IP ) ; "<AssertPlaceHolder>" ; } getLocalHostName ( ) { try { final java . lang . String canonicalHostName = java . net . InetAddress . getLocalHost ( ) . getCanonicalHostName ( ) ; if ( me . moocar . logbackgelf . InternetUtils . isFQDN ( canonicalHostName ) ) { return canonicalHostName ; } else { return java . net . InetAddress . getLocalHost ( ) . getHostName ( ) ; } } catch ( java . net . UnknownHostException e ) { java . net . NetworkInterface networkInterface = java . net . NetworkInterface . getNetworkInterfaces ( ) . nextElement ( ) ; if ( networkInterface == null ) throw e ; java . net . InetAddress ipAddress = networkInterface . getInetAddresses ( ) . nextElement ( ) ; if ( ipAddress == null ) throw e ; return ipAddress . getHostAddress ( ) ; } }
org . junit . Assert . assertEquals ( me . moocar . logbackgelf . InternetUtilsTest . RESULT_HOSTNAME , me . moocar . logbackgelf . InternetUtils . getLocalHostName ( ) )
testCombinedSpanInMultipleFieldsQuery ( ) { java . lang . String query = "<sp>lin<sp>" ; java . util . ArrayList < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( TestConstants . FIRST_NAME ) ; attributeNames . add ( TestConstants . LAST_NAME ) ; attributeNames . add ( TestConstants . DESCRIPTION ) ; java . util . List < edu . uci . ics . texera . api . span . Span > list = new java . util . ArrayList ( ) ; edu . uci . ics . texera . api . span . Span span1 = new edu . uci . ics . texera . api . span . Span ( "description" , 24 , 29 , "<sp>lin<sp>" , "<sp>lin<sp>" ) ; list . add ( span1 ) ; edu . uci . ics . texera . api . schema . Attribute [ ] schemaAttributes = new edu . uci . ics . texera . api . schema . Attribute [ ( TestConstants . ATTRIBUTES_PEOPLE . length ) + 1 ] ; for ( int count = 0 ; count < ( ( schemaAttributes . length ) - 1 ) ; count ++ ) { schemaAttributes [ count ] = edu . uci . ics . texera . api . constants . test . TestConstants . ATTRIBUTES_PEOPLE [ count ] ; } schemaAttributes [ ( ( schemaAttributes . length ) - 1 ) ] = new edu . uci . ics . texera . api . schema . Attribute ( edu . uci . ics . texera . dataflow . keywordmatcher . KeywordSubstringTest . RESULTS , edu . uci . ics . texera . api . schema . AttributeType . LIST ) ; edu . uci . ics . texera . api . field . IField [ ] fields1 = new edu . uci . ics . texera . api . field . IField [ ] { new edu . uci . ics . texera . api . field . StringField ( "george<sp>lin<sp>lin" ) , new edu . uci . ics . texera . api . field . StringField ( "lin<sp>clooney" ) , new edu . uci . ics . texera . api . field . IntegerField ( 43 ) , new edu . uci . ics . texera . api . field . DoubleField ( 6.06 ) , new edu . uci . ics . texera . api . field . DateField ( new java . text . SimpleDateFormat ( "MM-dd-yyyy" ) . parse ( "01-13-1973" ) ) , new edu . uci . ics . texera . api . field . TextField ( "Lin<sp>Clooney<sp>is<sp>Short<sp>and<sp>lin<sp>clooney<sp>is<sp>Angry" ) , new edu . uci . ics . texera . api . field . ListField ( list ) } ; edu . uci . ics . texera . api . tuple . Tuple tuple1 = new edu . uci . ics . texera . api . tuple . Tuple ( new edu . uci . ics . texera . api . schema . Schema ( schemaAttributes ) , fields1 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResultList = new java . util . ArrayList ( ) ; expectedResultList . add ( tuple1 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > resultList = edu . uci . ics . texera . dataflow . keywordmatcher . KeywordTestHelper . getScanSourceResults ( edu . uci . ics . texera . dataflow . keywordmatcher . KeywordSubstringTest . PEOPLE_TABLE , query , attributeNames , edu . uci . ics . texera . dataflow . keywordmatcher . KeywordSubstringTest . substring , Integer . MAX_VALUE , 0 ) ; boolean contains = edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResultList , resultList ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( contains )
testGetDefaultPort ( ) { System . out . println ( "testGetDefaultPort" ) ; int expResult = 5432 ; team . bus . model . bean . DataBaseInfo instance = new team . bus . model . bean . DataBaseInfo ( ) ; int result = instance . getPort ( ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return this . port ; }
org . junit . Assert . assertEquals ( expResult , result )
shouldConstructScopeWithNullProperties ( ) { com . oracle . bedrock . runtime . java . container . ContainerScope scope = new com . oracle . bedrock . runtime . java . container . ContainerScope ( "test" ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return com . oracle . bedrock . runtime . DummyApp . properties ; }
org . junit . Assert . assertThat ( scope . getProperties ( ) . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) )
invalidKeyWordsInOperationThrowsException ( ) { final io . cloudslang . lang . compiler . parser . model . ParsedSlang mockParsedSlang = mockOperationsSlangFile ( ) ; java . util . Map < java . lang . String , java . lang . Object > executableRawData = new java . util . HashMap ( ) ; java . lang . String key = "a" ; executableRawData . put ( key , "b" ) ; java . lang . String operationName = "op1" ; executableRawData . put ( SlangTextualKeys . EXECUTABLE_NAME_KEY , operationName ) ; exception . expect ( io . cloudslang . lang . compiler . modeller . RuntimeException . class ) ; exception . expectMessage ( operationName ) ; exception . expectMessage ( key ) ; io . cloudslang . lang . compiler . modeller . model . Operation op = ( ( io . cloudslang . lang . compiler . modeller . model . Operation ) ( transformToExecutable ( mockParsedSlang , executableRawData ) ) ) ; "<AssertPlaceHolder>" ; } transformToExecutable ( io . cloudslang . lang . compiler . parser . model . ParsedSlang , java . util . Map ) { io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult modellingResult = executableBuilder . transformToExecutable ( mockParsedSlang , executableRawData , CompilerConstants . DEFAULT_SENSITIVITY_LEVEL ) ; if ( ( modellingResult . getErrors ( ) . size ( ) ) > 0 ) { throw modellingResult . getErrors ( ) . get ( 0 ) ; } return modellingResult . getExecutable ( ) ; }
org . junit . Assert . assertNotNull ( op )
maximumPacketLengthForInboundSequencedData ( ) { java . lang . String message = repeat ( 'X' , com . paritytrading . nassau . soupbintcp . SoupBinTCPSessionTest . MAX_RX_PAYLOAD_LENGTH ) ; server . send ( wrap ( message ) ) ; while ( ( clientMessages . collect ( ) . size ( ) ) != 1 ) client . receive ( ) ; "<AssertPlaceHolder>" ; } collect ( ) { return events ; }
org . junit . Assert . assertEquals ( asList ( message ) , clientMessages . collect ( ) )
testPeekOnEmptyDeque ( ) { com . sun . sgs . test . app . util . TestScalableDeque . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { com . sun . sgs . app . util . ScalableDeque < java . lang . Integer > d = new com . sun . sgs . app . util . ScalableDeque < java . lang . Integer > ( ) ; "<AssertPlaceHolder>" ; } } , com . sun . sgs . test . app . util . TestScalableDeque . taskOwner ) ; } peek ( ) { return ( headRef ) != null ? getHead ( ) . getElement ( ) : null ; }
org . junit . Assert . assertEquals ( null , d . peek ( ) )
drainInputStream_RemainingBytesInStream_ReadsAllRemainingData ( ) { final java . io . InputStream inputStream = randomInputStream ( ) ; software . amazon . awssdk . utils . IoUtils . drainInputStream ( inputStream ) ; "<AssertPlaceHolder>" ; } read ( ) { int read = inputStream . read ( ) ; if ( ( read != ( - 1 ) ) && ( ( lengthRead ) < ( strippedLength ) ) ) { checkSum . update ( read ) ; } if ( read != ( - 1 ) ) { ( lengthRead ) ++ ; } if ( ( read != ( - 1 ) ) && ( ( lengthRead ) == ( strippedLength ) ) ) { int byteRead = - 1 ; byteRead = inputStream . read ( ) ; while ( ( byteRead != ( - 1 ) ) && ( ( lengthRead ) < ( ( strippedLength ) + ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingInputStream . CHECKSUM_SIZE ) ) ) ) { int index = java . lang . Math . min ( ( ( int ) ( ( lengthRead ) - ( strippedLength ) ) ) , ( ( software . amazon . awssdk . services . s3 . checksums . ChecksumValidatingInputStream . CHECKSUM_SIZE ) - 1 ) ) ; streamChecksum [ index ] = ( ( byte ) ( byteRead ) ) ; ( lengthRead ) ++ ; byteRead = inputStream . read ( ) ; } } if ( read == ( - 1 ) ) { validateAndThrow ( ) ; } return read ; }
org . junit . Assert . assertEquals ( ( - 1 ) , inputStream . read ( ) )
isSameWhenCoreAttributesNotModCreatedChecksumChanged ( ) { cachedMetacard . setAttribute ( Core . DERIVED_RESOURCE_DOWNLOAD_URL , "testExpirationCached" 9 ) ; cachedMetacard . setAttribute ( Core . DATATYPE , "testLocationUpdated" 3 ) ; cachedMetacard . setAttribute ( Core . DERIVED_RESOURCE_URI , "testLocationUpdated" 6 ) ; cachedMetacard . setAttribute ( Core . DESCRIPTION , "testExpirationCached" 4 ) ; cachedMetacard . setAttribute ( Core . EXPIRATION , "testExpirationCached" ) ; cachedMetacard . setAttribute ( Core . LANGUAGE , "testLocationUpdated" 4 ) ; cachedMetacard . setAttribute ( Core . LOCATION , "testLocationCached" ) ; cachedMetacard . setAttribute ( Core . METACARD_OWNER , "testExpirationCached" 2 ) ; cachedMetacard . setAttribute ( Core . METACARD_TAGS , "testMetaTagsCached" ) ; cachedMetacard . setAttribute ( Core . METADATA , "testMetaCached" ) ; cachedMetacard . setAttribute ( Core . RESOURCE_DOWNLOAD_URL , "testExpirationCached" 1 ) ; cachedMetacard . setAttribute ( Core . RESOURCE_SIZE , "testLocationUpdated" 1 ) ; cachedMetacard . setAttribute ( Core . RESOURCE_URI , "testExpirationCached" 5 ) ; cachedMetacard . setAttribute ( Core . THUMBNAIL , "testLocationUpdated" 2 ) ; cachedMetacard . setAttribute ( Core . TITLE , "testExpirationCached" 8 ) ; updatedMetacard . setAttribute ( Core . DERIVED_RESOURCE_DOWNLOAD_URL , "testLocationUpdated" 9 ) ; updatedMetacard . setAttribute ( Core . DATATYPE , "testDatatypeUpdated" ) ; updatedMetacard . setAttribute ( Core . DERIVED_RESOURCE_URI , "testLocationUpdated" 7 ) ; updatedMetacard . setAttribute ( Core . DESCRIPTION , "testLocationUpdated" 5 ) ; updatedMetacard . setAttribute ( Core . EXPIRATION , "testLocationUpdated" 0 ) ; updatedMetacard . setAttribute ( Core . LANGUAGE , "testLanguageUpdated" ) ; updatedMetacard . setAttribute ( Core . LOCATION , "testLocationUpdated" ) ; updatedMetacard . setAttribute ( Core . METACARD_OWNER , "testMetaOwnerUpdated" ) ; updatedMetacard . setAttribute ( Core . METACARD_TAGS , "testMetaTagsUpdated" ) ; updatedMetacard . setAttribute ( Core . METADATA , "testLocationUpdated" 8 ) ; updatedMetacard . setAttribute ( Core . RESOURCE_DOWNLOAD_URL , "testExpirationCached" 3 ) ; updatedMetacard . setAttribute ( Core . RESOURCE_SIZE , "2" ) ; updatedMetacard . setAttribute ( Core . RESOURCE_URI , "testExpirationCached" 7 ) ; updatedMetacard . setAttribute ( Core . THUMBNAIL , "testExpirationCached" 0 ) ; updatedMetacard . setAttribute ( Core . TITLE , "testExpirationCached" 6 ) ; "<AssertPlaceHolder>" ; } isSame ( ddf . catalog . data . Metacard , ddf . catalog . data . Metacard ) { if ( ( cachedMetacard == null ) && ( updatedMetacard == null ) ) { return true ; } if ( ( cachedMetacard == null ) || ( updatedMetacard == null ) ) { return false ; } if ( ! ( java . util . Objects . equals ( cachedMetacard . getId ( ) , updatedMetacard . getId ( ) ) ) ) { return false ; } if ( ! ( java . util . Objects . equals ( cachedMetacard . getAttribute ( Core . CHECKSUM ) , updatedMetacard . getAttribute ( Core . CHECKSUM ) ) ) ) { return false ; } return ddf . catalog . cache . impl . CachedResourceMetacardComparator . allMetacardMethodsReturnMatchingAttributes ( cachedMetacard , updatedMetacard ) ; }
org . junit . Assert . assertThat ( ddf . catalog . cache . impl . CachedResourceMetacardComparator . isSame ( cachedMetacard , updatedMetacard ) , org . hamcrest . CoreMatchers . is ( true ) )
testTimeManager ( ) { org . openscience . cdk . smsd . tools . TimeManager tMan = new org . openscience . cdk . smsd . tools . TimeManager ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( tMan )
testBsonObjectEquality2 ( ) { io . mewbase . bson . BsonObject obj1 = new io . mewbase . bson . BsonObject ( ) . put ( "arr" , new io . mewbase . bson . BsonArray ( ) . add ( "x" ) ) ; io . mewbase . bson . List < io . mewbase . bson . BsonValue > list = new io . mewbase . bson . ArrayList ( ) ; list . add ( io . mewbase . bson . BsonValue . of ( "x" ) ) ; io . mewbase . bson . Map < java . lang . String , io . mewbase . bson . BsonValue > map = new io . mewbase . bson . HashMap ( ) ; map . put ( "arr" , io . mewbase . bson . BsonValue . of ( list ) ) ; io . mewbase . bson . BsonObject obj2 = new io . mewbase . bson . BsonObject ( map ) ; io . mewbase . bson . Iterator < Map . Entry < java . lang . String , io . mewbase . bson . BsonValue > > iter = obj2 . iterator ( ) ; while ( iter . hasNext ( ) ) { Map . Entry < java . lang . String , io . mewbase . bson . BsonValue > entry = iter . next ( ) ; } "<AssertPlaceHolder>" ; } iterator ( ) { return list . iterator ( ) ; }
org . junit . Assert . assertEquals ( obj2 , obj1 )
serializes_nested_rekords ( ) { com . noodlesandwich . rekord . Rekord < com . noodlesandwich . rekord . serialization . Person > person = Person . rekord . with ( Person . firstName , "Queen<sp>Elizabeth" ) . with ( Person . lastName , "house<sp>number" 0 ) . with ( Person . address , Address . rekord . with ( Address . houseNumber , 1 ) . with ( Address . street , "The<sp>Mall" ) . with ( Address . city , "London" ) . with ( Address . postalCode , "SW1<sp>1AA" ) ) ; java . util . Map < java . lang . String , java . lang . Object > serialized = person . serialize ( new com . noodlesandwich . rekord . serialization . MapSerializer ( ) ) ; java . util . Map < java . lang . String , java . lang . Object > expected = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > of ( "first<sp>name" , "Queen<sp>Elizabeth" , "last<sp>name" , "house<sp>number" 0 , "house<sp>number" 1 , com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > of ( "house<sp>number" , 1 , "street" , "The<sp>Mall" , "city" , "London" , "postal<sp>code" , "SW1<sp>1AA" ) ) ; "<AssertPlaceHolder>" ; } serialize ( com . noodlesandwich . rekord . serialization . Serializer ) { return delegate . serialize ( serializer ) ; }
org . junit . Assert . assertThat ( serialized , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expected ) ) )
testRealLifeRTL2 ( ) { java . lang . String expectedCsv = technology . tabula . UtilsForTesting . loadCsv ( "src/test/resources/technology/tabula/csv/indictb1h_14.csv" ) ; technology . tabula . Page page = technology . tabula . UtilsForTesting . getAreaFromPage ( "src/test/resources/technology/tabula/indictb1h_14.pdf" , 1 , 205.0F , 120.0F , 622.82F , 459.9F ) ; technology . tabula . extractors . BasicExtractionAlgorithm bea = new technology . tabula . extractors . BasicExtractionAlgorithm ( ) ; technology . tabula . Table table = bea . extract ( page ) . get ( 0 ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; new technology . tabula . writers . CSVWriter ( ) . write ( sb , table ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; java . lang . String s = super . toString ( ) ; sb . append ( s , 0 , ( ( s . length ( ) ) - 1 ) ) ; sb . append ( ",chunks=" ) ; for ( technology . tabula . TextChunk te : this . textChunks ) { sb . append ( ( ( "'" + ( te . getText ( ) ) ) + "',<sp>" ) ) ; } sb . append ( ']' ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedCsv , sb . toString ( ) )
calculateRetrieveSizeShouldReturnNoOfPipelinesWhenPagingDisabled ( ) { se . diabol . jenkins . pipeline . domain . Component component = mock ( se . diabol . jenkins . pipeline . domain . Component . class ) ; when ( component . isFullScreenView ( ) ) . thenReturn ( false ) ; final int numberOfPipelines = 9 ; int retrieveSize = se . diabol . jenkins . pipeline . domain . DownstreamPipeline . calculateRetreiveSize ( component , se . diabol . jenkins . pipeline . domain . DownstreamPipelineTest . PAGING_DISABLED , numberOfPipelines , 10 ) ; "<AssertPlaceHolder>" ; } calculateRetreiveSize ( se . diabol . jenkins . pipeline . domain . Component , boolean , int , int ) { int retrieveSize = noOfPipelines ; if ( pagingEnabled && ( ! ( component . isFullScreenView ( ) ) ) ) { retrieveSize = java . lang . Math . min ( ( totalNoOfPipelines - ( ( ( component . getCurrentPage ( ) ) - 1 ) * noOfPipelines ) ) , noOfPipelines ) ; } return retrieveSize ; }
org . junit . Assert . assertThat ( retrieveSize , org . hamcrest . core . Is . is ( numberOfPipelines ) )
testTerugConversieUitBlob ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon persoon = persoonRepository . haalPersoonOp ( 1 ) ; final java . util . List < nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonAfnemerindicatie > persoonAfnemerindicaties = afnemerindicatieRepository . haalAfnemerindicatiesOp ( 1 ) ; final nl . bzk . brp . service . algemeen . blob . PersoonData persoonData = new nl . bzk . brp . service . algemeen . blob . PersoonData ( nl . bzk . algemeenbrp . services . blobber . Blobber . maakBlob ( persoon ) , nl . bzk . algemeenbrp . services . blobber . Blobber . maakBlob ( persoonAfnemerindicaties ) , 0L ) ; final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst persoonslijst = nl . bzk . brp . service . algemeen . blob . PersoonslijstFactory . maak ( persoonData ) ; final java . lang . String afdruk = removeLineEndings ( nl . bzk . brp . domain . leveringmodel . ModelAfdruk . maakAfdruk ( persoonslijst . getMetaObject ( ) ) ) ; final java . lang . String bewaardeAfdruk = removeLineEndings ( org . apache . commons . io . IOUtils . toString ( nl . bzk . brp . delivery . testutil . BlobTerugConversieIntegratieTest . class . getResourceAsStream ( "/data/terugconversie.txt" ) ) ) ; "<AssertPlaceHolder>" ; } toString ( java . io . InputStream ) { int bytesRead = 0 ; byte [ ] buffer = new byte [ nl . bzk . brp . testclient . util . IOUtils . PIPE_BUFFER_SIZE ] ; java . lang . StringBuffer stringBuffer = new java . lang . StringBuffer ( ) ; while ( ( bytesRead = is . read ( buffer ) ) > ( - 1 ) ) { stringBuffer . append ( new java . lang . String ( buffer , 0 , bytesRead ) ) ; } is . close ( ) ; return stringBuffer . toString ( ) ; }
org . junit . Assert . assertEquals ( bewaardeAfdruk , afdruk )
shouldAnalyzeReturnsTrueIfTheFileTypeAnalyzersAcceptsTheDependency ( ) { final java . io . File dependencyFile = new java . io . File ( "" ) ; new mockit . Expectations ( ) { { dependency . getActualFile ( ) ; result = dependencyFile ; fileTypeAnalyzer . accept ( dependencyFile ) ; result = true ; } } ; org . owasp . dependencycheck . AnalysisTask analysisTask = new org . owasp . dependencycheck . AnalysisTask ( fileTypeAnalyzer , dependency , null , null ) ; boolean shouldAnalyze = analysisTask . shouldAnalyze ( ) ; "<AssertPlaceHolder>" ; } shouldAnalyze ( ) { if ( ( analyzer ) instanceof org . owasp . dependencycheck . analyzer . FileTypeAnalyzer ) { final org . owasp . dependencycheck . analyzer . FileTypeAnalyzer fileTypeAnalyzer = ( ( org . owasp . dependencycheck . analyzer . FileTypeAnalyzer ) ( analyzer ) ) ; return fileTypeAnalyzer . accept ( dependency . getActualFile ( ) ) ; } return true ; }
org . junit . Assert . assertTrue ( shouldAnalyze )
testShouldTransform_does_filter_correctly_a_non_static_inner_class ( ) { dst = new javassist . CtClass ( ( "Dst" + ( TestCounter . testCounter ) ) ) { @ com . github . stephanenicolas . mimic . Override public javassist . CtClass [ ] getDeclaredClasses ( ) throws javassist . NotFoundException { javassist . CtClass inner = new javassist . CtClass ( ( "Inner" + ( TestCounter . testCounter ) ) ) { @ com . github . stephanenicolas . mimic . Override public javassist . CtClass getDeclaringClass ( ) throws javassist . NotFoundException { return dst ; } @ com . github . stephanenicolas . mimic . Override public int getModifiers ( ) { return java . lang . reflect . Modifier . PUBLIC ; } } ; return new javassist . CtClass [ ] { inner } ; } } ; boolean filter = mimicProcessor . shouldTransform ( dst . getDeclaredClasses ( ) [ 0 ] ) ; "<AssertPlaceHolder>" ; } getDeclaredClasses ( ) { javassist . CtClass inner = new javassist . CtClass ( ( "Inner" + ( TestCounter . testCounter ) ) ) { @ com . github . stephanenicolas . mimic . Override public javassist . CtClass getDeclaringClass ( ) throws javassist . NotFoundException { return dst ; } @ com . github . stephanenicolas . mimic . Override public int getModifiers ( ) { return java . lang . reflect . Modifier . PUBLIC ; } } ; return new javassist . CtClass [ ] { inner } ; }
org . junit . Assert . assertFalse ( filter )
doublestream_generate ( ) { java . util . OptionalDouble one = java . util . stream . DoubleStream . generate ( ( ) -> 1 ) . limit ( 10 ) . distinct ( ) . findFirst ( ) ; "<AssertPlaceHolder>" ; } getAsDouble ( ) { return 10 ; }
org . junit . Assert . assertEquals ( 1 , one . getAsDouble ( ) , 0 )
pairFrom ( ) { com . gs . collections . api . tuple . Pair < java . lang . String , java . lang . String > pair = com . gs . collections . impl . tuple . Tuples . pair ( "1" , "2" ) ; Map . Entry < java . lang . String , java . lang . String > entry = pair . toEntry ( ) ; com . gs . collections . api . tuple . Pair < java . lang . String , java . lang . String > pair2 = com . gs . collections . impl . tuple . Tuples . pairFrom ( entry ) ; "<AssertPlaceHolder>" ; } pairFrom ( Map . Entry ) { return com . gs . collections . impl . tuple . Tuples . pair ( entry . getKey ( ) , entry . getValue ( ) ) ; }
org . junit . Assert . assertEquals ( pair , pair2 )
testUnnestGroupByList ( ) { com . dremio . dac . explore . model . DatasetUI dataset = createDatasetFromParentAndSave ( "unnestAndGroupBy" , "cp.\"json/nested.json\"" ) ; com . dremio . dac . explore . model . InitialPreviewResponse response2 = transform ( dataset , new com . dremio . dac . proto . model . dataset . TransformField ( "b" , "b" , true , new com . dremio . dac . proto . model . dataset . FieldUnnestList ( ) . wrap ( ) ) ) ; com . dremio . dac . explore . model . InitialPreviewResponse response3 = transform ( response2 . getDataset ( ) , new com . dremio . dac . proto . model . dataset . TransformGroupBy ( ) . setColumnsDimensionsList ( asList ( new com . dremio . dac . proto . model . dataset . Dimension ( "b" ) ) ) . setColumnsMeasuresList ( asList ( new com . dremio . dac . proto . model . dataset . Measure ( Count ) . setColumn ( "b" ) ) ) ) ; com . dremio . dac . model . job . JobDataFragment data = getData ( response3 . getPaginationUrl ( ) , 0 , 20 ) ; "<AssertPlaceHolder>" ; } getReturnedRowCount ( ) { return recordBatches . getSize ( ) ; }
org . junit . Assert . assertEquals ( 6 , data . getReturnedRowCount ( ) )