input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testGuiceHK2GuiceHK2 ( ) { org . jvnet . hk2 . guice . bridge . test . bidirectional . GuiceService1_3 guice3 = injector . getInstance ( org . jvnet . hk2 . guice . bridge . test . bidirectional . GuiceService1_3 . class ) ; "<AssertPlaceHolder>" ; guice3 . check ( ) ; } getInstance ( java . lang . String ) { return beanMap . get ( key ) ; }
org . junit . Assert . assertNotNull ( guice3 )
updateColumnCaption_defaultRowWithMergedCellNotUpdated ( ) { com . vaadin . ui . components . grid . HeaderCell merged = grid . getDefaultHeaderRow ( ) . join ( column1 , column2 ) ; merged . setText ( "new" ) ; column1 . setCaption ( "foo" ) ; column2 . setCaption ( "bar" ) ; "<AssertPlaceHolder>" ; } getText ( ) { return getInputField ( ) . getAttribute ( "value" ) ; }
org . junit . Assert . assertEquals ( "new" , merged . getText ( ) )
itIsDeleted ( ) { txaction . setStatus ( TxactionStatus . DELETED ) ; "<AssertPlaceHolder>" ; } isDeleted ( ) { return ( getStatus ( ) ) == ( TxactionStatus . DELETED ) ; }
org . junit . Assert . assertTrue ( txaction . isDeleted ( ) )
testFromEbXML ( ) { org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLRetrieveDocumentSetRequest ebXML = transformer . toEbXML ( request ) ; org . openehealth . ipf . commons . ihe . xds . core . requests . RetrieveDocumentSet result = transformer . fromEbXML ( ebXML ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLRetrieveDocumentSetRequest ) { if ( ebXML == null ) { return null ; } org . openehealth . ipf . commons . ihe . xds . core . requests . RetrieveDocumentSet request = new org . openehealth . ipf . commons . ihe . xds . core . requests . RetrieveDocumentSet ( ) ; request . getDocuments ( ) . addAll ( ebXML . getDocuments ( ) ) ; return request ; }
org . junit . Assert . assertEquals ( request , result )
testGetParameters ( ) { java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "name" ; org . lnu . is . domain . timeperiod . TimePeriodType entity = new org . lnu . is . domain . timeperiod . TimePeriodType ( ) ; 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 ( "abbrName" , abbrName ) ; expected . put ( "name" , name ) ; 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 )
testCheckNetworkCommandFailure ( ) { final com . cloud . hypervisor . xenserver . resource . XenServer610Resource xenServer610Resource = new com . cloud . hypervisor . xenserver . resource . XenServer610Resource ( ) ; final com . cloud . network . PhysicalNetworkSetupInfo info = new com . cloud . network . PhysicalNetworkSetupInfo ( ) ; final java . util . List < com . cloud . network . PhysicalNetworkSetupInfo > setupInfos = new java . util . ArrayList < com . cloud . network . PhysicalNetworkSetupInfo > ( ) ; setupInfos . add ( info ) ; final com . cloud . agent . api . CheckNetworkCommand checkNet = new com . cloud . agent . api . CheckNetworkCommand ( setupInfos ) ; final com . cloud . agent . api . Answer answer = xenServer610Resource . executeRequest ( checkNet ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return this . result ; }
org . junit . Assert . assertTrue ( answer . getResult ( ) )
testToConnectRecordWithMetadata ( ) { org . apache . kafka . connect . data . Schema schema = org . apache . kafka . connect . data . SchemaBuilder . struct ( ) . name ( "io.confluent.test.TestSchema" ) . version ( 12 ) . doc ( "doc" ) . field ( "int32" , org . apache . kafka . connect . data . SchemaBuilder . int32 ( ) . defaultValue ( 7 ) . doc ( "field<sp>doc" ) . build ( ) ) . build ( ) ; org . apache . kafka . connect . data . Struct struct = new org . apache . kafka . connect . data . Struct ( schema ) . put ( "int32" , 12 ) ; org . apache . avro . Schema avroSchema = org . apache . kafka . connect . data . org . apache . avro . SchemaBuilder . record ( "TestSchema" ) . namespace ( "io.confluent.test" ) . fields ( ) . name ( "int32" ) . doc ( "field<sp>doc" ) . type ( ) . intType ( ) . intDefault ( 7 ) . endRecord ( ) ; avroSchema . addProp ( "connect.name" , "io.confluent.test.TestSchema" ) ; avroSchema . addProp ( "connect.version" , JsonNodeFactory . instance . numberNode ( 12 ) ) ; avroSchema . addProp ( "connect.doc" , "doc" ) ; org . apache . avro . generic . GenericRecord avroRecord = new org . apache . avro . generic . GenericRecordBuilder ( avroSchema ) . set ( "int32" , 12 ) . build ( ) ; "<AssertPlaceHolder>" ; } toConnectData ( java . lang . String , byte [ ] ) { try { io . confluent . kafka . serializers . GenericContainerWithVersion containerWithVersion = deserializer . deserialize ( topic , isKey , value ) ; if ( containerWithVersion == null ) { return org . apache . kafka . connect . data . SchemaAndValue . NULL ; } org . apache . avro . generic . GenericContainer deserialized = containerWithVersion . container ( ) ; java . lang . Integer version = containerWithVersion . version ( ) ; if ( deserialized instanceof org . apache . avro . generic . IndexedRecord ) { return avroData . toConnectData ( deserialized . getSchema ( ) , deserialized , version ) ; } else if ( deserialized instanceof io . confluent . kafka . serializers . NonRecordContainer ) { return avroData . toConnectData ( deserialized . getSchema ( ) , ( ( io . confluent . kafka . serializers . NonRecordContainer ) ( deserialized ) ) . getValue ( ) , version ) ; } throw new org . apache . kafka . connect . errors . DataException ( java . lang . String . format ( "Unsupported<sp>type<sp>returned<sp>during<sp>deserialization<sp>of<sp>topic<sp>%s<sp>" , topic ) ) ; } catch ( org . apache . kafka . common . errors . SerializationException e ) { throw new org . apache . kafka . connect . errors . DataException ( java . lang . String . format ( "Failed<sp>to<sp>deserialize<sp>data<sp>for<sp>topic<sp>%s<sp>to<sp>Avro:<sp>" , topic ) , e ) ; } }
org . junit . Assert . assertEquals ( new org . apache . kafka . connect . data . SchemaAndValue ( schema , struct ) , avroData . toConnectData ( avroSchema , avroRecord ) )
getFourth_A$ ( ) { java . lang . String _1 = "foo" ; java . lang . Integer _2 = 123 ; java . lang . Long _3 = 456L ; java . lang . Boolean _4 = true ; com . m3 . scalaflavor4j . Tuple4 < java . lang . String , java . lang . Integer , java . lang . Long , java . lang . Boolean > tuple = com . m3 . scalaflavor4j . Tuple . apply ( _1 , _2 , _3 , _4 ) ; java . lang . Boolean actual = tuple . getFourth ( ) ; java . lang . Boolean expected = true ; "<AssertPlaceHolder>" ; } getFourth ( ) { return _4 ( ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testBuildWithParametersAndDisabledDefaultConstraintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String name = "name" ; org . lnu . is . domain . asset . status . AssetStatus context = new org . lnu . is . domain . asset . status . AssetStatus ( ) ; context . setName ( name ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AssetStatus<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>)<sp>ORDER<sp>BY<sp>e.name<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . asset . status . AssetStatus > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
run ( ) { try ( final java . io . InputStream is = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( "webxml31.xml" ) ) { final org . apache . openejb . jee . WebApp web = org . apache . openejb . sxc . Sxc . unmarshalJavaee ( new org . apache . openejb . jee . WebApp$JAXB ( ) , is ) ; "<AssertPlaceHolder>" ; } } getAbsoluteOrdering ( ) { if ( ( absoluteOrdering ) == null ) { absoluteOrdering = new java . util . ArrayList < org . apache . openejb . jee . FacesAbsoluteOrdering > ( ) ; } return absoluteOrdering ; }
org . junit . Assert . assertNotNull ( web . getAbsoluteOrdering ( ) )
integerValue ( ) { final org . jboss . msc . value . DefaultValue < java . lang . Integer > value = new org . jboss . msc . value . DefaultValue < java . lang . Integer > ( new org . jboss . msc . value . ImmediateValue < java . lang . Integer > ( 3 ) , new org . jboss . msc . value . ImmediateValue < java . lang . Integer > ( 4 ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return ( count ) ++ ; }
org . junit . Assert . assertEquals ( 3 , ( ( int ) ( value . getValue ( ) ) ) )
testCreateMinimal ( ) { eu . trentorise . opendata . jackan . model . CkanDataset dataset = new eu . trentorise . opendata . jackan . model . CkanDataset ( ( "test-dataset-jackan-" + ( java . util . UUID . randomUUID ( ) . getMostSignificantBits ( ) ) ) ) ; eu . trentorise . opendata . jackan . model . CkanDataset retDataset = client . createDataset ( dataset ) ; checkNotEmpty ( retDataset . getId ( ) , "Invalid<sp>dataset<sp>id!" ) ; "<AssertPlaceHolder>" ; eu . trentorise . opendata . jackan . test . ckan . WriteCkanDatasetIT . LOG . log ( Level . INFO , "created<sp>dataset<sp>with<sp>id<sp>{0}<sp>in<sp>catalog<sp>{1}" , new java . lang . Object [ ] { retDataset . getId ( ) , eu . trentorise . opendata . jackan . test . JackanTestConfig . of ( ) . getOutputCkan ( ) } ) ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( dataset . getName ( ) , retDataset . getName ( ) )
exceptionControl_handlingBy ( ) { java . lang . String result = handling ( com . m3 . scalaflavor4j . Exception . class ) . by ( new com . m3 . scalaflavor4j . F1 < java . lang . Throwable , java . lang . String > ( ) { public java . lang . String apply ( java . lang . Throwable t ) { return "catched" ; } } ) . apply ( new com . m3 . scalaflavor4j . Function0 < java . lang . String > ( ) { public java . lang . String apply ( ) { throw new java . lang . RuntimeException ( ) ; } } ) ; "<AssertPlaceHolder>" ; } apply ( ) { com . m3 . scalaflavor4j . MainFunction main = new com . m3 . scalaflavor4j . MainFunction ( ) { public void apply ( java . lang . String [ ] args ) throws com . m3 . scalaflavor4j . Exception { print . apply ( args . length ) ; com . m3 . scalaflavor4j . Seq . apply ( args ) . foreach ( new com . m3 . scalaflavor4j . VoidF1 < java . lang . String > ( ) { public void apply ( java . lang . String arg ) throws com . m3 . scalaflavor4j . Exception { print . apply ( arg ) ; } } ) ; } } ; main . apply ( new java . lang . String [ ] { "a" , "b" } ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "catched" ) ) )
testScrapeStringArrayNodes ( ) { java . lang . String xmlInput = "<string-array<sp>name='name2'<sp>gender='unknown'>" 2 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 3 + "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 5 ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" 0 ) + "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" ) + "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 7 ) + "<item>Value11<sp>f1</item>" ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" 0 ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" ) + "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 1 ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" 0 ) + "<string-array<sp>name='name2_m2gender'<sp>gender='male'>" ) + "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 9 ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" 0 ) + "<string-array<sp>name='name3'<sp>gender='unknown'></string-array>" ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" ) + "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 6 ) + "<string-array<sp>name='name2'<sp>gender='unknown'>" 0 ) ; java . util . EnumMap < com . facebook . buck . android . StringResources . Gender , java . util . List < java . lang . String > > map1 = com . google . common . collect . Maps . newEnumMap ( com . facebook . buck . android . StringResources . Gender . class ) ; map1 . put ( Gender . unknown , com . google . common . collect . ImmutableList . of ( "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 8 , "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 2 ) ) ; map1 . put ( Gender . female , com . google . common . collect . ImmutableList . of ( "Value12<sp>f1" , "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 4 ) ) ; java . util . EnumMap < com . facebook . buck . android . StringResources . Gender , java . util . List < java . lang . String > > map2 = com . google . common . collect . Maps . newEnumMap ( com . facebook . buck . android . StringResources . Gender . class ) ; map2 . put ( Gender . unknown , com . google . common . collect . ImmutableList . of ( "<string-array<sp>name='name2'<sp>gender='unknown'>" 1 ) ) ; map2 . put ( Gender . male , com . google . common . collect . ImmutableList . of ( "Value21<sp>m2" ) ) ; org . w3c . dom . NodeList arrayNodes = com . facebook . buck . util . xml . XmlDomParser . parse ( createResourcesXml ( xmlInput ) ) . getElementsByTagName ( "string-array" ) ; java . util . Map < java . lang . Integer , java . util . EnumMap < com . facebook . buck . android . StringResources . Gender , com . google . common . collect . ImmutableList < java . lang . String > > > arraysMap = new java . util . TreeMap ( ) ; com . facebook . buck . android . CompileStringsStep step = createNonExecutingStep ( ) ; step . addArrayResourceNameToIdMap ( com . google . common . collect . ImmutableMap . of ( "name1" , 1 , "name2" , 2 , "<string-array<sp>name='name1_f1gender'<sp>gender='female'>" 0 , 3 ) ) ; step . scrapeStringArrayNodes ( arrayNodes , arraysMap ) ; "<AssertPlaceHolder>" ; } of ( java . nio . file . Path , java . nio . file . Path , java . nio . file . Path , com . facebook . buck . io . filesystem . ProjectFilesystemView ) { return new com . facebook . buck . parser . manifest . BuildFileManifestCache ( superRootPath , rootPath , buildFileName , fileSystemView ) ; }
org . junit . Assert . assertEquals ( "<string-array<sp>name='name2'<sp>gender='unknown'>" 3 , com . google . common . collect . ImmutableMap . of ( 1 , map1 , 2 , map2 ) , arraysMap )
worksInRepeatSection ( ) { java . lang . String expectedMicrohomology = "GTAACCAGGAGTGTATT" ; java . lang . String refGenome = "CGTAACCAGGAGTGTATTGTAACCAGGAGTGTATTGTAACCAGGAGTGTATTGTAACCAGGAGTGTATTGTAG" ; java . lang . String ref = "CGTAACCAGGAGTGTATT" ; "<AssertPlaceHolder>" ; } microhomologyAtDelete ( int , java . lang . String , java . lang . String ) { if ( ( sequence . length ( ) ) < ( position + ( ref . length ( ) ) ) ) { com . hartwig . hmftools . common . variant . Microhomology . LOGGER . warn ( "Attempt<sp>to<sp>determine<sp>microhomology<sp>outside<sp>of<sp>sequence<sp>length" ) ; return org . apache . logging . log4j . util . Strings . EMPTY ; } java . lang . String result = com . hartwig . hmftools . common . variant . Microhomology . commonPrefix ( sequence . substring ( ( position + 1 ) ) , sequence . substring ( ( ( ( position + 1 ) + ( ref . length ( ) ) ) - 1 ) ) , ( ( ref . length ( ) ) - 1 ) ) ; for ( int i = position ; i >= 0 ; i -- ) { final java . lang . String earlierPrefix = com . hartwig . hmftools . common . variant . Microhomology . commonPrefix ( sequence . substring ( i ) , sequence . substring ( ( ( i + ( ref . length ( ) ) ) - 1 ) ) , ( ( ref . length ( ) ) - 1 ) ) ; if ( ( earlierPrefix . length ( ) ) > ( result . length ( ) ) ) { result = earlierPrefix ; } else { return result ; } } return result ; }
org . junit . Assert . assertEquals ( expectedMicrohomology , com . hartwig . hmftools . common . variant . Microhomology . microhomologyAtDelete ( 0 , refGenome , ref ) )
testStdev1 ( ) { double [ ] [ ] ind = new double [ ] [ ] { new double [ ] { 5.1 , 3.5 , 1.4 } , new double [ ] { 4.9 , 3.0 , 1.4 } , new double [ ] { 4.7 , 3.2 , 1.3 } } ; org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . create ( ind ) ; org . nd4j . linalg . api . ndarray . INDArray stdev = in . std ( 1 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.855622088 , 1.7521415468 , 1.7039170559 } ) ; "<AssertPlaceHolder>" ; } create ( float [ ] , int [ ] , long ) { shape = org . nd4j . linalg . factory . Nd4j . getEnsuredShape ( shape ) ; if ( ( shape . length ) == 1 ) { if ( ( shape [ 0 ] ) == ( data . length ) ) { shape = new int [ ] { 1 , data . length } ; } else throw new org . nd4j . linalg . exception . ND4JIllegalStateException ( ( ( ( "Shape<sp>of<sp>the<sp>new<sp>array<sp>" + ( org . nd4j . linalg . factory . Arrays . toString ( shape ) ) ) + "<sp>doesn't<sp>match<sp>data<sp>length:<sp>" ) + ( data . length ) ) ) ; } org . nd4j . linalg . factory . Nd4j . checkShapeValues ( data . length , shape ) ; org . nd4j . linalg . factory . INDArray ret = org . nd4j . linalg . factory . Nd4j . INSTANCE . create ( data , shape , offset , org . nd4j . linalg . factory . Nd4j . order ( ) ) ; org . nd4j . linalg . factory . Nd4j . logCreationIfNecessary ( ret ) ; return ret ; }
org . junit . Assert . assertEquals ( exp , stdev )
testSnapshot ( ) { io . atomix . primitive . service . ServiceContext context = mock ( io . atomix . primitive . service . ServiceContext . class ) ; when ( context . serviceType ( ) ) . thenReturn ( io . atomix . core . set . DistributedSetType . instance ( ) ) ; when ( context . serviceName ( ) ) . thenReturn ( "test" ) ; when ( context . serviceId ( ) ) . thenReturn ( io . atomix . primitive . PrimitiveId . from ( 1 ) ) ; when ( context . wallClock ( ) ) . thenReturn ( new io . atomix . utils . time . WallClock ( ) ) ; io . atomix . primitive . session . Session session = mock ( io . atomix . primitive . session . Session . class ) ; when ( session . sessionId ( ) ) . thenReturn ( io . atomix . primitive . session . SessionId . from ( 1 ) ) ; io . atomix . core . queue . impl . DefaultDistributedQueueService service = new io . atomix . core . queue . impl . DefaultDistributedQueueService ( ) ; service . init ( context ) ; service . add ( "foo" ) ; io . atomix . storage . buffer . Buffer buffer = io . atomix . storage . buffer . HeapBuffer . allocate ( ) ; service . backup ( new io . atomix . primitive . service . impl . DefaultBackupOutput ( buffer , service . serializer ( ) ) ) ; service = new io . atomix . core . queue . impl . DefaultDistributedQueueService ( ) ; service . restore ( new io . atomix . primitive . service . impl . DefaultBackupInput ( buffer . flip ( ) , service . serializer ( ) ) ) ; "<AssertPlaceHolder>" ; } remove ( ) { return configure ( Type . INACTIVE ) ; }
org . junit . Assert . assertEquals ( "foo" , service . remove ( ) )
testEnteredManyThrds ( ) { System . out . println ( "enteredManyThrds" ) ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 4096 ) ; final java . util . concurrent . atomic . AtomicBoolean rslt = new java . util . concurrent . atomic . AtomicBoolean ( true ) ; final java . lang . Object lock = new java . lang . Object ( ) ; java . lang . Thread [ ] thrds = new java . lang . Thread [ 4096 ] ; for ( int i = 0 ; i < 4096 ; i ++ ) { thrds [ i ] = new java . lang . Thread ( new java . lang . Runnable ( ) { java . lang . Object myval = new java . lang . Object ( ) ; public void run ( ) { synchronized ( lock ) { boolean outcome = map . enter ( myval ) ; outcome = outcome && ( myval . equals ( map . get ( ) ) ) ; rslt . compareAndSet ( true , outcome ) ; latch . countDown ( ) ; } } } , ( "Thrd#" + i ) ) ; } for ( int i = 4095 ; i >= 0 ; i -- ) { thrds [ i ] . start ( ) ; } latch . await ( ) ; "<AssertPlaceHolder>" ; } get ( ) { latch . await ( ) ; return data ; }
org . junit . Assert . assertTrue ( rslt . get ( ) )
initiateMultipartUpload ( ) { final java . lang . String bucketName = "bucket" ; createBucketRestCall ( bucketName ) ; final java . lang . String objectName = "object" ; java . lang . String objectKey = ( bucketName + ( alluxio . AlluxioURI . SEPARATOR ) ) + objectName ; java . lang . String result = initiateMultipartUploadRestCall ( objectKey ) ; java . lang . String multipartTempDir = alluxio . proxy . s3 . S3RestUtils . getMultipartTemporaryDirForObject ( ( ( alluxio . AlluxioURI . SEPARATOR ) + bucketName ) , objectName ) ; alluxio . client . file . URIStatus status = mFileSystem . getStatus ( new alluxio . AlluxioURI ( multipartTempDir ) ) ; long tempDirId = status . getFileId ( ) ; alluxio . proxy . s3 . InitiateMultipartUploadResult expected = new alluxio . proxy . s3 . InitiateMultipartUploadResult ( bucketName , objectName , java . lang . Long . toString ( tempDirId ) ) ; java . lang . String expectedResult = alluxio . client . rest . S3ClientRestApiTest . XML_MAPPER . writeValueAsString ( expected ) ; "<AssertPlaceHolder>" ; } getFileId ( ) { return mFileId ; }
org . junit . Assert . assertEquals ( expectedResult , result )
testRemoveNegative ( ) { java . util . Set < java . lang . Integer > test = new edu . ucla . sspace . util . primitive . CompactIntSet ( ) ; "<AssertPlaceHolder>" ; } remove ( java . lang . Object ) { if ( ! ( o instanceof edu . ucla . sspace . graph . WeightedDirectedTypedEdge ) ) return false ; @ edu . ucla . sspace . graph . SuppressWarnings ( "unchecked" ) edu . ucla . sspace . graph . WeightedDirectedTypedEdge < T > e = ( ( edu . ucla . sspace . graph . WeightedDirectedTypedEdge < T > ) ( o ) ) ; if ( ( e . from ( ) ) == ( rootVertex ) ) { return outEdges . remove ( e . to ( ) , e ) ; } else if ( ( e . to ( ) ) == ( rootVertex ) ) { return inEdges . remove ( e . from ( ) , e ) ; } return false ; }
org . junit . Assert . assertFalse ( test . remove ( ( - 1 ) ) )
isSameNode_differentText ( ) { final org . exist . dom . persistent . DocumentImpl doc = org . easymock . EasyMock . createMock ( org . exist . dom . persistent . DocumentImpl . class ) ; replay ( doc ) ; final org . exist . dom . persistent . ElementImpl elem = new org . exist . dom . persistent . ElementImpl ( ) ; elem . setOwnerDocument ( doc ) ; elem . setNodeId ( new org . exist . numbering . DLN ( "1.2" ) ) ; final org . exist . dom . persistent . ElementImpl elem2 = new org . exist . dom . persistent . ElementImpl ( ) ; elem2 . setOwnerDocument ( doc ) ; elem2 . setNodeId ( new org . exist . numbering . DLN ( "1.7" ) ) ; "<AssertPlaceHolder>" ; verify ( doc ) ; } isSameNode ( org . w3c . dom . Node ) { if ( other instanceof org . exist . dom . persistent . DocumentImpl ) { return ( this . docId ) == ( ( ( org . exist . dom . persistent . DocumentImpl ) ( other ) ) . getDocId ( ) ) ; } else { return false ; } }
org . junit . Assert . assertFalse ( elem . isSameNode ( elem2 ) )
createDefaultInstance ( ) { com . tobedevoured . naether . maven . Project mavenProject = new com . tobedevoured . naether . maven . Project ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( mavenProject )
testMax02 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "[5,4,3,2,1].stream().max()" , java . lang . Object . class ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl . Cipher . idMap . get ( java . lang . Integer . valueOf ( cipherId ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 5 ) , ( ( org . apache . el . stream . Optional ) ( result ) ) . get ( ) )
testVectorOneHotLabel ( ) { org . nd4j . linalg . dataset . DataSet dataSet = new org . nd4j . linalg . dataset . DataSet ( org . nd4j . linalg . factory . Nd4j . create ( 2 , 2 ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 0 , 1 } , new double [ ] { 1 , 0 } } ) ) ; org . datavec . spark . transform . model . SingleCSVRecord singleCsvRecord = org . datavec . spark . transform . model . SingleCSVRecord . fromRow ( dataSet . get ( 0 ) ) ; "<AssertPlaceHolder>" ; } getValues ( ) { java . lang . String info = "" ; for ( int i = 0 ; i < ( vsL . size ( ) ) ; i ++ ) { info += ( vsL . get ( i ) ) + "|" ; } return info ; }
org . junit . Assert . assertEquals ( 3 , singleCsvRecord . getValues ( ) . size ( ) )
testCyclicGraph ( ) { org . antlr . misc . Graph < java . lang . String > g = new org . antlr . misc . Graph < java . lang . String > ( ) ; g . addEdge ( "A" , "B" ) ; g . addEdge ( "B" , "C" ) ; g . addEdge ( "C" , "A" ) ; g . addEdge ( "C" , "D" ) ; java . lang . String expecting = "[D,<sp>C,<sp>B,<sp>A]" ; java . util . List < java . lang . String > nodes = g . sort ( ) ; java . lang . String result = nodes . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( "[" + ( grammar . name ) ) + "." ) + ( name ) ) + ",index=" ) + ( index ) ) + ",line=" ) + ( tree . getToken ( ) . getLine ( ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( expecting , result )
contributorCanDeleteOrganizationalUnitTest ( ) { doReturn ( true ) . when ( libraryPermissions ) . userIsAtLeast ( eq ( ContributorType . OWNER ) , any ( ) ) ; "<AssertPlaceHolder>" ; } userCanDeleteOrganizationalUnit ( org . guvnor . structure . organizationalunit . OrganizationalUnit ) { return ( userIsAtLeast ( ContributorType . OWNER , organizationalUnit . getContributors ( ) ) ) || ( organizationalUnitController . canDeleteOrgUnit ( organizationalUnit ) ) ; }
org . junit . Assert . assertTrue ( libraryPermissions . userCanDeleteOrganizationalUnit ( mock ( org . guvnor . structure . organizationalunit . OrganizationalUnit . class ) ) )
testDefaultLocaleIsNull ( ) { com . eclipsesource . tabris . tracking . TrackingInfo trackingInfo = new com . eclipsesource . tabris . tracking . TrackingInfo ( ) ; java . util . Locale locale = trackingInfo . getClientLocale ( ) ; "<AssertPlaceHolder>" ; } getClientLocale ( ) { return clientLocale ; }
org . junit . Assert . assertNull ( locale )
testIssue1137 ( ) { java . util . Enumeration < java . net . NetworkInterface > networkInterfaces = java . net . NetworkInterface . getNetworkInterfaces ( ) ; boolean found = false ; while ( networkInterfaces . hasMoreElements ( ) ) { java . net . NetworkInterface itf = networkInterfaces . nextElement ( ) ; for ( java . net . InterfaceAddress addr : itf . getInterfaceAddresses ( ) ) { if ( ( addr . getAddress ( ) ) instanceof java . net . Inet4Address ) { if ( addr . getAddress ( ) . isLoopbackAddress ( ) ) { found = true ; break ; } } } } "<AssertPlaceHolder>" ; } isLoopbackAddress ( ) { return ( ( ipaddress [ 0 ] ) & 255 ) == 127 ; }
org . junit . Assert . assertTrue ( found )
testCheckForDuplicateFileNamesTabular ( ) { java . text . SimpleDateFormat dateFmt = new java . text . SimpleDateFormat ( "yyyyMMdd" ) ; edu . harvard . iq . dataverse . Dataset dataset = makeDataset ( ) ; edu . harvard . iq . dataverse . DatasetVersion datasetVersion = dataset . getEditVersion ( ) ; datasetVersion . setCreateTime ( dateFmt . parse ( "20001012" ) ) ; datasetVersion . setLastUpdateTime ( datasetVersion . getLastUpdateTime ( ) ) ; datasetVersion . setId ( edu . harvard . iq . dataverse . mocks . MocksFactory . nextId ( ) ) ; datasetVersion . setReleaseTime ( dateFmt . parse ( "20010101" ) ) ; datasetVersion . setVersionState ( DatasetVersion . VersionState . RELEASED ) ; datasetVersion . setMinorVersionNumber ( 0L ) ; datasetVersion . setVersionNumber ( 1L ) ; datasetVersion . setFileMetadatas ( new java . util . ArrayList ( ) ) ; java . util . List < edu . harvard . iq . dataverse . DataFile > dataFileList = new java . util . ArrayList ( ) ; edu . harvard . iq . dataverse . DataFile datafile1 = new edu . harvard . iq . dataverse . DataFile ( "application/x-strata" ) ; datafile1 . setStorageIdentifier ( "foobar.dta" ) ; datafile1 . setFilesize ( 200 ) ; datafile1 . setModificationTime ( new java . sql . Timestamp ( new java . util . Date ( ) . getTime ( ) ) ) ; datafile1 . setCreateDate ( new java . sql . Timestamp ( new java . util . Date ( ) . getTime ( ) ) ) ; datafile1 . setPermissionModificationTime ( new java . sql . Timestamp ( new java . util . Date ( ) . getTime ( ) ) ) ; datafile1 . setOwner ( dataset ) ; datafile1 . setIngestDone ( ) ; datafile1 . setChecksumType ( DataFile . ChecksumType . SHA1 ) ; datafile1 . setChecksumValue ( "Unknown" ) ; edu . harvard . iq . dataverse . DataTable dt1 = new edu . harvard . iq . dataverse . DataTable ( ) ; dt1 . setOriginalFileFormat ( "application/x-stata" ) ; datafile1 . setDataTable ( dt1 ) ; edu . harvard . iq . dataverse . FileMetadata fmd1 = new edu . harvard . iq . dataverse . FileMetadata ( ) ; fmd1 . setId ( 1L ) ; fmd1 . setLabel ( "foobar.tab" ) ; fmd1 . setDataFile ( datafile1 ) ; datafile1 . getFileMetadatas ( ) . add ( fmd1 ) ; datasetVersion . getFileMetadatas ( ) . add ( fmd1 ) ; fmd1 . setDatasetVersion ( datasetVersion ) ; edu . harvard . iq . dataverse . DataFile datafile2 = new edu . harvard . iq . dataverse . DataFile ( "application/x-strata" ) ; datafile2 . setStorageIdentifier ( "foobar.dta" ) ; datafile2 . setFilesize ( 200 ) ; datafile2 . setModificationTime ( new java . sql . Timestamp ( new java . util . Date ( ) . getTime ( ) ) ) ; datafile2 . setCreateDate ( new java . sql . Timestamp ( new java . util . Date ( ) . getTime ( ) ) ) ; datafile2 . setPermissionModificationTime ( new java . sql . Timestamp ( new java . util . Date ( ) . getTime ( ) ) ) ; datafile2 . setOwner ( dataset ) ; datafile2 . setIngestDone ( ) ; datafile2 . setChecksumType ( DataFile . ChecksumType . SHA1 ) ; datafile2 . setChecksumValue ( "Unknown" ) ; edu . harvard . iq . dataverse . DataTable dt2 = new edu . harvard . iq . dataverse . DataTable ( ) ; dt2 . setOriginalFileFormat ( "application/x-stata" ) ; datafile2 . setDataTable ( dt2 ) ; edu . harvard . iq . dataverse . FileMetadata fmd2 = new edu . harvard . iq . dataverse . FileMetadata ( ) ; fmd2 . setId ( 2L ) ; fmd2 . setLabel ( "foobar.dta" ) ; fmd2 . setDataFile ( datafile2 ) ; datafile2 . getFileMetadatas ( ) . add ( fmd2 ) ; dataFileList . add ( datafile2 ) ; edu . harvard . iq . dataverse . ingest . IngestUtil . checkForDuplicateFileNamesFinal ( datasetVersion , dataFileList ) ; boolean file2NameAltered = false ; for ( edu . harvard . iq . dataverse . DataFile df : dataFileList ) { if ( df . getFileMetadata ( ) . getLabel ( ) . equals ( "foobar-1.dta" ) ) { file2NameAltered = true ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof edu . harvard . iq . dataverse . ControlledVocabularyValue ) ) { return false ; } edu . harvard . iq . dataverse . ControlledVocabularyValue other = ( ( edu . harvard . iq . dataverse . ControlledVocabularyValue ) ( object ) ) ; return java . util . Objects . equals ( getId ( ) , other . getId ( ) ) ; }
org . junit . Assert . assertEquals ( file2NameAltered , true )
onlyJAppletMethodsAreAvailable ( ) { java . lang . Class < be . fedict . eid . applet . Applet > appletClass = be . fedict . eid . applet . Applet . class ; java . lang . reflect . Method [ ] methods = appletClass . getMethods ( ) ; for ( java . lang . reflect . Method method : methods ) { if ( false == ( method . getDeclaringClass ( ) . equals ( appletClass ) ) ) { continue ; } test . unit . be . fedict . eid . applet . JavascriptTest . LOG . debug ( ( "applet<sp>method:<sp>" + ( method . getName ( ) ) ) ) ; "<AssertPlaceHolder>" ; } } isJAppletMethod ( java . lang . reflect . Method ) { if ( null == ( javax . swing . JApplet . class . getMethod ( method . getName ( ) , method . getParameterTypes ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( isJAppletMethod ( method ) )
testKeySet_emptyTree ( ) { java . util . Set keys = tree . keySet ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . delegate . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( keys . isEmpty ( ) )
builder ( ) { com . querydsl . sql . SQLTemplates templates = com . querydsl . sql . H2Templates . builder ( ) . quote ( ) . newLineToSingleSpace ( ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . querydsl . sql . StatementOptions ( maxFieldSize , maxRows , queryTimeout , fetchSize ) ; }
org . junit . Assert . assertNotNull ( templates )
testAddNote ( ) { uk . ac . bbsrc . tgac . miso . core . data . Sample paramSample = new uk . ac . bbsrc . tgac . miso . core . data . impl . SampleImpl ( ) ; paramSample . setId ( 1L ) ; paramSample . setAlias ( "paramSample" ) ; com . eaglegenomics . simlims . core . Note note = new com . eaglegenomics . simlims . core . Note ( ) ; uk . ac . bbsrc . tgac . miso . core . data . Sample dbSample = new uk . ac . bbsrc . tgac . miso . core . data . impl . SampleImpl ( ) ; dbSample . setId ( paramSample . getId ( ) ) ; dbSample . setAlias ( "persistedSample" ) ; org . mockito . Mockito . when ( sampleStore . get ( paramSample . getId ( ) ) ) . thenReturn ( dbSample ) ; sut . addNote ( paramSample , note ) ; org . mockito . ArgumentCaptor < uk . ac . bbsrc . tgac . miso . core . data . Sample > capture = org . mockito . ArgumentCaptor . forClass ( uk . ac . bbsrc . tgac . miso . core . data . Sample . class ) ; org . mockito . Mockito . verify ( sampleStore ) . save ( capture . capture ( ) ) ; uk . ac . bbsrc . tgac . miso . core . data . Sample savedSample = capture . getValue ( ) ; "<AssertPlaceHolder>" ; } getNotes ( ) { return notes ; }
org . junit . Assert . assertEquals ( 1 , savedSample . getNotes ( ) . size ( ) )
validateResultsWarnings ( ) { javax . xml . transform . Source testXml = new javax . xml . transform . stream . StreamSource ( new org . springframework . core . io . ClassPathResource ( sample_wrong ) . getInputStream ( ) ) ; try { schematron . validate ( testXml , new org . openehealth . ipf . commons . xml . SchematronProfile ( "schematron/cda_phmr/templates/2.16.840.1.113883.10.20.9.14.sch" ) ) ; org . junit . Assert . fail ( ) ; } catch ( org . openehealth . ipf . commons . core . modules . api . ValidationException ex ) { "<AssertPlaceHolder>" ; } } getCauses ( ) { return causes ; }
org . junit . Assert . assertEquals ( 2 , ex . getCauses ( ) . length )
doubleType ( ) { expect ( mock . doubleReturningMethod ( 4 ) ) . andReturn ( 12.0 ) ; replay ( mock ) ; "<AssertPlaceHolder>" ; verify ( mock ) ; } replay ( java . lang . Object [ ] ) { for ( int i = 0 ; i < ( mocks . length ) ; i ++ ) { try { org . easymock . EasyMock . getControl ( mocks [ i ] ) . replay ( ) ; } catch ( java . lang . RuntimeException e ) { throw org . easymock . EasyMock . getRuntimeException ( mocks . length , i , e ) ; } catch ( java . lang . AssertionError e ) { throw org . easymock . EasyMock . getAssertionError ( mocks . length , i , e ) ; } } }
org . junit . Assert . assertEquals ( 12.0 , mock . doubleReturningMethod ( 4 ) , 0.0 )
test ( ) { java . util . List < nl . bzk . brp . bevraging . commands . BevraagInfo > infos = new java . util . ArrayList < nl . bzk . brp . bevraging . commands . BevraagInfo > ( ) ; infos . add ( new nl . bzk . brp . bevraging . commands . BevraagInfo ( "bsn" , "OK" , 123 ) ) ; infos . add ( new nl . bzk . brp . bevraging . commands . BevraagInfo ( "bsn" , "OK" , 286 ) ) ; infos . add ( new nl . bzk . brp . bevraging . commands . BevraagInfo ( "bsn" , "OK" , 354 ) ) ; infos . add ( new nl . bzk . brp . bevraging . commands . BevraagInfo ( "bsn2" , "FAIL" , 31 ) ) ; infos . add ( new nl . bzk . brp . bevraging . commands . BevraagInfo ( "bsn2" , "FAIL" , 41 ) ) ; infos . add ( new nl . bzk . brp . bevraging . commands . BevraagInfo ( "bsn2" , "FAIL" , 23 ) ) ; java . util . Map < java . lang . String , java . lang . Object > dbinfo = new java . util . HashMap < java . lang . String , java . lang . Object > ( 1 ) ; dbinfo . put ( "cachedEntities" , java . util . Collections . emptyList ( ) ) ; when ( context . get ( ContextParameterNames . TASK_INFO_LIJST ) ) . thenReturn ( infos ) ; when ( context . get ( ContextParameterNames . SCENARIO ) ) . thenReturn ( "RapporteerStapTest" ) ; when ( context . get ( ContextParameterNames . BSNLIJST ) ) . thenReturn ( java . util . Collections . emptyList ( ) ) ; when ( context . get ( ContextParameterNames . AANTAL_THREADS ) ) . thenReturn ( 2 ) ; when ( context . get ( ContextParameterNames . AANTAL_PERSOONSLIJSTEN ) ) . thenReturn ( 200 ) ; when ( context . get ( ContextParameterNames . DATABASE_INFO ) ) . thenReturn ( dbinfo ) ; when ( context . get ( ContextParameterNames . COMMENT ) ) . thenReturn ( "Foo<sp>bar" ) ; when ( context . get ( ContextParameterNames . TIMING ) ) . thenReturn ( "super<sp>fast" ) ; boolean result = rapporteerStap . postprocess ( context , null ) ; "<AssertPlaceHolder>" ; } postprocess ( org . apache . commons . chain . Context , java . lang . Exception ) { java . util . List < nl . bzk . brp . bevraging . commands . BevraagInfo > taskInfo = ( ( java . util . List ) ( context . get ( ContextParameterNames . TASK_INFO_LIJST ) ) ) ; if ( ( taskInfo == null ) || ( taskInfo . isEmpty ( ) ) ) { nl . bzk . brp . bevraging . commands . RapporteerStap . LOGGER . warn ( "Geen<sp>data<sp>beschikbaar<sp>voor<sp>performance<sp>rapportage" ) ; return PROCESSING_COMPLETE ; } java . util . List < java . lang . String > report = new java . util . ArrayList < java . lang . String > ( ) ; this . parameterReport ( report , context ) ; this . databaseReport ( report , context ) ; this . percentileReport ( report , context ) ; this . resultReport ( report , context ) ; this . timingReport ( report , context ) ; this . commentReport ( report , context ) ; this . finishReport ( report ) ; java . lang . String naam = ( ( context . get ( ContextParameterNames . FILENAME ) ) != null ) ? ( ( java . lang . String ) ( context . get ( ContextParameterNames . FILENAME ) ) ) : ( ( java . lang . String ) ( context . get ( ContextParameterNames . SCENARIO ) ) ) ; this . write ( naam , report ) ; for ( java . lang . String line : report ) { nl . bzk . brp . bevraging . commands . RapporteerStap . LOGGER . info ( line ) ; } return CONTINUE_PROCESSING ; }
org . junit . Assert . assertFalse ( result )
readContentOnlyRoom ( ) { java . lang . String content = readFile ( "RoomContentOnly.xml" ) ; org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer ( ) . getEntitySet ( "Rooms" ) ; java . io . InputStream contentBody = createContentAsStream ( content ) ; org . apache . olingo . odata2 . client . core . ep . deserializer . XmlEntityDeserializer xec = new org . apache . olingo . odata2 . client . core . ep . deserializer . XmlEntityDeserializer ( ) ; org . apache . olingo . odata2 . client . api . ep . EntityStream stream = new org . apache . olingo . odata2 . client . api . ep . EntityStream ( ) ; stream . setReadProperties ( org . apache . olingo . odata2 . client . api . ep . DeserializerProperties . init ( ) . build ( ) ) ; stream . setContent ( contentBody ) ; org . apache . olingo . odata2 . api . ep . entry . ODataEntry result = xec . readEntry ( entitySet , stream ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; }
org . junit . Assert . assertEquals ( 4 , result . getProperties ( ) . size ( ) )
testTargetOverridesDefault ( ) { project . setNewProperty ( MagicNames . BUILD_JAVAC_TARGET , "1.4" ) ; javac . setTarget ( "1.5" ) ; "<AssertPlaceHolder>" ; } getTarget ( ) { return target ; }
org . junit . Assert . assertEquals ( "1.5" , javac . getTarget ( ) )
useTrinityIndex ( ) { org . neo4j . graphdb . index . IndexManager index = org . neo4j . rest . graphdb . MatrixDatabaseTest . graphDb . index ( ) ; org . neo4j . graphdb . index . Index < org . neo4j . graphdb . Node > goodGuys = index . forNodes ( "heroes" ) ; org . neo4j . graphdb . index . IndexHits < org . neo4j . graphdb . Node > hits = goodGuys . get ( "name" , "Trinity" ) ; org . neo4j . graphdb . Node trinity = hits . getSingle ( ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { java . lang . Object value = getPropertyValue ( key ) ; if ( value == null ) { throw new org . neo4j . graphdb . NotFoundException ( ( ( ( "'" + key ) + "'<sp>on<sp>" ) + ( this ) ) ) ; } return value ; }
org . junit . Assert . assertEquals ( "Trinity" , trinity . getProperty ( "name" ) )
homonymBacteria ( ) { org . eol . globi . domain . TaxonImpl taxon = new org . eol . globi . domain . TaxonImpl ( ) ; taxon . setName ( "Bacteria" ) ; taxon . setExternalId ( "some:id" ) ; taxon . setPath ( "<sp>|<sp>Eukaryota<sp>|<sp>Opisthokonta<sp>|<sp>Metazoa<sp>|<sp>Eumetazoa<sp>|<sp>Bilateria<sp>|<sp>Protostomia<sp>|<sp>Ecdysozoa<sp>|<sp>Panarthropoda<sp>|<sp>Arthropoda<sp>|<sp>Mandibulata<sp>|<sp>Pancrustacea<sp>|<sp>Hexapoda<sp>|<sp>Insecta<sp>|<sp>Dicondylia<sp>|<sp>Pterygota<sp>|<sp>Neoptera<sp>|<sp>Orthopteroidea<sp>|<sp>Phasmatodea<sp>|<sp>Verophasmatodea<sp>|<sp>Anareolatae<sp>|<sp>Diapheromeridae<sp>|<sp>Diapheromerinae<sp>|<sp>Diapheromerini<sp>|<sp>Bacteria" ) ; taxon . setPathNames ( "<sp>|<sp>superkingdom<sp>|<sp>|<sp>kingdom<sp>|<sp>|<sp>|<sp>|<sp>|<sp>|<sp>phylum<sp>|<sp>|<sp>|<sp>superclass<sp>|<sp>class<sp>|<sp>|<sp>|<sp>subclass<sp>|<sp>infraclass<sp>|<sp>order<sp>|<sp>suborder<sp>|<sp>infraorder<sp>|<sp>family<sp>|<sp>subfamily<sp>|<sp>tribe<sp>|<sp>genus" ) ; org . eol . globi . domain . TaxonImpl otherTaxon = new org . eol . globi . domain . TaxonImpl ( ) ; otherTaxon . setName ( "Bacteria" ) ; otherTaxon . setExternalId ( "some:otherid" ) ; otherTaxon . setPath ( "Bacteria" ) ; otherTaxon . setPathNames ( "kingdom" ) ; "<AssertPlaceHolder>" ; } likelyHomonym ( org . eol . globi . domain . Taxon , org . eol . globi . domain . Taxon ) { if ( ( org . eol . globi . service . TaxonUtil . isResolved ( taxonA ) ) && ( org . eol . globi . service . TaxonUtil . isResolved ( taxonB ) ) ) { java . util . Map < java . lang . String , java . lang . String > pathMapA = org . eol . globi . service . TaxonUtil . toPathNameMap ( taxonA ) ; java . util . Map < java . lang . String , java . lang . String > pathMapB = org . eol . globi . service . TaxonUtil . toPathNameMap ( taxonB ) ; return ( org . eol . globi . service . TaxonUtil . hasHigherOrderTaxaMismatch ( pathMapA , pathMapB ) ) || ( org . eol . globi . service . TaxonUtil . taxonPathLengthMismatch ( pathMapA , pathMapB ) ) ; } else { return false ; } }
org . junit . Assert . assertThat ( org . eol . globi . service . TaxonUtil . likelyHomonym ( taxon , otherTaxon ) , org . hamcrest . core . Is . is ( true ) )
( ) { com . fujitsu . dc . core . model . lock . Lock lock = com . fujitsu . dc . core . model . lock . LockManager . getLock ( Lock . CATEGORY_ODATA , "aaa" , null , null ) ; lock . release ( ) ; com . fujitsu . dc . core . model . lock . Lock lock2 = com . fujitsu . dc . core . model . lock . LockManager . getLock ( Lock . CATEGORY_ODATA , "aaa" , null , null ) ; "<AssertPlaceHolder>" ; lock2 . release ( ) ; } release ( ) { com . fujitsu . dc . core . model . lock . LockManager . releaseLock ( this . fullKey ) ; }
org . junit . Assert . assertNotNull ( lock2 )
whenCommittedWhileWaiting ( ) { barrier = new org . multiverse . commitbarriers . CountDownCommitBarrier ( 1 ) ; org . multiverse . TestThread t = new org . multiverse . TestThread ( ) { @ org . multiverse . commitbarriers . Override public void doRun ( ) throws org . multiverse . commitbarriers . Exception { barrier . awaitOpenUninterruptibly ( ) ; } } ; t . start ( ) ; sleepMs ( 500 ) ; barrier . countDown ( ) ; joinAll ( t ) ; "<AssertPlaceHolder>" ; } isCommitted ( ) { return ( status ) == ( org . multiverse . commitbarriers . CommitBarrier . Status . Committed ) ; }
org . junit . Assert . assertTrue ( barrier . isCommitted ( ) )
testHerschikStapelsStapelDoelStapelNietLeeg ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Stapel stapel0 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Stapel ( bestaandePersoon , "09" , 0 ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Stapel stapel1 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Stapel ( bestaandePersoon , "09" , 1 ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen sv0 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen ( stapel0 , 0 , maakAdministratieveHandeling ( nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . verwerker . DATUMTIJD_STEMPEL_OUD ) ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen sv10 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen ( stapel1 , 0 , maakAdministratieveHandeling ( nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . verwerker . DATUMTIJD_STEMPEL_OUD ) ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen sv11 = new nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen ( stapel1 , 1 , maakAdministratieveHandeling ( nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . verwerker . DATUMTIJD_STEMPEL_OUD ) ) ; stapel0 . addStapelVoorkomen ( sv0 ) ; stapel1 . addStapelVoorkomen ( sv10 ) ; stapel1 . addStapelVoorkomen ( sv11 ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . StapelDecorator sd0 = nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . StapelDecorator . decorate ( stapel0 ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . StapelDecorator sd1 = nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . StapelDecorator . decorate ( stapel1 ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . Verschil verschil0 = new nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . Verschil ( new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . IstSleutel ( stapel0 , nl . bzk . algemeenbrp . dal . domein . brp . entity . Stapel . VELD_VOLGNUMMER , true ) , sd0 , sd1 , nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . VerschilType . ELEMENT_AANGEPAST , null , null ) ; bestaandePersoon . addStapel ( stapel0 ) ; bestaandePersoon . addStapel ( stapel1 ) ; "<AssertPlaceHolder>" ; vergelijkerResultaat . voegToeOfVervangVerschil ( verschil0 ) ; verwerker . verwerkWijzigingen ( vergelijkerResultaat , context ) ; } getStapels ( ) { return new java . util . LinkedHashSet ( stapels ) ; }
org . junit . Assert . assertEquals ( 2 , bestaandePersoon . getStapels ( ) . size ( ) )
testSerialization ( ) { org . jfree . data . general . DefaultKeyedValueDataset d1 = new org . jfree . data . general . DefaultKeyedValueDataset ( "Test" , 25.3 ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( d1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . data . general . DefaultKeyedValueDataset d2 = ( ( org . jfree . data . general . DefaultKeyedValueDataset ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( d1 , d2 )
validateThrowIOExceptionWhenNoExist ( ) { org . powermock . api . support . membermodification . MemberModifier . stub ( org . powermock . api . support . membermodification . MemberModifier . method ( org . pentaho . hadoop . shim . common . ShellPrevalidator . class , "doesFileExist" , java . lang . String . class ) ) . toReturn ( false ) ; org . powermock . api . support . membermodification . MemberModifier . stub ( org . powermock . api . support . membermodification . MemberModifier . method ( org . pentaho . hadoop . shim . common . ShellPrevalidator . class , "isWindows" ) ) . toReturn ( true ) ; boolean exist = org . pentaho . hadoop . shim . common . ShellPrevalidator . doesWinutilsFileExist ( ) ; "<AssertPlaceHolder>" ; } doesWinutilsFileExist ( ) { if ( org . pentaho . hadoop . shim . common . ShellPrevalidator . isWindows ( ) ) { java . lang . String fullExeName = ( ( ( ( org . pentaho . hadoop . shim . common . ShellPrevalidator . checkHadoopHome ( ) ) + ( java . io . File . separator ) ) + "bin" ) + ( java . io . File . separator ) ) + "winutils.exe" ; if ( ! ( org . pentaho . hadoop . shim . common . ShellPrevalidator . doesFileExist ( fullExeName ) ) ) { throw new java . io . IOException ( ( ( "Could<sp>not<sp>locate<sp>executable<sp>" + fullExeName ) + "<sp>in<sp>the<sp>Hadoop<sp>binaries." ) ) ; } } return true ; }
org . junit . Assert . assertEquals ( false , exist )
shouldUseBetweenSymmetric ( ) { int min = uniqueInt ( ) ; int max = uniqueInt ( ) ; java . lang . String actual = annis . sqlgen . SqlConstraints . between ( "lhs" , min , max ) ; java . lang . String expected = ( ( "lhs<sp>BETWEEN<sp>SYMMETRIC<sp>" + min ) + "<sp>AND<sp>" ) + max ; "<AssertPlaceHolder>" ; } between ( java . lang . String , int , int ) { return ( ( ( ( ( lhs + "<sp>" ) + "BETWEEN<sp>SYMMETRIC" ) + "<sp>" ) + min ) + "<sp>AND<sp>" ) + max ; }
org . junit . Assert . assertEquals ( expected , actual )
withStartAt ( ) { doAnswer ( com . google . cloud . firestore . LocalFirestoreHelper . queryResponse ( ) ) . when ( firestoreMock ) . streamRequest ( runQuery . capture ( ) , streamObserverCapture . capture ( ) , org . mockito . Matchers . < com . google . api . gax . rpc . ServerStreamingCallable > any ( ) ) ; query . orderBy ( "foo" ) . orderBy ( com . google . cloud . firestore . FieldPath . documentId ( ) ) . startAt ( "bar" , "foo" ) . get ( ) . get ( ) ; com . google . firestore . v1 . Value documentBoundary = com . google . firestore . v1 . Value . newBuilder ( ) . setReferenceValue ( ( ( query . getResourcePath ( ) . toString ( ) ) + "/foo" ) ) . build ( ) ; com . google . firestore . v1 . RunQueryRequest queryRequest = com . google . cloud . firestore . LocalFirestoreHelper . query ( com . google . cloud . firestore . LocalFirestoreHelper . order ( "foo" , StructuredQuery . Direction . ASCENDING ) , com . google . cloud . firestore . LocalFirestoreHelper . order ( "__name__" , StructuredQuery . Direction . ASCENDING ) , com . google . cloud . firestore . LocalFirestoreHelper . startAt ( true ) , com . google . cloud . firestore . LocalFirestoreHelper . startAt ( documentBoundary , true ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( queryRequest , runQuery . getValue ( ) )
testDefaultLoadedThrowOnErrorWithSetSystemProperty ( ) { java . lang . String testSqoopRethrowProperty = "" ; java . lang . System . setProperty ( org . apache . sqoop . Sqoop . SQOOP_RETHROW_PROPERTY , testSqoopRethrowProperty ) ; org . apache . sqoop . SqoopOptions out = new org . apache . sqoop . SqoopOptions ( ) ; java . util . Properties props = out . writeProperties ( ) ; org . apache . sqoop . SqoopOptions opts = new org . apache . sqoop . SqoopOptions ( ) ; opts . loadProperties ( props ) ; "<AssertPlaceHolder>" ; } isThrowOnError ( ) { return throwOnError ; }
org . junit . Assert . assertTrue ( opts . isThrowOnError ( ) )
convertStringToInteger ( ) { "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( destinationClass . isPrimitive ( ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToPrimitiveWrapper ( value , destinationClass ) ) ) ; } else if ( value == null ) { return null ; } else if ( destinationClass . isInstance ( value ) ) { return ( ( T ) ( value ) ) ; } else if ( org . slim3 . util . Number . class . isAssignableFrom ( destinationClass ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToNumber ( value , destinationClass ) ) ) ; } else if ( java . util . Date . class . isAssignableFrom ( destinationClass ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToDate ( value , destinationClass ) ) ) ; } else if ( destinationClass == ( org . slim3 . util . Boolean . class ) ) { return ( ( T ) ( org . slim3 . util . BooleanUtil . toBoolean ( value ) ) ) ; } else if ( destinationClass . isEnum ( ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToEnum ( value , destinationClass ) ) ) ; } else if ( destinationClass == ( java . lang . String . class ) ) { return ( ( T ) ( value . toString ( ) ) ) ; } else if ( destinationClass == ( com . google . appengine . api . datastore . Key . class ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToKey ( value ) ) ) ; } else { throw new java . lang . IllegalArgumentException ( ( ( ( ( "The<sp>class(" + ( value . getClass ( ) . getName ( ) ) ) + ")<sp>can<sp>not<sp>be<sp>converted<sp>to<sp>the<sp>class(" ) + ( destinationClass . getName ( ) ) ) + ")." ) ) ; } }
org . junit . Assert . assertThat ( org . slim3 . util . ConversionUtil . convert ( "1" , org . slim3 . util . Integer . class ) , org . hamcrest . CoreMatchers . is ( 1 ) )
testCondition1 ( ) { boolean result = false ; java . lang . String cql = "select<sp>count(id,previous(1,a,b)>10)<sp>as<sp>a<sp>from<sp>S1" ; com . huawei . streaming . cql . semanticanalyzer . parser . IParser parser = com . huawei . streaming . cql . semanticanalyzer . parser . ParserFactory . createApplicationParser ( ) ; com . huawei . streaming . cql . semanticanalyzer . parser . context . SelectStatementContext ast = ( ( com . huawei . streaming . cql . semanticanalyzer . parser . context . SelectStatementContext ) ( parser . parse ( cql ) ) ) ; com . huawei . streaming . cql . hooks . SemanticAnalyzeHook hook = new com . huawei . streaming . cql . hooks . PreviousValidateHook ( ) ; try { hook . validate ( ast ) ; hook . preAnalyze ( null , ast ) ; } catch ( java . lang . Exception e ) { result = true ; } "<AssertPlaceHolder>" ; } preAnalyze ( com . huawei . streaming . cql . DriverContext , com . huawei . streaming . cql . semanticanalyzer . parser . context . ParseContext ) { }
org . junit . Assert . assertTrue ( result )
test_NotPublicClass ( ) { request . setPathInfo ( "/here" ) ; servlet . service ( request , response ) ; "<AssertPlaceHolder>" ; } getAsString ( ) { try { getWriter ( ) . flush ( ) ; return stream . toString ( characterEncoding ) ; } catch ( java . io . UnsupportedEncodingException e ) { throw org . nutz . lang . Lang . wrapThrow ( e ) ; } catch ( java . io . IOException e ) { throw org . nutz . lang . Lang . wrapThrow ( e ) ; } }
org . junit . Assert . assertEquals ( "" , response . getAsString ( ) )
appendNewline ( ) { org . geotools . swing . dialog . JTextReporter . Connection conn = showDialog ( org . geotools . swing . dialog . JTextReporterTest . TITLE , org . geotools . swing . dialog . JTextReporterTest . TEXT [ 0 ] ) . get ( ) ; conn . appendNewline ( ) ; conn . appendNewline ( ) ; conn . append ( org . geotools . swing . dialog . JTextReporterTest . TEXT [ 1 ] ) ; conn . appendNewline ( ) ; windowFixture . robot ( ) . waitForIdle ( ) ; java . lang . String displayedText = windowFixture . textBox ( ) . text ( ) ; java . lang . String expectedText = java . lang . String . format ( "%s%n%n%s%n" , org . geotools . swing . dialog . JTextReporterTest . TEXT [ 0 ] , org . geotools . swing . dialog . JTextReporterTest . TEXT [ 1 ] ) ; "<AssertPlaceHolder>" ; } format ( int , java . lang . Object , java . lang . Object ) { return org . geotools . metadata . i18n . Descriptions . getResources ( null ) . getString ( key , arg0 , arg1 ) ; }
org . junit . Assert . assertEquals ( expectedText , displayedText )
itUpdatesTheDocumentIfTheDocumentDoesExist ( ) { when ( documentDAO . findByOwnerAndName ( user , "document1.txt" ) ) . thenReturn ( document ) ; final javax . ws . rs . core . Response response = resource . store ( request , headers , credentials , "bob" , "document1.txt" , body ) ; "<AssertPlaceHolder>" . isEqualTo ( Status . NO_CONTENT . getStatusCode ( ) ) ; final org . mockito . InOrder inOrder = inOrder ( document , documentDAO ) ; inOrder . verify ( document ) . setModifiedAt ( now ) ; inOrder . verify ( document ) . encryptAndSetBody ( keySet , random , body ) ; inOrder . verify ( documentDAO ) . saveOrUpdate ( document ) ; verify ( documentDAO , never ( ) ) . newDocument ( any ( com . wesabe . grendel . entities . User . class ) , anyString ( ) , any ( javax . ws . rs . core . MediaType . class ) ) ; } store ( javax . ws . rs . core . Request , javax . ws . rs . core . HttpHeaders , com . wesabe . grendel . auth . Credentials , java . lang . String , java . lang . String , byte [ ] ) { final com . wesabe . grendel . auth . Session session = credentials . buildSession ( userDAO , userId ) ; com . wesabe . grendel . entities . Document doc = documentDAO . findByOwnerAndName ( session . getUser ( ) , name ) ; if ( doc == null ) { doc = documentDAO . newDocument ( session . getUser ( ) , name , headers . getMediaType ( ) ) ; } else { checkPreconditions ( request , doc ) ; } doc . setModifiedAt ( new org . joda . time . DateTime ( org . joda . time . DateTimeZone . UTC ) ) ; doc . encryptAndSetBody ( session . getKeySet ( ) , randomProvider . get ( ) , body ) ; documentDAO . saveOrUpdate ( doc ) ; return javax . ws . rs . core . Response . noContent ( ) . tag ( doc . getEtag ( ) ) . build ( ) ; }
org . junit . Assert . assertThat ( response . getStatus ( ) )
testFieldLong ( ) { @ org . simpleflatmapper . reflect . test . asm . SuppressWarnings ( "unchecked" ) org . simpleflatmapper . reflect . primitive . LongSetter < org . simpleflatmapper . test . beans . DbPrimitiveObjectFields > setter = ( ( org . simpleflatmapper . reflect . primitive . LongSetter < org . simpleflatmapper . test . beans . DbPrimitiveObjectFields > ) ( factory . createSetter ( org . simpleflatmapper . test . beans . DbPrimitiveObjectFields . class . getDeclaredField ( "pLong" ) ) ) ) ; setter . setLong ( objectField , 35L ) ; "<AssertPlaceHolder>" ; } getpLong ( ) { return pLong ; }
org . junit . Assert . assertEquals ( 35L , objectField . getpLong ( ) )
testComplexHierarchyFailureValidation ( ) { hierarchySchema . clearFields ( ) ; hierarchySchema . addField ( "schemaField" , schema ) ; schema . clearFields ( ) ; schema . addField ( "booleanField" , booleanSchema ) ; schema . addField ( "longField" , longSchema ) ; schema . addField ( "doubleField" , doubleSchema ) ; schema . addField ( "Expected<sp>ComplexSchema<sp>hierarchy<sp>validation<sp>failure<sp>did<sp>not<sp>succeed" 0 , stringSchema ) ; schema . addField ( "tokenField" , tokenSchema ) ; schema . addField ( "dateTimeField" , dateTimeSchema ) ; tokenSchema . getProperties ( ) . clear ( ) ; java . util . List < java . lang . String > tokens = new java . util . ArrayList < java . lang . String > ( ) ; tokens . add ( "validToken" ) ; tokenSchema . getProperties ( ) . put ( TokenSchema . TOKENS , tokens ) ; java . util . Map < java . lang . String , java . lang . Object > hierarchyEntity = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . Object > complexEntity = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . lang . Long longEntity = 0L ; java . lang . Double doubleEntity = 0.0 ; java . lang . String stringEntity = "test" ; java . lang . String tokenEntity = "validToken" ; java . lang . String dateTimeEntity = "2012-01-01T12:00:00-05:00" ; java . lang . Boolean booleanEntity = true ; hierarchyEntity . put ( "schemaField" , complexEntity ) ; complexEntity . put ( "longField" , stringEntity ) ; complexEntity . put ( "booleanField" , booleanEntity ) ; complexEntity . put ( "doubleField" , doubleEntity ) ; complexEntity . put ( "Expected<sp>ComplexSchema<sp>hierarchy<sp>validation<sp>failure<sp>did<sp>not<sp>succeed" 0 , stringEntity ) ; complexEntity . put ( "tokenField" , tokenEntity ) ; complexEntity . put ( "dateTimeField" , dateTimeEntity ) ; "<AssertPlaceHolder>" ; } validate ( org . slc . sli . domain . Entity ) { org . slc . sli . validation . schema . NeutralSchema schema = entitySchemaRegistry . getSchema ( entity . getType ( ) ) ; if ( schema == null ) { org . slc . sli . validation . schema . NeutralSchemaValidator . LOG . warn ( "No<sp>schema<sp>associatiated<sp>for<sp>type<sp>{}" , entity . getType ( ) ) ; return true ; } java . util . List < org . slc . sli . validation . ValidationError > errors = new java . util . LinkedList < org . slc . sli . validation . ValidationError > ( ) ; boolean valid = schema . validate ( "" , entity . getBody ( ) , errors , validationRepo ) ; if ( ! valid ) { org . slc . sli . validation . schema . NeutralSchemaValidator . LOG . debug ( "Errors<sp>detected<sp>in<sp>{},<sp>{}" , new java . lang . Object [ ] { entity . getEntityId ( ) , errors } ) ; throw new org . slc . sli . validation . EntityValidationException ( entity . getEntityId ( ) , entity . getType ( ) , errors ) ; } valid = selfReferenceValidator . validate ( entity , errors ) ; if ( ! valid ) { org . slc . sli . validation . schema . NeutralSchemaValidator . LOG . debug ( "Errors<sp>detected<sp>in<sp>{},<sp>{}" , new java . lang . Object [ ] { entity . getEntityId ( ) , errors } ) ; throw new org . slc . sli . validation . EntityValidationException ( entity . getEntityId ( ) , entity . getType ( ) , errors ) ; } return true ; }
org . junit . Assert . assertFalse ( "Expected<sp>ComplexSchema<sp>hierarchy<sp>validation<sp>failure<sp>did<sp>not<sp>succeed" , hierarchySchema . validate ( hierarchyEntity ) )
testSkipNotEnough ( ) { org . apache . hadoop . hdfs . util . ExactSizeInputStream s = new org . apache . hadoop . hdfs . util . ExactSizeInputStream ( org . apache . hadoop . hdfs . util . TestExactSizeInputStream . byteStream ( "he" ) , 5 ) ; "<AssertPlaceHolder>" ; try { s . skip ( 1 ) ; org . junit . Assert . fail ( "Skip<sp>when<sp>should<sp>be<sp>out<sp>of<sp>data" ) ; } catch ( java . io . EOFException e ) { } } skip ( long ) { if ( ! ( useWrap ) ) { return inStream . skip ( n ) ; } int available = ( ofinish ) - ( ostart ) ; if ( n > available ) { n = available ; } if ( n < 0 ) { return 0 ; } ostart += n ; return n ; }
org . junit . Assert . assertEquals ( 2 , s . skip ( 3 ) )
testGetTimeParser_LocalTimeZone ( ) { java . sql . Time time = new java . sql . Time ( org . apache . phoenix . util . DateUtil . getDateTimeParser ( "HH:mm:ss" , PTime . INSTANCE , java . util . TimeZone . getDefault ( ) . getID ( ) ) . parseDateTime ( "00:00:00" ) ) ; "<AssertPlaceHolder>" ; } valueOf ( org . apache . phoenix . expression . Expression ) { org . apache . phoenix . expression . ExpressionType type = org . apache . phoenix . expression . ExpressionType . classToEnumMap . get ( expression . getClass ( ) ) ; if ( type == null ) { throw new java . lang . IllegalArgumentException ( ( "No<sp>ExpressionType<sp>for<sp>" + ( expression . getClass ( ) ) ) ) ; } return type ; }
org . junit . Assert . assertEquals ( java . sql . Time . valueOf ( "00:00:00" ) , time )
setAndGetRightTest ( ) { java . lang . String strValue = org . threadly . util . StringUtils . makeRandomString ( 5 ) ; org . threadly . util . MutablePair < java . lang . String , java . lang . String > p = new org . threadly . util . MutablePair ( ) ; p . setRight ( strValue ) ; "<AssertPlaceHolder>" ; } getRight ( ) { return right ; }
org . junit . Assert . assertEquals ( strValue , p . getRight ( ) )
testDriverChange ( ) { when ( view . getDriver ( ) ) . thenReturn ( org . kie . workbench . common . screens . datasource . management . client . editor . datasource . DRIVER_UUID ) ; mainPanel . onDriverChange ( ) ; verify ( view , times ( 1 ) ) . getDriver ( ) ; "<AssertPlaceHolder>" ; } getDriver ( ) { return view . getDriver ( ) ; }
org . junit . Assert . assertEquals ( org . kie . workbench . common . screens . datasource . management . client . editor . datasource . DRIVER_UUID , driver )
testExist ( ) { doCmdTest ( new org . cyy . fw . nedis . test . shard . TestAction ( ) { @ org . cyy . fw . nedis . test . shard . Override public void doTest ( ) throws org . cyy . fw . nedis . test . shard . InterruptedException , org . cyy . fw . nedis . util . NedisException { shardedNedis . flushAll ( null ) ; java . lang . Thread . sleep ( org . cyy . fw . nedis . test . shard . CMD_PAUSE_TIME ) ; int repeats = 20 ; for ( int i = 0 ; i < repeats ; i ++ ) { java . lang . String key = "key-" + i ; java . lang . String value = "value-" + i ; final boolean isLast = i == ( repeats - 1 ) ; shardedNedis . set ( null , key , value ) ; java . lang . Thread . sleep ( org . cyy . fw . nedis . test . shard . CMD_PAUSE_TIME ) ; shardedNedis . exists ( new org . cyy . fw . nedis . ResponseCallback < org . cyy . fw . nedis . ShardedResponse < java . lang . Boolean > > ( ) { @ org . cyy . fw . nedis . test . shard . Override public void done ( org . cyy . fw . nedis . ShardedResponse < java . lang . Boolean > result ) { System . out . println ( result ) ; "<AssertPlaceHolder>" ; if ( isLast ) { controller . countDown ( ) ; } } @ org . cyy . fw . nedis . test . shard . Override public void failed ( java . lang . Throwable cause ) { fail ( cause ) ; if ( isLast ) { controller . countDown ( ) ; } } } , key ) ; } } } ) ; } getResult ( ) { return results ; }
org . junit . Assert . assertEquals ( true , result . getResult ( ) )
testHashCode ( ) { org . eclipse . aether . collection . DependencyTraverser traverser1 = new org . eclipse . aether . util . graph . traverser . StaticDependencyTraverser ( true ) ; org . eclipse . aether . collection . DependencyTraverser traverser2 = new org . eclipse . aether . util . graph . traverser . StaticDependencyTraverser ( true ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int hash = 17 ; hash = ( hash * 31 ) + ( org . eclipse . aether . transport . http . SslConfig . hash ( context ) ) ; hash = ( hash * 31 ) + ( org . eclipse . aether . transport . http . SslConfig . hash ( verifier ) ) ; hash = ( hash * 31 ) + ( java . util . Arrays . hashCode ( cipherSuites ) ) ; hash = ( hash * 31 ) + ( java . util . Arrays . hashCode ( protocols ) ) ; return hash ; }
org . junit . Assert . assertEquals ( traverser1 . hashCode ( ) , traverser2 . hashCode ( ) )
testExecuteQueryAdmin ( ) { when ( mockUser . isAdmin ( ) ) . thenReturn ( true ) ; org . sagebionetworks . repo . model . NodeQueryResults results = manager . executeQuery ( query , mockUser ) ; "<AssertPlaceHolder>" ; verify ( mockDao , never ( ) ) . getDistinctBenefactors ( any ( org . sagebionetworks . repo . model . query . entity . QueryModel . class ) , anyLong ( ) ) ; verify ( mockAuthorizationManager , never ( ) ) . getAccessibleBenefactors ( any ( org . sagebionetworks . repo . model . UserInfo . class ) , anySetOf ( org . sagebionetworks . repo . manager . Long . class ) ) ; } executeQuery ( org . sagebionetworks . repo . model . entity . query . EntityQuery , org . sagebionetworks . repo . model . UserInfo ) { if ( query == null ) { throw new java . lang . IllegalArgumentException ( "Query<sp>cannot<sp>be<sp>null" ) ; } if ( user == null ) { throw new java . lang . IllegalArgumentException ( "UserInfo<sp>cannot<sp>be<sp>null" ) ; } org . sagebionetworks . repo . model . query . BasicQuery translatedQuery = translate ( query ) ; org . sagebionetworks . repo . model . NodeQueryResults results = executeQuery ( translatedQuery , user ) ; return translate ( results ) ; }
org . junit . Assert . assertNotNull ( results )
testIsRandom ( ) { "<AssertPlaceHolder>" ; } isRandom ( ) { return serverStatus . isRandom ( ) ; }
org . junit . Assert . assertFalse ( serverStatus . isRandom ( ) )
checkApplications ( ) { com . google . gson . JsonArray applicationsListJson = org . restcomm . connect . testsuite . RestcommRvdProjectsMigratorTool . getInstance ( ) . getEntitiesList ( deploymentUrl . toString ( ) , adminUsername , adminAuthToken , adminAccountSid , RestcommRvdProjectsMigratorTool . Endpoint . APPLICATIONS ) ; boolean result = true ; for ( java . lang . String applicationName : org . restcomm . connect . testsuite . RvdProjectsMigratorWorkspaceOriginalTest . applicationNames ) { boolean current = false ; for ( int i = 0 ; i < ( applicationsListJson . size ( ) ) ; i ++ ) { com . google . gson . JsonObject applicationJson = applicationsListJson . get ( i ) . getAsJsonObject ( ) ; java . lang . String applicationNameJson = applicationJson . get ( "friendly_name" ) . getAsString ( ) ; if ( applicationName . equals ( applicationNameJson ) ) { current = true ; break ; } } if ( ! current ) { result = false ; break ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( object == null ) { return false ; } else if ( ( this ) == object ) { return true ; } else if ( ( getClass ( ) ) != ( object . getClass ( ) ) ) { return false ; } final org . restcomm . connect . commons . fsm . State state = ( ( org . restcomm . connect . commons . fsm . State ) ( object ) ) ; if ( ! ( id . equals ( state . getId ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( result )
testPrivateKeyPlainTextInvalid ( ) { java . lang . String privateKeyPlainText = "blah<sp>blah" ; com . streamsets . pipeline . lib . remote . TestSFTPRemoteConnector . SFTPRemoteConnectorForTest connector = new com . streamsets . pipeline . lib . remote . TestSFTPRemoteConnector . SFTPRemoteConnectorForTest ( getBean ( ( ( "sftp://localhost:" + ( port ) ) + "/" ) , true , false , com . streamsets . pipeline . lib . remote . TESTUSER , null , null , "streamsets" , null , true , privateKeyPlainText ) ) ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = initAndCheckIssue ( connector , "CREDENTIALS" , "conf.remoteConfig.privateKeyPlainText" , Errors . REMOTE_10 , "No<sp>provider<sp>available<sp>for<sp>Unknown<sp>key<sp>file" , null ) ; "<AssertPlaceHolder>" ; connector . close ( ) ; } size ( ) { return delegate . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , issues . size ( ) )
testSettersEnGetters ( ) { final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verwerkToevalligeGebeurtenisVerzoekBericht = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; verwerkToevalligeGebeurtenisVerzoekBericht . setAkte ( null ) ; "<AssertPlaceHolder>" ; } getAkte ( ) { return verwerkToevallligeGebeurtenisVerzoekType . getAkte ( ) ; }
org . junit . Assert . assertNull ( verwerkToevalligeGebeurtenisVerzoekBericht . getAkte ( ) )
test_longArray_withType ( ) { long [ ] data = new long [ ] { 234 , 0 , - 1 } ; com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serialize ( url , byteArrayOutputStream ) ; objectOutput . writeObject ( data ) ; objectOutput . flushBuffer ( ) ; java . io . ByteArrayInputStream byteArrayInputStream = new java . io . ByteArrayInputStream ( byteArrayOutputStream . toByteArray ( ) ) ; com . alibaba . dubbo . common . serialize . ObjectInput deserialize = serialization . deserialize ( url , byteArrayInputStream ) ; "<AssertPlaceHolder>" ; try { deserialize . readObject ( long [ ] . class ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . ArrayIndexOutOfBoundsException e ) { } readObject ( ) { java . lang . String desc ; byte b = read0 ( ) ; switch ( b ) { case OBJECT_NULL : return null ; case OBJECT_DUMMY : return new java . lang . Object ( ) ; case OBJECT_DESC : { desc = readUTF ( ) ; break ; } case OBJECT_DESC_ID : { int index = readUInt ( ) ; desc = mMapper . getDescriptor ( index ) ; if ( desc == null ) throw new java . io . IOException ( ( "Can<sp>not<sp>find<sp>desc<sp>id:<sp>" + index ) ) ; break ; } default : throw new java . io . IOException ( ( "Flag<sp>error,<sp>expect<sp>OBJECT_NULL|OBJECT_DUMMY|OBJECT_DESC|OBJECT_DESC_ID,<sp>get<sp>" + b ) ) ; } try { java . lang . Class < ? > c = com . alibaba . dubbo . common . utils . ReflectUtils . desc2class ( desc ) ; return com . alibaba . dubbo . common . serialize . support . dubbo . Builder . register ( c ) . parseFrom ( this ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . io . IOException ( ( "Read<sp>object<sp>failed,<sp>class<sp>not<sp>found.<sp>" + ( com . alibaba . dubbo . common . utils . StringUtils . toString ( e ) ) ) ) ; } }
org . junit . Assert . assertArrayEquals ( data , ( ( long [ ] ) ( deserialize . readObject ( ) ) ) )
testReadImageInfoWithUntiledImage ( ) { instance . setSourceFile ( edu . illinois . library . cantaloupe . test . TestUtil . getImage ( "jp2-5res-rgb-64x56x8-monotiled-lossy.jp2" ) ) ; edu . illinois . library . cantaloupe . image . Info expectedInfo = edu . illinois . library . cantaloupe . image . Info . builder ( ) . withSize ( 64 , 56 ) . withTileSize ( 64 , 56 ) . withFormat ( Format . JP2 ) . withNumResolutions ( 5 ) . build ( ) ; "<AssertPlaceHolder>" ; } readInfo ( ) { try ( java . io . InputStream inputStream = streamFactory . newInputStream ( ) ) { final java . util . List < java . lang . String > args = new java . util . ArrayList ( ) ; if ( edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . IMVersion . VERSION_7 . equals ( edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . getIMVersion ( ) ) ) { args . add ( edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . getPath ( "magick" ) ) ; args . add ( "identify" ) ; } else { args . add ( edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . getPath ( "identify" ) ) ; } args . add ( "-ping" ) ; args . add ( "-format" ) ; args . add ( "readInfo():<sp>invoking<sp>{}" 1 ) ; args . add ( ( ( getSourceFormat ( ) . getPreferredExtension ( ) ) + ":-" ) ) ; final edu . illinois . library . cantaloupe . process . ArrayListOutputConsumer consumer = new edu . illinois . library . cantaloupe . process . ArrayListOutputConsumer ( ) ; final edu . illinois . library . cantaloupe . process . ProcessStarter cmd = new edu . illinois . library . cantaloupe . process . ProcessStarter ( ) ; cmd . setInputProvider ( new edu . illinois . library . cantaloupe . process . Pipe ( inputStream , null ) ) ; cmd . setOutputConsumer ( consumer ) ; final java . lang . String cmdString = java . lang . String . join ( "<sp>" , args ) . replace ( "\n" , "readInfo():<sp>invoking<sp>{}" 4 ) ; edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . LOGGER . debug ( "readInfo():<sp>invoking<sp>{}" , cmdString ) ; cmd . run ( args ) ; final java . util . List < java . lang . String > output = consumer . getOutput ( ) ; if ( ! ( output . isEmpty ( ) ) ) { final int width = java . lang . Integer . parseInt ( output . get ( 0 ) ) ; final int height = java . lang . Integer . parseInt ( output . get ( 1 ) ) ; final edu . illinois . library . cantaloupe . image . Info info = edu . illinois . library . cantaloupe . image . Info . builder ( ) . withSize ( width , height ) . withTileSize ( width , height ) . withFormat ( getSourceFormat ( ) ) . build ( ) ; info . setComplete ( false ) ; if ( ( output . size ( ) ) > 2 ) { try { final int exifOrientation = java . lang . Integer . parseInt ( output . get ( 2 ) . replaceAll ( "readInfo():<sp>invoking<sp>{}" 3 , "readInfo():<sp>invoking<sp>{}" 0 ) ) ; info . setMetadata ( new edu . illinois . library . cantaloupe . image . Metadata ( ) { @ edu . illinois . library . cantaloupe . processor . Override public edu . illinois . library . cantaloupe . image . Orientation getOrientation ( ) { return edu . illinois . library . cantaloupe . image . Orientation . forEXIFOrientation ( exifOrientation ) ; } } ) ; } catch ( java . lang . IllegalArgumentException e ) { edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . LOGGER . info ( "readInfo():<sp>invoking<sp>{}" 5 , e . getMessage ( ) ) ; } } return info ; } throw new java . io . IOException ( ( ( "readInfo():<sp>nothing<sp>received<sp>on<sp>" + "stdout<sp>from<sp>command:<sp>" ) + cmdString ) ) ; } catch ( java . io . IOException e ) { throw e ; } catch ( java . lang . Exception e ) { throw new java . io . IOException ( e ) ; } }
org . junit . Assert . assertEquals ( expectedInfo , instance . readInfo ( ) )
testEqualsFalse ( ) { org . apache . johnzon . core . JsonPointerImpl jsonPointer1 = new org . apache . johnzon . core . JsonPointerImpl ( javax . json . spi . JsonProvider . provider ( ) , "/foo/1" ) ; org . apache . johnzon . core . JsonPointerImpl jsonPointer2 = new org . apache . johnzon . core . JsonPointerImpl ( javax . json . spi . JsonProvider . provider ( ) , "/foo/2" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } else if ( obj instanceof java . lang . reflect . ParameterizedType ) { final java . lang . reflect . ParameterizedType that = ( ( java . lang . reflect . ParameterizedType ) ( obj ) ) ; final java . lang . reflect . Type thatRawType = that . getRawType ( ) ; return ( ( ( that . getOwnerType ( ) ) == null ) && ( ( rawType ) == null ? thatRawType == null : rawType . equals ( thatRawType ) ) ) && ( java . util . Arrays . equals ( types , that . getActualTypeArguments ( ) ) ) ; } else { return false ; } }
org . junit . Assert . assertFalse ( jsonPointer1 . equals ( jsonPointer2 ) )
testRefreshKeeperMaster ( ) { currentMetaServerMetaManager = spy ( new com . ctrip . xpipe . redis . meta . server . meta . impl . DefaultCurrentMetaManager ( ) ) ; currentMetaServerMetaManager . setDcMetaCache ( dcMetaCache ) ; java . lang . String clusterId = getClusterId ( ) ; when ( currentMetaServerMetaManager . allClusters ( ) ) . thenReturn ( com . google . common . collect . Sets . newHashSet ( clusterId ) ) ; "<AssertPlaceHolder>" ; doReturn ( com . ctrip . xpipe . tuple . Pair . from ( "127.0.0.1" , randomPort ( ) ) ) . when ( currentMetaServerMetaManager ) . getKeeperMaster ( anyString ( ) , anyString ( ) ) ; when ( dcMetaCache . randomRoute ( clusterId ) ) . thenReturn ( new com . ctrip . xpipe . redis . core . entity . RouteMeta ( 1000 ) . setTag ( Route . TAG_META ) ) ; when ( dcMetaCache . getClusterMeta ( clusterId ) ) . thenReturn ( getCluster ( getDcs ( ) [ 0 ] , clusterId ) ) ; int times = getCluster ( getDcs ( ) [ 0 ] , clusterId ) . getShards ( ) . size ( ) ; com . ctrip . xpipe . redis . meta . server . MetaServerStateChangeHandler handler = mock ( com . ctrip . xpipe . redis . meta . server . MetaServerStateChangeHandler . class ) ; currentMetaServerMetaManager . addMetaServerStateChangeHandler ( handler ) ; currentMetaServerMetaManager . routeChanges ( ) ; verify ( handler , times ( times ) ) . keeperMasterChanged ( eq ( clusterId ) , anyString ( ) , any ( ) ) ; } allClusters ( ) { java . util . Set < java . lang . String > clusters = new java . util . HashSet ( ) ; for ( com . ctrip . xpipe . redis . meta . server . keeper . impl . KeeperKey keeperKey : keepers . keySet ( ) ) { clusters . add ( keeperKey . getClusterId ( ) ) ; } return clusters ; }
org . junit . Assert . assertFalse ( currentMetaServerMetaManager . allClusters ( ) . isEmpty ( ) )
testMinNoInput ( ) { org . neuroph . core . data . DataSet dataSet = createDataSetWithOneEmtyRow ( ) ; double [ ] maxByColumns = org . neuroph . samples . norm . DataSetStatistics . calculateMinByColumns ( dataSet ) ; "<AssertPlaceHolder>" ; } calculateMinByColumns ( org . neuroph . core . data . DataSet ) { int inputSize = dataSet . getInputSize ( ) ; double [ ] minColumnElements = new double [ inputSize ] ; for ( int i = 0 ; i < inputSize ; i ++ ) { minColumnElements [ i ] = Double . MAX_VALUE ; } for ( org . neuroph . core . data . DataSetRow dataSetRow : dataSet . getRows ( ) ) { double [ ] input = dataSetRow . getInput ( ) ; for ( int i = 0 ; i < inputSize ; i ++ ) { minColumnElements [ i ] = java . lang . Math . min ( minColumnElements [ i ] , input [ i ] ) ; } } return minColumnElements ; }
org . junit . Assert . assertEquals ( 0 , maxByColumns . length )
shouldDecryptCipherTextWithAESCipher ( ) { java . lang . String encrypted = encrypt ( com . navercorp . utilset . cipher . CipherUtilsTest . SEED , com . navercorp . utilset . cipher . CipherUtilsTest . PLAIN_TEXT ) ; java . lang . String decrypted = decrypt ( com . navercorp . utilset . cipher . CipherUtilsTest . SEED , encrypted ) ; "<AssertPlaceHolder>" ; } decrypt ( java . lang . String , java . lang . String ) { com . navercorp . utilset . cipher . CipherUtils cipherUtils = new com . navercorp . utilset . cipher . CipherUtils ( com . navercorp . utilset . cipher . CipherMode . AES ) ; return cipherUtils . decrypt ( seed , cipherText ) ; }
org . junit . Assert . assertEquals ( com . navercorp . utilset . cipher . CipherUtilsTest . PLAIN_TEXT , decrypted )
testDisallowCheckTimeIfDisabledInConfig ( ) { final com . tc . properties . TCProperties props = com . tc . properties . TCPropertiesImpl . getProperties ( ) . getPropertiesFor ( TCPropertiesConsts . L2_L2_HEALTH_CHECK_CATEGORY ) ; props . setProperty ( "checkTime.enabled" , "false" ) ; com . tc . net . protocol . transport . HealthCheckerConfigImpl config = new com . tc . net . protocol . transport . HealthCheckerConfigImpl ( props , "test-config" ) ; final com . tc . net . protocol . transport . ConnectionHealthCheckerImpl . HealthCheckerMonitorThreadEngine engine = new com . tc . net . protocol . transport . ConnectionHealthCheckerImpl . HealthCheckerMonitorThreadEngine ( config , null , com . tc . net . protocol . transport . HealthCheckerMonitorThreadEngineTest . logger ) ; "<AssertPlaceHolder>" ; } canCheckTime ( ) { return ( config . isCheckTimeEnabled ( ) ) && ( ( ( java . lang . System . currentTimeMillis ( ) ) - ( this . lastCheckTime . get ( ) ) ) >= ( this . checkTimeInterval ) ) ; }
org . junit . Assert . assertFalse ( engine . canCheckTime ( ) )
getTemplateProducts_NoServices ( ) { java . util . List < org . oscm . serviceprovisioningservice . bean . Product > products = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . serviceprovisioningservice . bean . Product > > ( ) { @ org . oscm . serviceprovisioningservice . bean . Override public java . util . List < org . oscm . serviceprovisioningservice . bean . Product > call ( ) { return localService . getTemplateProducts ( ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , products . size ( ) )
testFindFirstFileBogusFile ( ) { jnr . posix . POSIX posix = jnr . posix . POSIXFactory . getNativePOSIX ( ) ; jnr . posix . FileStat stat = posix . allocateStat ( ) ; int result = ( ( jnr . posix . WindowsPOSIX ) ( posix ) ) . findFirstFile ( "sdjfhjfsdfhdsdfhsdj" , stat ) ; "<AssertPlaceHolder>" ; } findFirstFile ( java . lang . String , jnr . posix . FileStat ) { byte [ ] wpath = jnr . posix . WString . path ( path , true ) ; jnr . posix . windows . WindowsFindData findData = new jnr . posix . windows . WindowsFindData ( getRuntime ( ) ) ; jnr . posix . HANDLE handle = wlibc ( ) . FindFirstFileW ( wpath , findData ) ; if ( ! ( handle . isValid ( ) ) ) return - 1 ; wlibc ( ) . FindClose ( handle ) ; ( ( jnr . posix . WindowsRawFileStat ) ( stat ) ) . setup ( path , findData ) ; return 0 ; }
org . junit . Assert . assertTrue ( ( result < 0 ) )
validate_shouldFailValidationIfConceptClassNameAlreadyExist ( ) { org . openmrs . ConceptClass cc = new org . openmrs . ConceptClass ( ) ; cc . setName ( "Test" ) ; cc . setDescription ( "some<sp>text" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( cc , "cc" ) ; new org . openmrs . validator . ConceptClassValidator ( ) . validate ( cc , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertTrue ( errors . hasErrors ( ) )
replaceMatrixWithEmptyPathTest ( ) { java . lang . String expected = "http://localhost:8080;name=x;name=y;name=y%20x;name=x%25y;name=%20" ; java . lang . String value = "name=x;name=y;name=y<sp>x;name=x%y;name=<sp>" ; java . net . URI uri = javax . ws . rs . core . UriBuilder . fromPath ( "http://localhost:8080;name=x=;name=y?;name=x<sp>y;name=&" ) . replaceMatrix ( value ) . build ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; }
org . junit . Assert . assertEquals ( expected , uri . toString ( ) )
testSetAndGet ( ) { store . set ( "key" , "value" , "4711" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String , java . lang . Class ) { final com . mongodb . DBObject dbObject = collection . findOne ( new com . mongodb . BasicDBObject ( de . yourinspiration . jexpresso . session . MongoStore . SESSION_ID_FIELD , sessionId ) . append ( de . yourinspiration . jexpresso . session . MongoStore . NAME_FIELD , name ) ) ; if ( ( dbObject != null ) && ( dbObject . containsField ( de . yourinspiration . jexpresso . session . MongoStore . DATA_FIELD ) ) ) { return gson . fromJson ( ( ( java . lang . String ) ( dbObject . get ( de . yourinspiration . jexpresso . session . MongoStore . DATA_FIELD ) ) ) , clazz ) ; } return null ; }
org . junit . Assert . assertEquals ( "value" , store . get ( "key" , "4711" , java . lang . String . class ) )
preProcessShouldBeginTracingPreparedStatementCall ( ) { final java . lang . String sql = org . apache . commons . lang3 . RandomStringUtils . randomAlphanumeric ( 20 ) ; final com . mysql . jdbc . PreparedStatement statement = mock ( com . mysql . jdbc . PreparedStatement . class ) ; when ( statement . getPreparedSql ( ) ) . thenReturn ( sql ) ; final com . mysql . jdbc . Connection connection = mock ( com . mysql . jdbc . Connection . class ) ; "<AssertPlaceHolder>" ; final org . mockito . InOrder order = inOrder ( clientTracer ) ; order . verify ( clientTracer ) . startNewSpan ( "query" ) ; order . verify ( clientTracer ) . submitBinaryAnnotation ( eq ( TraceKeys . SQL_QUERY ) , eq ( sql ) ) ; order . verify ( clientTracer ) . setClientSent ( ) ; order . verifyNoMoreInteractions ( ) ; } preProcess ( java . lang . String , com . mysql . jdbc . Statement , com . mysql . jdbc . Connection ) { me . j360 . trace . collector . core . ClientTracer clientTracer = me . j360 . trace . mysql . MySQLStatementInterceptor . clientTracer ; if ( clientTracer != null ) { final java . lang . String sqlToLog ; if ( interceptedStatement instanceof com . mysql . jdbc . PreparedStatement ) { sqlToLog = ( ( com . mysql . jdbc . PreparedStatement ) ( interceptedStatement ) ) . getPreparedSql ( ) ; } else { sqlToLog = sql ; } beginTrace ( clientTracer , sqlToLog , connection ) ; } return null ; }
org . junit . Assert . assertNull ( subject . preProcess ( null , statement , connection ) )
gatewayProfileTest ( ) { org . apache . airavata . registry . cpi . GwyResourceProfile gatewayProfile = org . apache . airavata . app . catalog . GatewayProfileTest . appcatalog . getGatewayProfile ( ) ; org . apache . airavata . model . appcatalog . gatewayprofile . GatewayResourceProfile gf = new org . apache . airavata . model . appcatalog . gatewayprofile . GatewayResourceProfile ( ) ; org . apache . airavata . registry . cpi . ComputeResource computeRs = org . apache . airavata . app . catalog . GatewayProfileTest . appcatalog . getComputeResource ( ) ; org . apache . airavata . model . appcatalog . computeresource . ComputeResourceDescription cm1 = new org . apache . airavata . model . appcatalog . computeresource . ComputeResourceDescription ( ) ; cm1 . setHostName ( "localhost" ) ; cm1 . setResourceDescription ( "test<sp>compute<sp>host" ) ; java . lang . String hostId1 = computeRs . addComputeResource ( cm1 ) ; org . apache . airavata . model . appcatalog . computeresource . ComputeResourceDescription cm2 = new org . apache . airavata . model . appcatalog . computeresource . ComputeResourceDescription ( ) ; cm2 . setHostName ( "localhost" ) ; cm2 . setResourceDescription ( "test<sp>compute<sp>host" ) ; java . lang . String hostId2 = computeRs . addComputeResource ( cm2 ) ; org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference preference1 = new org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference ( ) ; preference1 . setComputeResourceId ( hostId1 ) ; preference1 . setOverridebyAiravata ( true ) ; preference1 . setPreferredJobSubmissionProtocol ( JobSubmissionProtocol . SSH ) ; preference1 . setPreferredDataMovementProtocol ( DataMovementProtocol . SCP ) ; preference1 . setPreferredBatchQueue ( "queue1" ) ; preference1 . setScratchLocation ( "test<sp>compute<sp>host" 1 ) ; preference1 . setAllocationProjectNumber ( "project1" ) ; org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference preference2 = new org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference ( ) ; preference2 . setComputeResourceId ( hostId2 ) ; preference2 . setOverridebyAiravata ( true ) ; preference2 . setPreferredJobSubmissionProtocol ( JobSubmissionProtocol . LOCAL ) ; preference2 . setPreferredDataMovementProtocol ( DataMovementProtocol . GridFTP ) ; preference2 . setPreferredBatchQueue ( "queue2" ) ; preference2 . setScratchLocation ( "test<sp>compute<sp>host" 1 ) ; preference2 . setAllocationProjectNumber ( "project2" ) ; java . util . List < org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference > list = new java . util . ArrayList < org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference > ( ) ; list . add ( preference1 ) ; list . add ( preference2 ) ; gf . setComputeResourcePreferences ( list ) ; gf . setGatewayID ( "testGateway" ) ; java . lang . String gwId = gatewayProfile . addGatewayResourceProfile ( gf ) ; org . apache . airavata . model . appcatalog . gatewayprofile . GatewayResourceProfile retrievedProfile = null ; if ( gatewayProfile . isGatewayResourceProfileExists ( gwId ) ) { retrievedProfile = gatewayProfile . getGatewayProfile ( gwId ) ; System . out . println ( ( "************<sp>gateway<sp>id<sp>**************<sp>:" + ( retrievedProfile . getGatewayID ( ) ) ) ) ; } java . util . List < org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference > preferences = gatewayProfile . getAllComputeResourcePreferences ( gwId ) ; System . out . println ( ( "compute<sp>preferences<sp>size<sp>:<sp>" + ( preferences . size ( ) ) ) ) ; if ( ( preferences != null ) && ( ! ( preferences . isEmpty ( ) ) ) ) { for ( org . apache . airavata . model . appcatalog . gatewayprofile . ComputeResourcePreference cm : preferences ) { System . out . println ( ( "********<sp>host<sp>id<sp>*********<sp>:<sp>" + ( cm . getComputeResourceId ( ) ) ) ) ; System . out . println ( cm . getPreferredBatchQueue ( ) ) ; System . out . println ( cm . getPreferredDataMovementProtocol ( ) ) ; System . out . println ( cm . getPreferredJobSubmissionProtocol ( ) ) ; } } "<AssertPlaceHolder>" ; } getPreferredJobSubmissionProtocol ( ) { return gatewayComputeResourcePreference . getPreferredJobSubmissionProtocol ( ) ; }
org . junit . Assert . assertTrue ( "test<sp>compute<sp>host" 0 , ( retrievedProfile != null ) )
testForwardsGetInputStream ( ) { org . apache . james . mime4j . storage . MultiReferenceStorageTest . DummyStorage storage = new org . apache . james . mime4j . storage . MultiReferenceStorageTest . DummyStorage ( ) ; org . apache . james . mime4j . storage . MultiReferenceStorage multiReferenceStorage = new org . apache . james . mime4j . storage . MultiReferenceStorage ( storage ) ; "<AssertPlaceHolder>" ; } getInputStream ( ) { return new java . io . ByteArrayInputStream ( "dummy" . getBytes ( "US-ASCII" ) ) ; }
org . junit . Assert . assertEquals ( java . io . ByteArrayInputStream . class , multiReferenceStorage . getInputStream ( ) . getClass ( ) )
testJsonSerialization ( ) { org . batfish . datamodel . ConnectedRoute cr = new org . batfish . datamodel . ConnectedRoute ( org . batfish . datamodel . Prefix . parse ( "1.1.1.0/24" ) , "Ethernet0" ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . common . util . BatfishObjectMapper . WRITER . writeValueAsBytes ( o ) , clazz ) ; }
org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( cr , org . batfish . datamodel . ConnectedRoute . class ) , org . hamcrest . Matchers . equalTo ( cr ) )
shouldHaveCorrectSizeBeforePatch ( ) { target . patchableInt ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 4 , target . position ( ) )
testSchemaChangeToFromGzip ( ) { org . sagebionetworks . repo . model . table . ColumnChange add = new org . sagebionetworks . repo . model . table . ColumnChange ( ) ; add . setOldColumnId ( null ) ; add . setNewColumnId ( "123" ) ; org . sagebionetworks . repo . model . table . ColumnChange delete = new org . sagebionetworks . repo . model . table . ColumnChange ( ) ; delete . setOldColumnId ( "456" ) ; delete . setNewColumnId ( null ) ; org . sagebionetworks . repo . model . table . ColumnChange update = new org . sagebionetworks . repo . model . table . ColumnChange ( ) ; update . setOldColumnId ( "777" ) ; update . setNewColumnId ( "888" ) ; java . util . List < org . sagebionetworks . repo . model . table . ColumnChange > changes = new java . util . LinkedList < org . sagebionetworks . repo . model . table . ColumnChange > ( ) ; changes . add ( add ) ; changes . add ( delete ) ; changes . add ( update ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . sagebionetworks . repo . model . dbo . persistence . table . ColumnModelUtils . writeSchemaChangeToGz ( changes , out ) ; java . io . ByteArrayInputStream in = new java . io . ByteArrayInputStream ( out . toByteArray ( ) ) ; java . util . List < org . sagebionetworks . repo . model . table . ColumnChange > results = org . sagebionetworks . repo . model . dbo . persistence . table . ColumnModelUtils . readSchemaChangeFromGz ( in ) ; "<AssertPlaceHolder>" ; } readSchemaChangeFromGz ( java . io . InputStream ) { java . util . zip . GZIPInputStream zipIn = null ; try { zipIn = new java . util . zip . GZIPInputStream ( input ) ; com . thoughtworks . xstream . XStream xstream = org . sagebionetworks . repo . model . dbo . persistence . table . ColumnModelUtils . createXStream ( ) ; return ( ( java . util . List < org . sagebionetworks . repo . model . table . ColumnChange > ) ( xstream . fromXML ( zipIn ) ) ) ; } finally { org . apache . commons . io . IOUtils . closeQuietly ( zipIn ) ; } }
org . junit . Assert . assertEquals ( changes , results )
exists ( ) { fm . last . moji . MojiFile existentFile = getFile ( newKey ( "exists" ) ) ; "<AssertPlaceHolder>" ; } exists ( ) { return file . exists ( ) ; }
org . junit . Assert . assertTrue ( existentFile . exists ( ) )
testToAndFromJsonStringConditionalUniqueColumnCombination ( ) { de . metanome . algorithm_integration . results . ColumnIdentifier expectedColumn1 = new de . metanome . algorithm_integration . results . ColumnIdentifier ( "condition2" 0 , "condition2" 1 ) ; de . metanome . algorithm_integration . results . ColumnIdentifier expectedColumn2 = new de . metanome . algorithm_integration . results . ColumnIdentifier ( "table2" , "column2" ) ; de . metanome . algorithm_integration . results . ColumnConditionOr outerCondition = new de . metanome . algorithm_integration . results . ColumnConditionOr ( ) ; outerCondition . add ( new de . metanome . algorithm_integration . results . ColumnConditionAnd ( new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition1" ) , new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn2 , "condition2" ) , new de . metanome . algorithm_integration . results . ColumnConditionOr ( new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition4" ) , new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition5" ) ) ) ) ; outerCondition . add ( new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition2" 2 ) ) ; outerCondition . add ( new de . metanome . algorithm_integration . results . ColumnConditionAnd ( new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition6" ) , new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn2 , "condition7" ) , new de . metanome . algorithm_integration . results . ColumnConditionOr ( new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition8" ) , new de . metanome . algorithm_integration . results . ColumnConditionValue ( expectedColumn1 , "condition9" ) ) ) ) ; de . metanome . algorithm_integration . results . ConditionalUniqueColumnCombination expectedCUCC = new de . metanome . algorithm_integration . results . ConditionalUniqueColumnCombination ( new de . metanome . algorithm_integration . results . ColumnCombination ( expectedColumn1 , expectedColumn2 ) , outerCondition ) ; de . metanome . algorithm_integration . results . JsonConverter < de . metanome . algorithm_integration . results . ConditionalUniqueColumnCombination > jsonConverter = new de . metanome . algorithm_integration . results . JsonConverter ( ) ; java . lang . String actualJson = jsonConverter . toJsonString ( expectedCUCC ) ; de . metanome . algorithm_integration . results . ConditionalUniqueColumnCombination actualCUCC = jsonConverter . fromJsonString ( actualJson , de . metanome . algorithm_integration . results . ConditionalUniqueColumnCombination . class ) ; "<AssertPlaceHolder>" ; } fromJsonString ( java . lang . String , java . lang . Class ) { return this . mapper . readValue ( json , clazz ) ; }
org . junit . Assert . assertEquals ( expectedCUCC , actualCUCC )
testSave ( ) { product = net . magja . util . ObjectFactory . generateProduct ( ) ; productService . add ( product , null ) ; net . magja . model . product . ProductMedia productMedia = net . magja . util . ObjectFactory . readMedia ( ) ; productMedia . setProduct ( product ) ; service . create ( productMedia ) ; "<AssertPlaceHolder>" ; product . addMedia ( productMedia ) ; file = productMedia . getFile ( ) ; } getFile ( ) { return file ; }
org . junit . Assert . assertTrue ( ( ( productMedia . getFile ( ) ) != null ) )
whenReadMultipleCharSources_thenRead ( ) { final java . lang . String expectedValue = "Hello<sp>worldTest" ; final java . io . File file1 = new java . io . File ( "src/test/resources/test1.in" ) ; final java . io . File file2 = new java . io . File ( "src/test/resources/test1_1.in" ) ; final com . google . common . io . CharSource source1 = com . google . common . io . Files . asCharSource ( file1 , Charsets . UTF_8 ) ; final com . google . common . io . CharSource source2 = com . google . common . io . Files . asCharSource ( file2 , Charsets . UTF_8 ) ; final com . google . common . io . CharSource source = com . google . common . io . CharSource . concat ( source1 , source2 ) ; final java . lang . String result = source . read ( ) ; "<AssertPlaceHolder>" ; } read ( ) { return this . getContent ( ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedValue , result )
testRWRInvalidation ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . setClass ( DFSConfigKeys . DFS_BLOCK_REPLICATOR_CLASSNAME_KEY , org . apache . hadoop . hdfs . server . namenode . ha . TestDNFencing . RandomDeleterPolicy . class , org . apache . hadoop . hdfs . server . blockmanagement . BlockPlacementPolicy . class ) ; conf . setInt ( DFSConfigKeys . DFS_HEARTBEAT_INTERVAL_KEY , 1 ) ; int numFiles = 10 ; java . util . List < org . apache . hadoop . fs . Path > testPaths = com . google . common . collect . Lists . newArrayList ( ) ; for ( int i = 0 ; i < numFiles ; i ++ ) { testPaths . add ( new org . apache . hadoop . fs . Path ( ( "/test" + i ) ) ) ; } org . apache . hadoop . hdfs . MiniDFSCluster cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . numDataNodes ( 2 ) . build ( ) ; try { java . util . List < org . apache . hadoop . fs . FSDataOutputStream > streams = com . google . common . collect . Lists . newArrayList ( ) ; try { for ( org . apache . hadoop . fs . Path path : testPaths ) { org . apache . hadoop . fs . FSDataOutputStream out = cluster . getFileSystem ( ) . create ( path , ( ( short ) ( 2 ) ) ) ; streams . add ( out ) ; out . writeBytes ( "old<sp>gs<sp>data\n" ) ; out . hflush ( ) ; } for ( org . apache . hadoop . fs . Path path : testPaths ) { org . apache . hadoop . hdfs . DFSTestUtil . waitReplication ( cluster . getFileSystem ( ) , path , ( ( short ) ( 2 ) ) ) ; } org . apache . hadoop . hdfs . MiniDFSCluster . DataNodeProperties oldGenstampNode = cluster . stopDataNode ( 0 ) ; for ( int i = 0 ; i < ( streams . size ( ) ) ; i ++ ) { org . apache . hadoop . fs . Path path = testPaths . get ( i ) ; org . apache . hadoop . fs . FSDataOutputStream out = streams . get ( i ) ; out . writeBytes ( "new<sp>gs<sp>data\n" ) ; out . hflush ( ) ; cluster . getFileSystem ( ) . setReplication ( path , ( ( short ) ( 1 ) ) ) ; out . close ( ) ; } for ( org . apache . hadoop . fs . Path path : testPaths ) { org . apache . hadoop . hdfs . DFSTestUtil . waitReplication ( cluster . getFileSystem ( ) , path , ( ( short ) ( 1 ) ) ) ; } org . apache . hadoop . hdfs . server . blockmanagement . TestRBWBlockInvalidation . LOG . info ( "===========================<sp>restarting<sp>cluster" ) ; org . apache . hadoop . hdfs . MiniDFSCluster . DataNodeProperties otherNode = cluster . stopDataNode ( 0 ) ; cluster . restartNameNode ( ) ; cluster . restartDataNode ( oldGenstampNode ) ; cluster . waitActive ( ) ; cluster . restartDataNode ( otherNode ) ; cluster . waitActive ( ) ; cluster . getNameNode ( ) . getNamesystem ( ) . getBlockManager ( ) . computeInvalidateWork ( 2 ) ; cluster . triggerHeartbeats ( ) ; org . apache . hadoop . hdfs . server . namenode . ha . HATestUtil . waitForDNDeletions ( cluster ) ; cluster . triggerDeletionReports ( ) ; waitForNumTotalBlocks ( cluster , numFiles ) ; for ( org . apache . hadoop . fs . Path path : testPaths ) { java . lang . String ret = org . apache . hadoop . hdfs . DFSTestUtil . readFile ( cluster . getFileSystem ( ) , path ) ; "<AssertPlaceHolder>" ; } } finally { org . apache . hadoop . io . IOUtils . cleanupWithLogger ( org . apache . hadoop . hdfs . server . blockmanagement . TestRBWBlockInvalidation . LOG , streams . toArray ( new java . io . Closeable [ 0 ] ) ) ; } } finally { cluster . shutdown ( ) ; } } getFileSystem ( ) { org . junit . Assert . assertNotNull ( "cluster<sp>not<sp>created" , org . apache . hadoop . fs . contract . router . RouterHDFSContract . cluster ) ; return org . apache . hadoop . fs . contract . router . RouterHDFSContract . cluster . getRandomRouter ( ) . getFileSystem ( ) ; }
org . junit . Assert . assertEquals ( ( "old<sp>gs<sp>data\n" + "new<sp>gs<sp>data\n" ) , ret )
testVerwijstNaarBestaandEnJuisteType_NOK ( ) { final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder builder = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder ( ) ; final nl . bzk . brp . bijhouding . bericht . model . StringElement stringElement = new nl . bzk . brp . bijhouding . bericht . model . StringElement ( "" ) ; final nl . bzk . brp . bijhouding . bericht . model . BronElement bronElement = builder . maakBronElement ( "ci_test_2" , new nl . bzk . brp . bijhouding . bericht . model . DocumentElement ( objecttypeAttributen , stringElement , null , null , stringElement ) ) ; objecttypeAttributen . put ( nl . bzk . brp . bijhouding . bericht . model . BmrAttribuutEnum . COMMUNICATIE_ID_ATTRIBUUT . toString ( ) , "ci_test_3" ) ; objecttypeAttributen . put ( nl . bzk . brp . bijhouding . bericht . model . BmrAttribuutEnum . REFERENTIE_ID_ATTRIBUUT . toString ( ) , "ci_test_2" ) ; final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters refParams = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters ( ) ; final nl . bzk . brp . bijhouding . bericht . model . PersoonGegevensElement referentieElement = builder . maakPersoonGegevensElement ( objecttypeAttributen , refParams ) ; referentieElement . setVerzoekBericht ( bericht ) ; final java . util . Map < java . lang . String , nl . bzk . brp . bijhouding . bericht . model . BmrGroep > communicatieIdGroepMap = new java . util . HashMap ( ) ; communicatieIdGroepMap . put ( "ci_test_2" , bronElement ) ; referentieElement . initialiseer ( communicatieIdGroepMap ) ; "<AssertPlaceHolder>" ; } verwijstNaarBestaandEnJuisteType ( ) { return true ; }
org . junit . Assert . assertFalse ( referentieElement . verwijstNaarBestaandEnJuisteType ( ) )
testFilterMedicationsTreeDoesntStartWithSearchWord1 ( ) { final java . util . List < com . marand . thinkmed . html . components . tree . TreeNodeData > medications = getMedicationTree ( ) ; final java . util . List < com . marand . thinkmed . html . components . tree . TreeNodeData > filteredMedications = medicationsFinder . filterMedicationsTree ( medications , "aleron" , true ) ; "<AssertPlaceHolder>" ; } filterMedicationsTree ( java . util . List , java . lang . String [ ] , boolean ) { final java . util . List < com . marand . thinkmed . html . components . tree . TreeNodeData > filteredMedications = new java . util . ArrayList ( ) ; for ( final com . marand . thinkmed . html . components . tree . TreeNodeData medicationNode : medications ) { final com . marand . thinkmed . medications . dto . MedicationSimpleDto medicationSimpleDto = ( ( com . marand . thinkmed . medications . dto . MedicationSimpleDto ) ( medicationNode . getData ( ) ) ) ; final java . lang . String medicationSearchName = ( ( medicationSimpleDto . getGenericName ( ) ) != null ) ? ( ( medicationSimpleDto . getGenericName ( ) ) + "<sp>" ) + ( medicationNode . getTitle ( ) ) : medicationNode . getTitle ( ) ; medicationNode . setExpanded ( false ) ; boolean match = true ; if ( startMustMatch && ( ( searchSubstrings . length ) > 0 ) ) { final java . lang . String firstSearchString = searchSubstrings [ 0 ] ; final boolean genericStartsWithFirstSearchString = ( ( medicationSimpleDto . getGenericName ( ) ) != null ) && ( org . apache . commons . lang3 . StringUtils . startsWithIgnoreCase ( medicationSimpleDto . getGenericName ( ) , firstSearchString ) ) ; final boolean medicationStartsWithFirstSearchString = org . apache . commons . lang3 . StringUtils . startsWithIgnoreCase ( medicationNode . getTitle ( ) , firstSearchString ) ; if ( ( ! genericStartsWithFirstSearchString ) && ( ! medicationStartsWithFirstSearchString ) ) { match = false ; } } if ( match ) { for ( int i = ( startMustMatch ) ? 1 : 0 ; i < ( searchSubstrings . length ) ; i ++ ) { if ( ! ( org . apache . commons . lang3 . StringUtils . containsIgnoreCase ( medicationSearchName , searchSubstrings [ i ] ) ) ) { match = false ; break ; } } } if ( match ) { filteredMedications . add ( medicationNode ) ; } else { if ( ! ( medicationNode . getChildren ( ) . isEmpty ( ) ) ) { final java . util . List < com . marand . thinkmed . html . components . tree . TreeNodeData > filteredChildren = filterMedicationsTree ( medicationNode . getChildren ( ) , searchSubstrings , startMustMatch ) ; if ( ! ( filteredChildren . isEmpty ( ) ) ) { medicationNode . setChildren ( filteredChildren ) ; filteredMedications . add ( medicationNode ) ; medicationNode . setExpanded ( true ) ; } } } } return filteredMedications ; }
org . junit . Assert . assertEquals ( 0 , filteredMedications . size ( ) )
testListBindings ( ) { org . apache . catalina . startup . Tomcat tomcat = getTomcatInstance ( ) ; tomcat . enableNaming ( ) ; org . apache . catalina . core . StandardContext ctx = ( ( org . apache . catalina . core . StandardContext ) ( tomcat . addContext ( "" , java . lang . System . getProperty ( "java.io.tmpdir" ) ) ) ) ; org . apache . catalina . deploy . ContextResource cr = new org . apache . catalina . deploy . ContextResource ( ) ; cr . setName ( "list/foo" ) ; cr . setType ( "org.apache.naming.resources.TesterObject" ) ; cr . setProperty ( "factory" , "org.apache.naming.resources.TesterFactory" ) ; ctx . getNamingResources ( ) . addResource ( cr ) ; org . apache . naming . resources . TestNamingContext . Bug23950Servlet bug23950Servlet = new org . apache . naming . resources . TestNamingContext . Bug23950Servlet ( ) ; org . apache . catalina . startup . Tomcat . addServlet ( ctx , "bug23950Servlet" , bug23950Servlet ) ; ctx . addServletMapping ( "/" , "bug23950Servlet" ) ; tomcat . start ( ) ; org . apache . tomcat . util . buf . ByteChunk bc = getUrl ( ( ( "http://localhost:" + ( getPort ( ) ) ) + "/" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "ProxyConnection[" + ( ( connection ) != null ? connection . toString ( ) : "null" ) ) + "]" ; }
org . junit . Assert . assertEquals ( "org.apache.naming.resources.TesterObject" , bc . toString ( ) )
testgetByteKO ( ) { "<AssertPlaceHolder>" ; ff4jConf . getByte ( "propString" ) ; } containsKey ( java . lang . Object ) { return value ( ) . containsKey ( key ) ; }
org . junit . Assert . assertTrue ( ff4jConf . containsKey ( "propString" ) )
stateMachineTraits073Test ( ) { cruise . umple . compiler . UmpleModel model = getModelByFilename ( "trait_test_data_0032.ump" ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "234" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } }
org . junit . Assert . assertTrue ( result )
web_page_contents_java ( ) { java . net . URL getUrlContent = new java . net . URL ( "http://www.example.com/" ) ; java . io . BufferedReader in = new java . io . BufferedReader ( new java . io . InputStreamReader ( getUrlContent . openStream ( ) ) ) ; java . lang . String webpageAsString ; while ( ( webpageAsString = in . readLine ( ) ) != null ) System . out . println ( webpageAsString ) ; in . close ( ) ; com . levelup . java . net . GetWebPageContents . logger . info ( webpageAsString ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( webpageAsString )
test ( ) { com . arjuna . ats . internal . jta . transaction . arjunacore . TransactionSynchronizationRegistryImple transactionSynchronizationRegistryImple = new com . arjuna . ats . internal . jta . transaction . arjunacore . TransactionSynchronizationRegistryImple ( ) ; javax . transaction . TransactionManager tx = com . arjuna . ats . jta . TransactionManager . transactionManager ( ) ; java . util . List < java . lang . Thread > threads = new java . util . ArrayList ( ) ; java . util . Set < java . lang . Exception > failures = new java . util . HashSet ( ) ; for ( int i = 0 ; i < ( 4 * ( com . hp . mwtests . ts . jdbc . basic . PoolingTest . POOLSIZE ) ) ; i ++ ) { java . lang . Thread thread = new java . lang . Thread ( ( ) -> { try { tx . begin ( ) ; transactionSynchronizationRegistryImple . registerInterposedSynchronization ( new javax . transaction . Synchronization ( ) { private java . sql . Connection conn ; @ java . lang . Override public void beforeCompletion ( ) { try { conn = java . sql . DriverManager . getConnection ( url , dbProperties ) ; conn . createStatement ( ) . execute ( ( ( "INSERT<sp>INTO<sp>test_table<sp>(a)<sp>VALUES<sp>('" + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ) + "')" ) ) ; } catch ( e ) { failures . add ( com . hp . mwtests . ts . jdbc . basic . e ) ; } } @ java . lang . Override public void afterCompletion ( int status ) { try { conn . close ( ) ; } catch ( e ) { failures . add ( com . hp . mwtests . ts . jdbc . basic . e ) ; } } } ) ; tx . commit ( ) ; } catch ( e ) { failures . add ( com . hp . mwtests . ts . jdbc . basic . e ) ; } } ) ; threads . add ( thread ) ; "<AssertPlaceHolder>" ; } for ( java . lang . Thread thread : threads ) { thread . start ( ) ; } for ( java . lang . Thread thread : threads ) { thread . join ( ) ; } } size ( ) { return length ( ) ; }
org . junit . Assert . assertEquals ( failures . size ( ) , 0 )
testFindScalarFunctions ( ) { java . util . List < org . apache . tajo . catalog . FunctionDesc > collections = com . google . common . collect . Lists . newArrayList ( org . apache . tajo . engine . function . FunctionLoader . findScalarFunctions ( ) ) ; java . util . Collections . sort ( collections ) ; java . lang . String functionList = org . apache . tajo . util . StringUtils . join ( collections , "\n" ) ; java . lang . String result = org . apache . tajo . LocalTajoTestingUtility . getResultText ( org . apache . tajo . engine . function . TestFunctionLoader . class , "testFindScalarFunctions.result" ) ; "<AssertPlaceHolder>" ; } getResultText ( java . lang . Class , java . lang . String ) { org . apache . hadoop . fs . FileSystem localFS = org . apache . hadoop . fs . FileSystem . getLocal ( new org . apache . hadoop . conf . Configuration ( ) ) ; org . apache . hadoop . fs . Path path = org . apache . tajo . LocalTajoTestingUtility . getResultPath ( clazz , fileName ) ; com . google . common . base . Preconditions . checkState ( ( ( localFS . exists ( path ) ) && ( localFS . isFile ( path ) ) ) ) ; return org . apache . tajo . util . FileUtil . readTextFile ( new java . io . File ( path . toUri ( ) ) ) ; }
org . junit . Assert . assertEquals ( result . trim ( ) , functionList . trim ( ) )
testGetPublicMethod_returnsFalse ( ) { org . apache . commons . ognl . internal . Cache < java . lang . reflect . Method , java . lang . Boolean > cache = createCache ( denyAllSecurityManager ) ; java . lang . reflect . Method method = org . apache . commons . ognl . test . objects . Root . class . getMethod ( "getArray" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Class ) { return map . get ( cls ) ; }
org . junit . Assert . assertFalse ( cache . get ( method ) )
testFieldBuilder ( ) { com . liferay . portal . search . script . ScriptField scriptField = com . liferay . portal . search . script . test . ScriptsInstantiationTest . _scripts . fieldBuilder ( ) . field ( "field" ) . script ( com . liferay . portal . search . script . test . ScriptsInstantiationTest . _scripts . script ( "Math.min(1,<sp>1)" ) ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . liferay . portal . kernel . transaction . TransactionConfig ( this ) ; }
org . junit . Assert . assertNotNull ( scriptField )
testStartWorkflowTriggeredByEvent_shouldStartWorkflow ( ) { manager . add ( new org . openengsb . core . workflow . api . model . RuleBaseElementId ( org . openengsb . core . workflow . api . model . RuleBaseElementType . Rule , "test42" ) , ( "when\n" + ( ( "<sp>Event()\n" + "then\n" ) + "<sp>kcontext.getKnowledgeRuntime().startProcess(\"ci\");\n" ) ) ) ; service . processEvent ( new org . openengsb . core . api . Event ( ) ) ; "<AssertPlaceHolder>" ; } getRunningFlows ( ) { java . util . Collection < org . drools . runtime . process . ProcessInstance > processInstances = getSessionForCurrentContext ( ) . getProcessInstances ( ) ; java . util . Collection < java . lang . Long > result = new java . util . HashSet < java . lang . Long > ( ) ; for ( org . drools . runtime . process . ProcessInstance p : processInstances ) { result . add ( p . getId ( ) ) ; } return result ; }
org . junit . Assert . assertThat ( service . getRunningFlows ( ) . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( false ) )