input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
add2 ( ) { org . diirt . util . array . CircularBufferDouble coll = new org . diirt . util . array . CircularBufferDouble ( 10 ) ; for ( int i = 0 ; i < 11 ; i ++ ) { coll . addDouble ( i ) ; } org . diirt . util . array . ListDouble reference = new org . diirt . util . array . ArrayDouble ( new double [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } ) ; "<AssertPlaceHolder>" ; } addDouble ( double ) { data [ endOffset ] = value ; ( endOffset ) ++ ; if ( ( ( endOffset ) == ( data . length ) ) && ( ! ( reachedMax ) ) ) resize ( ) ; if ( ( endOffset ) == ( data . length ) ) { endOffset = 0 ; } if ( ( endOffset ) == ( startOffset ) ) ( startOffset ) ++ ; if ( ( startOffset ) == ( data . length ) ) startOffset = 0 ; } | org . junit . Assert . assertThat ( coll , equalTo ( reference ) ) |
whenCreateMock_thenCreated ( ) { final java . util . List < java . lang . String > mockedList = org . mockito . Mockito . mock ( java . util . ArrayList . class ) ; mockedList . add ( "one" ) ; org . mockito . Mockito . verify ( mockedList ) . add ( "one" ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , mockedList . size ( ) ) |
testGetLinked ( ) { arhangel . dim . container . BeanVertex [ ] linked = new arhangel . dim . container . BeanVertex [ ] { vertices . get ( 1 ) , vertices . get ( 2 ) } ; int counter = 0 ; for ( arhangel . dim . container . BeanVertex vertex : graph . getLinked ( vertices . get ( 0 ) ) ) { "<AssertPlaceHolder>" ; } } getLinked ( arhangel . dim . container . BeanVertex ) { return null ; } | org . junit . Assert . assertEquals ( linked [ ( counter ++ ) ] , vertex ) |
fold_04 ( ) { java . lang . String [ ] x = new java . lang . String [ ] { } ; java . lang . String z = org . apache . jena . atlas . iterator . Iter . foldRight ( org . apache . jena . atlas . iterator . Arrays . asList ( x ) , f1 , "X" ) ; "<AssertPlaceHolder>" ; } asList ( org . apache . jena . util . iterator . ExtendedIterator ) { org . apache . jena . util . iterator . List < T > result = new org . apache . jena . util . iterator . ArrayList ( ) ; while ( it . hasNext ( ) ) result . add ( it . next ( ) ) ; return result ; } | org . junit . Assert . assertEquals ( "X" , z ) |
createPolicyWithConfigurationAndConfigurationData01 ( ) { try ( java . io . InputStream is = io . gravitee . gateway . policy . PolicyConfigurationFactoryTest . class . getResourceAsStream ( "policy-configuration-01.json" ) ) { java . lang . String configuration = org . apache . commons . io . IOUtils . toString ( is , "UTF-8" ) ; io . gravitee . gateway . policy . DummyPolicyConfiguration policyConfiguration = policyConfigurationFactory . create ( io . gravitee . gateway . policy . DummyPolicyConfiguration . class , configuration ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } create ( io . gravitee . definition . model . Endpoint , io . gravitee . gateway . core . endpoint . factory . template . EndpointContext ) { for ( io . gravitee . gateway . core . endpoint . factory . EndpointFactory factory : getFactoriesInstances ( ) ) { if ( factory . support ( model . getType ( ) ) ) { return factory . create ( model , context ) ; } } throw new java . lang . IllegalStateException ( java . lang . String . format ( "Unable<sp>to<sp>create<sp>an<sp>endpoint<sp>for<sp>%s" , model ) ) ; } | org . junit . Assert . assertNotNull ( policyConfiguration ) |
manageModificationVDiskDeletion_VSERVER_UPDATING_NotStopped ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; org . oscm . app . iaas . data . FlowState newState = null ; doReturn ( VServerStatus . STARTING ) . when ( vServerProcessor . vserverComm ) . getVServerStatus ( paramHandler ) ; newState = vServerProcessor . manageModificationVDiskDeletion ( "controllerId" , "instanceId" , paramHandler , flowState , newState ) ; "<AssertPlaceHolder>" ; } manageModificationVDiskDeletion ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { org . oscm . app . iaas . data . FlowState newState = newStateParam ; boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; switch ( flowState ) { case VSERVER_MODIFICATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOPPED_FOR_MODIFICATION , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . RUNNING . equals ( status ) ) { vserverComm . stopVServer ( paramHandler ) ; } else if ( VServerStatus . STOPPED . equals ( status ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED_FOR_MODIFICATION ; } } break ; case VSERVER_STOPPED_FOR_MODIFICATION : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATING , paramHandler ) ) ) { vserverComm . modifyVServerAttributes ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; if ( vdiskInfo . isAttachedVDisksFound ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETION_REQUESTED ; } } break ; case VSDISK_DELETION_REQUESTED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHING , paramHandler ) ) ) { vdiskInfo . detachVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHING ; } break ; case VSDISK_DETACHING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHED , paramHandler ) ) { if ( vdiskInfo . areVDisksDetached ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHED ; } } break ; case VSDISK_DETACHED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DELETING , paramHandler ) ) ) { vdiskInfo . destroyVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETING ; } break ; case VSDISK_DELETING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DESTROYED , paramHandler ) ) { if ( vdiskInfo . areVDisksDestroyed ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; } } break ; case VSERVER_UPDATING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATED , paramHandler ) ) { if ( VServerStatus . STOPPED . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATED ; } } break ; case VSERVER_UPDATED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTING , paramHandler ) ) { if ( vserverComm . startVServer ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; } } break ; case VSERVER_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; } } break ; case VSERVER_STARTED : if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { if ( ( paramHandler . getMailForCompletion ( ) ) != null ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_RETRIEVEGUEST , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_RETRIEVEGUEST ; } } else { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; case VSERVER_RETRIEVEGUEST : java . lang . String mail = paramHandler . getMailForCompletion ( ) ; if ( mail != null ) { newState = dispatchVServerManualOperation ( controllerId , instanceId , paramHandler , mail ) ; } else { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; default : } return newState ; } | org . junit . Assert . assertNull ( newState ) |
mergeTextDecorationFirstInputNoneTest ( ) { java . lang . String firstValue = "underline<sp>none" ; java . lang . String secondValue = "strikethrough" ; java . lang . String expected = "strikethrough" ; java . lang . String actual = com . itextpdf . styledxmlparser . css . resolve . CssPropertyMerger . mergeTextDecoration ( firstValue , secondValue ) ; "<AssertPlaceHolder>" ; } mergeTextDecoration ( java . lang . String , java . lang . String ) { if ( firstValue == null ) { return secondValue ; } else if ( secondValue == null ) { return firstValue ; } java . util . Set < java . lang . String > merged = com . itextpdf . styledxmlparser . css . resolve . CssPropertyMerger . normalizeTextDecoration ( firstValue ) ; merged . addAll ( com . itextpdf . styledxmlparser . css . resolve . CssPropertyMerger . normalizeTextDecoration ( secondValue ) ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( java . lang . String mergedProp : merged ) { if ( ( sb . length ( ) ) != 0 ) { sb . append ( "<sp>" ) ; } sb . append ( mergedProp ) ; } return ( sb . length ( ) ) != 0 ? sb . toString ( ) : com . itextpdf . styledxmlparser . css . CommonCssConstants . NONE ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testSelectChainedWithExceptAll ( ) { com . couchbase . client . java . query . dsl . path . SelectResultPath statement1 = new com . couchbase . client . java . query . dsl . path . DefaultSelectPath ( null ) . select ( com . couchbase . client . java . query . dsl . Expression . x ( "firstname" ) , com . couchbase . client . java . query . dsl . Expression . x ( "lastname" ) ) . from ( "foo" ) . where ( com . couchbase . client . java . query . dsl . Expression . x ( "lastname" ) . eq ( com . couchbase . client . java . query . dsl . Expression . s ( "foo" ) ) ) ; com . couchbase . client . java . query . dsl . path . SelectResultPath statement2 = new com . couchbase . client . java . query . dsl . path . DefaultSelectPath ( null ) . select ( com . couchbase . client . java . query . dsl . Expression . x ( "firstname" ) , com . couchbase . client . java . query . dsl . Expression . x ( "lastname" ) ) . from ( "foo" ) . where ( com . couchbase . client . java . query . dsl . Expression . x ( "lastname" ) . eq ( com . couchbase . client . java . query . dsl . Expression . s ( "bar" ) ) ) ; java . lang . String expected = "SELECT<sp>firstname,<sp>lastname<sp>" + ( ( ( ( ( "FROM<sp>foo<sp>" + "WHERE<sp>lastname<sp>=<sp>\"foo\"<sp>" ) + "EXCEPT<sp>ALL<sp>" ) + "SELECT<sp>firstname,<sp>lastname<sp>" ) + "FROM<sp>foo<sp>" ) + "WHERE<sp>lastname<sp>=<sp>\"bar\"" ) ; "<AssertPlaceHolder>" ; } exceptAll ( com . couchbase . client . java . query . dsl . path . SelectResultPath ) { element ( new com . couchbase . client . java . query . dsl . element . ExceptElement ( true , path ) ) ; return new com . couchbase . client . java . query . dsl . path . DefaultSelectResultPath ( this ) ; } | org . junit . Assert . assertEquals ( expected , statement1 . exceptAll ( statement2 ) . toString ( ) ) |
shouldAggregateElementUsingKorypheBinaryOperator ( ) { final java . lang . String reference = "reference1" ; final java . util . function . BinaryOperator < java . lang . Integer > function = new uk . gov . gchq . koryphe . binaryoperator . KorypheBinaryOperator < java . lang . Integer > ( ) { @ uk . gov . gchq . gaffer . data . element . function . Override public uk . gov . gchq . gaffer . data . element . function . Integer _apply ( final java . lang . Integer a , final java . lang . Integer b ) { return a + b ; } } ; final uk . gov . gchq . gaffer . data . element . function . ElementAggregator aggregator = new uk . gov . gchq . gaffer . data . element . function . ElementAggregator . Builder ( ) . select ( reference ) . execute ( function ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . Edge edge1 = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . property ( reference , 1 ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . Edge edge2 = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . property ( reference , 2 ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . Element result = aggregator . apply ( edge1 , edge2 ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { final boolean isCore = uk . gov . gchq . gaffer . rest . service . v2 . PropertiesServiceV2 . CORE_EXPOSED_PROPERTIES . containsKey ( propertyName ) ; boolean isExposed = isCore ; if ( ! isExposed ) { final java . lang . String propertiesList = java . lang . System . getProperty ( uk . gov . gchq . gaffer . rest . service . v2 . PropertiesServiceV2 . EXPOSED_PROPERTIES ) ; if ( null != propertiesList ) { final java . lang . String [ ] props = propertiesList . split ( "," ) ; isExposed = org . apache . commons . lang3 . ArrayUtils . contains ( props , propertyName ) ; } } java . lang . String prop ; if ( isExposed ) { prop = java . lang . System . getProperty ( propertyName ) ; if ( ( null == prop ) && isCore ) { prop = uk . gov . gchq . gaffer . rest . service . v2 . PropertiesServiceV2 . CORE_EXPOSED_PROPERTIES . get ( propertyName ) ; } } else { prop = null ; } final javax . ws . rs . core . Response . ResponseBuilder builder = ( null == prop ) ? javax . ws . rs . core . Response . status ( 404 ) . entity ( new uk . gov . gchq . gaffer . core . exception . Error . ErrorBuilder ( ) . status ( Status . NOT_FOUND ) . statusCode ( 404 ) . simpleMessage ( ( ( "Property:<sp>" + propertyName ) + "<sp>could<sp>not<sp>be<sp>found." ) ) . build ( ) ) . type ( MediaType . APPLICATION_JSON_TYPE ) : javax . ws . rs . core . Response . ok ( prop ) . type ( MediaType . TEXT_PLAIN_TYPE ) ; return builder . header ( ServiceConstants . GAFFER_MEDIA_TYPE_HEADER , ServiceConstants . GAFFER_MEDIA_TYPE ) . build ( ) ; } | org . junit . Assert . assertEquals ( 3 , result . getProperty ( reference ) ) |
to_and_from_document ( ) { final com . vividsolutions . jts . geom . Geometry geo = org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverterTest . GF . createPoint ( new com . vividsolutions . jts . geom . Coordinate ( 10 , 10 ) ) ; final org . apache . rya . indexing . TemporalInstant instant = new org . apache . rya . indexing . TemporalInstantRfc3339 ( org . joda . time . DateTime . now ( ) ) ; final org . apache . rya . indexing . geotemporal . model . Event event = org . apache . rya . indexing . geotemporal . model . Event . builder ( ) . setSubject ( new org . apache . rya . api . domain . RyaIRI ( "urn:event/001" ) ) . setGeometry ( geo ) . setTemporalInstant ( instant ) . build ( ) ; final org . bson . Document document = new org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter ( ) . toDocument ( event ) ; final org . apache . rya . indexing . geotemporal . model . Event converted = new org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter ( ) . fromDocument ( document ) ; "<AssertPlaceHolder>" ; } fromDocument ( org . bson . Document ) { requireNonNull ( document ) ; final boolean isInstant ; if ( ! ( document . containsKey ( org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter . SUBJECT ) ) ) { throw new org . apache . rya . indexing . geotemporal . mongo . DocumentConverterException ( ( ( ( ( "Could<sp>not<sp>convert<sp>document<sp>'" + document ) + "'<sp>because<sp>its<sp>'" ) + ( org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter . SUBJECT ) ) + "'<sp>field<sp>is<sp>missing." ) ) ; } if ( document . containsKey ( org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter . INSTANT ) ) { isInstant = true ; } else { isInstant = false ; } final java . lang . String subject = document . getString ( org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter . SUBJECT ) ; final org . apache . rya . indexing . geotemporal . model . Event . Builder builder = new org . apache . rya . indexing . geotemporal . model . Event . Builder ( ) . setSubject ( new org . apache . rya . api . domain . RyaIRI ( subject ) ) ; if ( document . containsKey ( org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter . GEO_KEY ) ) { final org . bson . Document geoObj = ( ( org . bson . Document ) ( document . get ( org . apache . rya . indexing . geotemporal . mongo . EventDocumentConverter . GEO_KEY ) ) ) ; final com . vividsolutions . jts . geom . GeometryFactory geoFact = new com . vividsolutions . jts . geom . GeometryFactory ( ) ; final java . lang . String typeString = ( ( java . lang . String ) ( geoObj . get ( "type" ) ) ) ; final com . vividsolutions . jts . geom . CoordinateList coords = new com . vividsolutions . jts . geom . CoordinateList ( ) ; final com . vividsolutions . jts . geom . Geometry geo ; if ( typeString . equals ( "Point" ) ) { final java . util . List < java . lang . Double > point = ( ( java . util . List < java . lang . Double > ) ( geoObj . get ( "coordinates" ) ) ) ; final com . vividsolutions . jts . geom . Coordinate coord = new com . vividsolutions . jts . geom . Coordinate ( point . get ( 0 ) , point . get ( 1 ) ) ; geo = geoFact . createPoint ( coord ) ; } else if ( typeString . equals ( "LineString" ) ) { final java . util . List < java . util . List < java . lang . Double > > pointsList = ( ( java . util . List < java . util . List < java . lang . Double > > ) ( geoObj . get ( "coordinates" ) ) ) ; for ( final java . util . List < java . lang . Double > point : pointsList ) { coords . add ( new com . vividsolutions . jts . geom . Coordinate ( point . get ( 0 ) , point . get ( 1 ) ) ) ; } geo = geoFact . createLineString ( coords . toCoordinateArray ( ) ) ; } else { final java . util . List < java . util . List < java . util . List < java . lang . Double > > > pointsList = ( ( java . util . List < java . util . List < java . util . List < java . lang . Double > > > ) ( geoObj . get ( "coordinates" ) ) ) ; if ( ( pointsList . size ( ) ) == 1 ) { final java . util . List < java . util . List < java . lang . Double > > poly = pointsList . get ( 0 ) ; for ( final java . util . List < java . lang . Double > point : poly ) { coords . add ( new com . vividsolutions . jts . geom . Coordinate ( point . get ( 0 ) , point . get ( 1 ) ) ) ; } geo = geoFact . createPolygon ( coords . toCoordinateArray ( ) ) | org . junit . Assert . assertEquals ( event , converted ) |
odatarelations_jsonFromTypenullnull ( ) { final java . lang . String entryName = "bar/90_contents/odatacol1/10_odatarelations.json" ; final java . lang . String filename = "/10_odatarelations_fromtype_null.json" ; java . net . URL fileUrl = java . lang . ClassLoader . getSystemResource ( ( ( com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . RESOURCE_PATH ) + filename ) ) ; java . io . File file = new java . io . File ( fileUrl . getPath ( ) ) ; java . io . FileInputStream fis = null ; try { fis = new java . io . FileInputStream ( file ) ; com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner testBarRunner = new com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner ( ) ; java . util . List < com . fujitsu . dc . core . bar . jackson . JSONMappedObject > res = testBarRunner . registJsonLinksUserdata ( entryName , fis ) ; "<AssertPlaceHolder>" ; return ; } catch ( com . fujitsu . dc . core . DcCoreException dce ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } catch ( java . lang . Exception ex ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } org . junit . Assert . fail ( "DcCoreException" ) ; } registJsonLinksUserdata ( java . lang . String , java . io . InputStream ) { java . util . List < com . fujitsu . dc . core . bar . jackson . JSONMappedObject > userDataLinks = new java . util . ArrayList < com . fujitsu . dc . core . bar . jackson . JSONMappedObject > ( ) ; org . codehaus . jackson . JsonParser jp = null ; org . codehaus . jackson . map . ObjectMapper mapper = new org . codehaus . jackson . map . ObjectMapper ( ) ; org . codehaus . jackson . JsonFactory f = new org . codehaus . jackson . JsonFactory ( ) ; try { jp = f . createJsonParser ( inputStream ) ; org . codehaus . jackson . JsonToken token = jp . nextToken ( ) ; if ( token == ( org . codehaus . jackson . JsonToken . START_OBJECT ) ) { token = jp . nextToken ( ) ; checkMatchFieldName ( jp , com . fujitsu . dc . core . bar . BarFileReadRunner . USERDATA_LINKS_JSON ) ; token = jp . nextToken ( ) ; if ( token != ( org . codehaus . jackson . JsonToken . START_ARRAY ) ) { throw DcCoreException . BarInstall . JSON_FILE_FORMAT_ERROR . params ( com . fujitsu . dc . core . bar . BarFileReadRunner . USERDATA_LINKS_JSON ) ; } token = jp . nextToken ( ) ; while ( jp . hasCurrentToken ( ) ) { if ( token == ( org . codehaus . jackson . JsonToken . END_ARRAY ) ) { break ; } else if ( token != ( org . codehaus . jackson . JsonToken . START_OBJECT ) ) { throw DcCoreException . BarInstall . JSON_FILE_FORMAT_ERROR . params ( com . fujitsu . dc . core . bar . BarFileReadRunner . USERDATA_LINKS_JSON ) ; } userDataLinks . add ( barFileJsonValidate ( jp , mapper , com . fujitsu . dc . core . bar . BarFileReadRunner . USERDATA_LINKS_JSON ) ) ; token = jp . nextToken ( ) ; } } else { throw DcCoreException . BarInstall . JSON_FILE_FORMAT_ERROR . params ( com . fujitsu . dc . core . bar . BarFileReadRunner . USERDATA_LINKS_JSON ) ; } } catch ( org . codehaus . jackson . JsonParseException e ) { java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "JsonParseException:<sp>" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; return null ; } catch ( org . codehaus . jackson . map . JsonMappingException e ) { java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2003" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "JsonMappingException:<sp>" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; return null ; } catch ( com . fujitsu . dc . core . DcCoreException e ) { writeOutputStream ( true , "PL-BI-1004" , entryName , e . getMessage ( ) ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "DcCoreException" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; return null ; } catch ( java . io . IOException e ) { java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2000" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "IOException:<sp>" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; return null ; } return userDataLinks ; } | org . junit . Assert . assertNull ( res ) |
testPersoonMetBetrokkenhedenMetRelatieWelBetrokkenheden ( ) { final nl . bzk . brp . model . logisch . kern . Actie actie = maakActie ( 20120101 ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht persoon = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; persoon . setBetrokkenheden ( new java . util . ArrayList < nl . bzk . brp . model . bericht . kern . BetrokkenheidBericht > ( ) ) ; final nl . bzk . brp . model . bericht . kern . KindBericht kind = new nl . bzk . brp . model . bericht . kern . KindBericht ( ) ; final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht familie = new nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht ( ) ; familie . setBetrokkenheden ( new java . util . ArrayList < nl . bzk . brp . model . bericht . kern . BetrokkenheidBericht > ( ) ) ; kind . setRelatie ( familie ) ; persoon . getBetrokkenheden ( ) . add ( kind ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = bral2010 . voerRegelUit ( null , persoon , actie , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) ) |
testVaderGevondenMaarNietOpgegeven ( ) { final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht relatie = maakFamilieRelatie ( null , maakOuderBetrokkenheid ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . geboorte . BRBY0036Test . TECHNISCHE_SLEUTEL , JaNeeAttribuut . JA ) , maakKindBetrokkenheid ( ) ) ; final java . util . Map < java . lang . String , nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > bestaandeBetrokkenen = new java . util . HashMap ( ) ; bestaandeBetrokkenen . put ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . geboorte . BRBY0036Test . TECHNISCHE_SLEUTEL , new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( new nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl ( new nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoonAttribuut ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ) ) ) ; final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView gevondenVader = maakPersoonView ( 999 ) ; org . mockito . Mockito . when ( brby0002 . bepaalKandidatenVader ( org . mockito . Matchers . any ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView . class ) , org . mockito . Matchers . any ( nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut . class ) ) ) . thenReturn ( java . util . Collections . singletonList ( gevondenVader ) ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby0036 . voerRegelUit ( null , relatie , null , bestaandeBetrokkenen ) ; org . mockito . Mockito . verify ( brby0002 , org . mockito . Mockito . times ( 1 ) ) . bepaalKandidatenVader ( org . mockito . Matchers . any ( nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView . class ) , org . mockito . Matchers . any ( nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut . class ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , berichtEntiteiten . size ( ) ) |
testEqualsWitSameObject ( ) { com . twitter . graphjet . algorithms . RecommendationStats recommendationStats = new com . twitter . graphjet . algorithms . RecommendationStats ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( obj == ( this ) ) { return true ; } if ( ( obj . getClass ( ) ) != ( getClass ( ) ) ) { return false ; } com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap . Pair other = ( ( com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap . Pair ) ( obj ) ) ; return ( ( key ) == ( other . key ) ) && ( ( metadata ) == ( other . metadata ) ) ; } | org . junit . Assert . assertTrue ( recommendationStats . equals ( recommendationStats ) ) |
isSameCause_singleArtifact_noBaseVersion_false ( ) { org . jenkinsci . plugins . pipeline . maven . MavenArtifact firstArtifact = new org . jenkinsci . plugins . pipeline . maven . MavenArtifact ( "com.example:my-jar:jar:1.0-SNAPSHOT" ) ; org . jenkinsci . plugins . pipeline . maven . MavenArtifact secondArtifact = new org . jenkinsci . plugins . pipeline . maven . MavenArtifact ( "com.example:my-jar:jar:1.1-SNAPSHOT" ) ; java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > matchingArtifacts = org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCauseHelper . isSameCause ( new org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCauseHelperTest . MavenDependencyTestCause ( firstArtifact ) , new org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCauseHelperTest . MavenDependencyTestCause ( secondArtifact ) ) ; "<AssertPlaceHolder>" ; } isSameCause ( org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCause , hudson . model . Cause ) { if ( ! ( oldMavenCause instanceof org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCause ) ) { return java . util . Collections . emptyList ( ) ; } java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > newCauseArtifacts = com . google . common . base . Preconditions . checkNotNull ( newMavenCause . getMavenArtifacts ( ) , "newMavenCause.mavenArtifacts<sp>should<sp>not<sp>be<sp>null" ) ; java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > oldCauseArtifacts = com . google . common . base . Preconditions . checkNotNull ( ( ( org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCause ) ( oldMavenCause ) ) . getMavenArtifacts ( ) , "oldMavenCause.mavenArtifacts<sp>should<sp>not<sp>be<sp>null" ) ; java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > matchingArtifacts = new java . util . ArrayList ( ) ; for ( org . jenkinsci . plugins . pipeline . maven . MavenArtifact newCauseArtifact : newCauseArtifacts ) { if ( ( newCauseArtifact . isSnapshot ( ) ) && ( newCauseArtifact . getVersion ( ) . contains ( "SNAPSHOT" ) ) ) { } else { for ( org . jenkinsci . plugins . pipeline . maven . MavenArtifact oldCauseArtifact : oldCauseArtifacts ) { if ( ( ( ( ( ( java . util . Objects . equals ( newCauseArtifact . getGroupId ( ) , oldCauseArtifact . getGroupId ( ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getArtifactId ( ) , oldCauseArtifact . getArtifactId ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getVersion ( ) , oldCauseArtifact . getVersion ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getBaseVersion ( ) , oldCauseArtifact . getBaseVersion ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getClassifier ( ) , oldCauseArtifact . getClassifier ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getType ( ) , oldCauseArtifact . getType ( ) ) ) ) { matchingArtifacts . add ( newCauseArtifact ) ; } } } } return matchingArtifacts ; } | org . junit . Assert . assertThat ( ( ! ( matchingArtifacts . isEmpty ( ) ) ) , org . hamcrest . Matchers . is ( false ) ) |
testEmptyIntersectionSingleElements ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 'a' ) ; org . antlr . v4 . runtime . misc . IntervalSet s2 = org . antlr . v4 . runtime . misc . IntervalSet . of ( 'd' ) ; java . lang . String expecting = "{}" ; java . lang . String result = s . and ( s2 ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( a ) + ".." ) + ( b ) ; } | org . junit . Assert . assertEquals ( expecting , result ) |
testJdbcDataSource ( ) { define ( org . unidal . dal . jdbc . test . TestDataSourceManager . class ) ; try { org . unidal . dal . jdbc . datasource . DataSourceManager manager = lookup ( org . unidal . dal . jdbc . datasource . DataSourceManager . class ) ; org . unidal . dal . jdbc . datasource . DataSource ds = manager . getDataSource ( "jdbc-dal" ) ; "<AssertPlaceHolder>" ; } catch ( org . unidal . dal . jdbc . datasource . DataSourceException e ) { if ( e . isDataSourceDown ( ) ) { System . out . println ( "Can't<sp>connect<sp>to<sp>database<sp>via<sp>JDBC,<sp>gave<sp>up" ) ; } else { throw e ; } } } getConnection ( ) { return m_pool . getConnection ( ) ; } | org . junit . Assert . assertNotNull ( ds . getConnection ( ) ) |
testGetAll ( ) { java . util . List < org . yes . cart . domain . vo . VoCategory > categoryList = voCategoryService . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return this . shopDao . findAll ( ) ; } | org . junit . Assert . assertNotNull ( categoryList ) |
testIfDerived_MavenPath ( ) { final org . eclipse . xtext . generator . OutputConfiguration output = new org . eclipse . xtext . generator . OutputConfiguration ( "TEST" ) ; output . setOutputDirectory ( "xtend_gen" ) ; final org . eclipse . xtext . generator . OutputConfiguration . SourceMapping sourceMapping = new org . eclipse . xtext . generator . OutputConfiguration . SourceMapping ( "src/main/xtend_gen" ) ; output . getSourceMappings ( ) . add ( sourceMapping ) ; this . classNameValidator . getContext ( ) . put ( "ProjectAwareUniqueClassNameValidator.outputConfigs" , java . util . Collections . < org . eclipse . xtext . generator . OutputConfiguration > unmodifiableList ( org . eclipse . xtext . xbase . lib . CollectionLiterals . < org . eclipse . xtext . generator . OutputConfiguration > newArrayList ( output ) ) ) ; org . eclipse . core . runtime . Path _path = new org . eclipse . core . runtime . Path ( "foo/src/main/xtend_gen/org/eclipse/test/foo.bar" ) ; final org . eclipse . xtext . xbase . ui . tests . validation . MockedFile file = new org . eclipse . xtext . xbase . ui . tests . validation . MockedFile ( _path , null ) ; "<AssertPlaceHolder>" ; } isDerived ( org . eclipse . jdt . core . IType ) { return isDerived ( type . getFullyQualifiedName ( ) , type . getJavaProject ( ) ) ; } | org . junit . Assert . assertTrue ( this . classNameValidator . isDerived ( file ) ) |
testLiveQuery ( ) { "<AssertPlaceHolder>" ; org . kie . api . runtime . KieSession kSession = kBase . newKieSession ( ) ; System . out . println ( "<sp>----<sp>Starting<sp>testLiveQuery()<sp>Test<sp>---" ) ; ca . uhn . fhir . model . dstu2 . resource . Patient patient = ( ( ca . uhn . fhir . model . dstu2 . resource . Patient ) ( new ca . uhn . fhir . model . dstu2 . resource . Patient ( ) . setId ( "Patient/1" ) ) ) ; java . util . List < ca . uhn . fhir . model . dstu2 . resource . Condition > conditions = createSnomedConditions ( 10 , patient ) ; kSession . openLiveQuery ( "all<sp>conditions<sp>for<sp>Patient" , new java . lang . Object [ ] { patient , "http://snomed.info/sct" , "all<sp>conditions<sp>for<sp>Patient" 1 } , new org . kie . api . runtime . rule . ViewChangedEventListener ( ) { public void rowInserted ( org . kie . api . runtime . rule . Row row ) { ca . uhn . fhir . model . dstu2 . resource . Condition c = ( ( ca . uhn . fhir . model . dstu2 . resource . Condition ) ( row . get ( "$c" ) ) ) ; System . out . println ( ( ( ( ( ( "<sp>>><sp>Condition<sp>Inserted:<sp>" + c ) + ",<sp>Code:<sp>" ) + ( c . getCode ( ) . getCodingFirstRep ( ) . getSystem ( ) ) ) + "all<sp>conditions<sp>for<sp>Patient" 0 ) + ( c . getCode ( ) . getCodingFirstRep ( ) . getCode ( ) ) ) ) ; } public void rowDeleted ( org . kie . api . runtime . rule . Row row ) { ca . uhn . fhir . model . dstu2 . resource . Condition c = ( ( ca . uhn . fhir . model . dstu2 . resource . Condition ) ( row . get ( "$c" ) ) ) ; System . out . println ( ( ( ( ( ( "<sp>>><sp>Condition<sp>Deleted:<sp>" + c ) + ",<sp>Code:<sp>" ) + ( c . getCode ( ) . getCodingFirstRep ( ) . getSystem ( ) ) ) + "all<sp>conditions<sp>for<sp>Patient" 0 ) + ( c . getCode ( ) . getCodingFirstRep ( ) . getCode ( ) ) ) ) ; } public void rowUpdated ( org . kie . api . runtime . rule . Row row ) { ca . uhn . fhir . model . dstu2 . resource . Condition c = ( ( ca . uhn . fhir . model . dstu2 . resource . Condition ) ( row . get ( "$c" ) ) ) ; System . out . println ( ( ( ( ( ( "<sp>>><sp>Condition<sp>Updated:<sp>" + c ) + ",<sp>Code:<sp>" ) + ( c . getCode ( ) . getCodingFirstRep ( ) . getSystem ( ) ) ) + "all<sp>conditions<sp>for<sp>Patient" 0 ) + ( c . getCode ( ) . getCodingFirstRep ( ) . getCode ( ) ) ) ) ; } } ) ; for ( ca . uhn . fhir . model . dstu2 . resource . Condition c : conditions ) { kSession . insert ( c ) ; kSession . fireAllRules ( ) ; } System . out . println ( "<sp>----<sp>Finished<sp>testLiveQuery()<sp>Test<sp>---" ) ; kSession . dispose ( ) ; } | org . junit . Assert . assertNotNull ( kBase ) |
test_load_sheet_skip_notFound ( ) { com . gh . mygreen . xlsmapper . XlsMapper mapper = new com . gh . mygreen . xlsmapper . XlsMapper ( ) ; mapper . getConiguration ( ) . setContinueTypeBindFailure ( true ) . setIgnoreSheetNotFound ( true ) ; try ( java . io . InputStream in = new java . io . FileInputStream ( inputFile ) ) { com . gh . mygreen . xlsmapper . validation . SheetBindingErrors < com . gh . mygreen . xlsmapper . fieldprocessor . AnnoSheetTest . NamedSheet2 > errors = mapper . loadDetail ( in , com . gh . mygreen . xlsmapper . fieldprocessor . AnnoSheetTest . NamedSheet2 . class ) ; "<AssertPlaceHolder>" . isNull ( ) ; } } loadDetail ( java . io . InputStream , java . lang . Class ) { com . gh . mygreen . xlsmapper . util . ArgUtils . notNull ( xlsIn , "xlsIn" ) ; com . gh . mygreen . xlsmapper . util . ArgUtils . notNull ( clazz , "clazz" ) ; final com . gh . mygreen . xlsmapper . xml . AnnotationReader annoReader = new com . gh . mygreen . xlsmapper . xml . AnnotationReader ( configuration . getAnnotationMapping ( ) . orElse ( null ) ) ; final com . gh . mygreen . xlsmapper . annotation . XlsSheet sheetAnno = annoReader . getAnnotation ( clazz , com . gh . mygreen . xlsmapper . annotation . XlsSheet . class ) ; if ( sheetAnno == null ) { throw new com . gh . mygreen . xlsmapper . AnnotationInvalidException ( sheetAnno , com . gh . mygreen . xlsmapper . localization . MessageBuilder . create ( "anno.notFound" ) . varWithClass ( "property" , clazz ) . varWithAnno ( "anno" , com . gh . mygreen . xlsmapper . annotation . XlsSheet . class ) . format ( ) ) ; } final org . apache . poi . ss . usermodel . Workbook book ; try { book = org . apache . poi . ss . usermodel . WorkbookFactory . create ( xlsIn ) ; } catch ( org . apache . poi . openxml4j . exceptions . InvalidFormatException e ) { throw new com . gh . mygreen . xlsmapper . XlsMapperException ( com . gh . mygreen . xlsmapper . localization . MessageBuilder . create ( "file.failLoadExcel.notSupportType" ) . format ( ) , e ) ; } try { final org . apache . poi . ss . usermodel . Sheet [ ] xlsSheet = configuration . getSheetFinder ( ) . findForLoading ( book , sheetAnno , annoReader , clazz ) ; return loadSheet ( xlsSheet [ 0 ] , clazz , annoReader ) ; } catch ( com . gh . mygreen . xlsmapper . SheetNotFoundException e ) { if ( configuration . isIgnoreSheetNotFound ( ) ) { com . gh . mygreen . xlsmapper . XlsLoader . logger . warn ( com . gh . mygreen . xlsmapper . localization . MessageBuilder . create ( "log.skipNotFoundSheet" ) . format ( ) , e ) ; return null ; } else { throw e ; } } } | org . junit . Assert . assertThat ( errors ) |
testServerWithoutTimeoutAndWithThreshold ( ) { boolean status = true ; org . apache . servicecomb . loadbalance . SessionStickinessRule ss = new org . apache . servicecomb . loadbalance . SessionStickinessRule ( ) ; org . apache . servicecomb . core . Invocation invocation = mock ( org . apache . servicecomb . core . Invocation . class ) ; org . apache . servicecomb . loadbalance . ServiceCombServer server = mock ( org . apache . servicecomb . loadbalance . ServiceCombServer . class ) ; java . util . List < org . apache . servicecomb . loadbalance . ServiceCombServer > servers = new java . util . ArrayList ( ) ; servers . add ( server ) ; mockit . Deencapsulation . setField ( ss , "lastServer" , server ) ; new mockit . MockUp < org . apache . servicecomb . loadbalance . SessionStickinessRule > ( ) { @ mockit . Mock private boolean isTimeOut ( ) { return false ; } } ; new mockit . MockUp < org . apache . servicecomb . loadbalance . SessionStickinessRule > ( ) { @ mockit . Mock private boolean isErrorThresholdMet ( ) { return true ; } } ; try { ss . choose ( servers , invocation ) ; } catch ( java . lang . Exception e ) { status = false ; } "<AssertPlaceHolder>" ; } choose ( java . util . List , org . apache . servicecomb . core . Invocation ) { if ( ( lastServer ) == null ) { return chooseInitialServer ( servers , invocation ) ; } if ( isTimeOut ( ) ) { org . apache . servicecomb . loadbalance . SessionStickinessRule . LOG . warn ( "session<sp>timeout.<sp>choose<sp>another<sp>server." ) ; return chooseServerWhenTimeout ( servers , invocation ) ; } else { this . lastAccessedTime = java . lang . System . currentTimeMillis ( ) ; } if ( isErrorThresholdMet ( ) ) { org . apache . servicecomb . loadbalance . SessionStickinessRule . LOG . warn ( "reached<sp>max<sp>error.<sp>choose<sp>another<sp>server." ) ; errorThresholdMet = true ; return chooseServerErrorThresholdMet ( servers , invocation ) ; } if ( ! ( servers . contains ( lastServer ) ) ) { return chooseNextServer ( servers , invocation ) ; } return lastServer ; } | org . junit . Assert . assertTrue ( status ) |
bareJsonLiteralExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = JsonLiteral ( "{}" ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "`{}`" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
allows_override_by_class ( ) { com . oneeyedmen . fakir . Factory factory = new com . oneeyedmen . fakir . DefaultFactory ( ) . withOverride ( com . oneeyedmen . fakir . DefaultFactoryTest . ClassToBeFaked . class , new com . oneeyedmen . fakir . Faker < com . oneeyedmen . fakir . DefaultFactoryTest . ClassToBeFaked > ( ) { java . lang . String thing = "bob" ; } . get ( ) ) ; "<AssertPlaceHolder>" ; } createA ( java . lang . Class ) { if ( java . math . BigDecimal . class . isAssignableFrom ( type ) ) return createBigDecimal ( ) ; if ( com . oneeyedmen . fakir . Enum . class . isAssignableFrom ( type ) ) return createEnum ( type ) ; if ( type == ( java . lang . Object . class ) ) return createObject ( ) ; if ( type == ( com . oneeyedmen . fakir . Void . class ) ) return null ; return lastResort ( type ) ; } | org . junit . Assert . assertEquals ( "bob" , ( ( com . oneeyedmen . fakir . DefaultFactoryTest . ClassToBeFaked ) ( factory . createA ( ( ( java . lang . reflect . Type ) ( com . oneeyedmen . fakir . DefaultFactoryTest . ClassToBeFaked . class ) ) ) ) ) . thing ( ) ) |
testMainForOSName ( ) { java . io . PrintStream out = System . out ; try { java . io . ByteArrayOutputStream buf = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream tmpOut = new java . io . PrintStream ( buf ) ; java . lang . System . setOut ( tmpOut ) ; org . sqlite . util . OSInfo . main ( new java . lang . String [ ] { "--os" } ) ; "<AssertPlaceHolder>" ; } finally { java . lang . System . setOut ( out ) ; } } getOSName ( ) { return org . sqlite . util . OSInfo . translateOSNameToFolderName ( java . lang . System . getProperty ( "os.name" ) ) ; } | org . junit . Assert . assertEquals ( org . sqlite . util . OSInfo . getOSName ( ) , buf . toString ( ) ) |
collectChar ( ) { org . eclipse . collections . api . list . primitive . CharList expected = org . eclipse . collections . impl . collector . Collectors2AdditionalTest . SMALL_INTERVAL . collectChar ( ( each ) -> ( ( char ) ( each % Character . MAX_VALUE ) ) , CharLists . mutable . empty ( ) ) ; org . eclipse . collections . api . list . primitive . CharList actual = this . smallData . stream ( ) . collect ( org . eclipse . collections . impl . collector . Collectors2 . collectChar ( ( each ) -> ( ( char ) ( each % Character . MAX_VALUE ) ) , org . eclipse . collections . impl . factory . primitive . CharLists . mutable :: empty ) ) ; "<AssertPlaceHolder>" ; } collectChar ( org . eclipse . collections . api . block . function . primitive . CharFunction , java . util . function . Supplier ) { return java . util . stream . Collector . of ( supplier , ( collection , each ) -> collection . add ( function . charValueOf ( each ) ) , ( collection1 , collection2 ) -> { collection1 . addAll ( collection2 ) ; return collection1 ; } , org . eclipse . collections . impl . collector . Collectors2 . EMPTY_CHARACTERISTICS ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testGetBiServerContextPath_default ( ) { doReturn ( "http://localhost:8080/" ) . when ( spyAppConfigProperties ) . getBiServerBaseUrl ( ) ; java . lang . String biServerContextPath = spyAppConfigProperties . getBiServerContextPath ( ) ; "<AssertPlaceHolder>" ; } getBiServerContextPath ( ) { java . lang . String baseUrl = getBiServerBaseUrl ( ) ; int start = baseUrl . lastIndexOf ( ":" ) ; int middle = baseUrl . indexOf ( "/" , start ) ; java . lang . String biserverContextPath = baseUrl . substring ( middle , ( ( baseUrl . length ( ) ) - 1 ) ) ; if ( ! ( ( biserverContextPath != null ) && ( ( biserverContextPath . length ( ) ) > 0 ) ) ) { biserverContextPath = org . pentaho . platform . config . AppConfigProperties . DEFAULT_BISERVER_CONTEXT_PATH ; } return biserverContextPath ; } | org . junit . Assert . assertEquals ( AppConfigProperties . DEFAULT_BISERVER_CONTEXT_PATH , biServerContextPath ) |
testExplore4 ( ) { edu . cmu . tetrad . test . Graph graph = edu . cmu . tetrad . test . GraphConverter . convert ( "A-->B,A-->C,A-->D,B-->E,C-->E,D-->E" ) ; edu . cmu . tetrad . search . Fges fges = new edu . cmu . tetrad . search . Fges ( new edu . cmu . tetrad . test . GraphScore ( graph ) ) ; edu . cmu . tetrad . test . Graph pattern = fges . search ( ) ; "<AssertPlaceHolder>" ; } patternForDag ( edu . cmu . tetrad . graph . Graph ) { edu . cmu . tetrad . graph . Graph pattern = new edu . cmu . tetrad . graph . EdgeListGraph ( dag ) ; edu . cmu . tetrad . search . SearchGraphUtils . basicPattern ( pattern , false ) ; edu . cmu . tetrad . search . MeekRules rules = new edu . cmu . tetrad . search . MeekRules ( ) ; rules . orientImplied ( pattern ) ; return pattern ; } | org . junit . Assert . assertEquals ( edu . cmu . tetrad . test . SearchGraphUtils . patternForDag ( graph ) , pattern ) |
testAuditRetrieveBasedOnEventTypes ( ) { java . util . List < java . lang . String > eventTypes = new java . util . ArrayList ( java . util . Arrays . asList ( EVENT_TYPE ) ) ; gov . hhs . fha . nhinc . auditquerylog . nhinc . proxy . AuditQueryLogProxyJavaImpl auditImpl = new gov . hhs . fha . nhinc . auditquerylog . nhinc . proxy . AuditQueryLogProxyJavaImpl ( ) ; gov . hhs . fha . nhinc . common . auditquerylog . QueryAuditEventsRequestType request = new gov . hhs . fha . nhinc . common . auditquerylog . QueryAuditEventsRequestType ( ) ; gov . hhs . fha . nhinc . common . auditquerylog . EventTypeList events = new gov . hhs . fha . nhinc . common . auditquerylog . EventTypeList ( ) ; events . getEventType ( ) . addAll ( eventTypes ) ; request . setEventTypeList ( events ) ; gov . hhs . fha . nhinc . common . auditquerylog . QueryAuditEventsResponseType response = auditImpl . retrieveAudits ( request ) ; "<AssertPlaceHolder>" ; } retrieveAudits ( gov . hhs . fha . nhinc . common . auditquerylog . QueryAuditEventsRequestType ) { return queryImpl . queryAuditEvents ( req ) ; } | org . junit . Assert . assertNotNull ( response ) |
findUsingGenericClientBySearch ( ) { final ca . uhn . fhir . jaxrs . server . example . Bundle results = ca . uhn . fhir . jaxrs . server . example . JaxRsPatientProviderDstu3Test . client . search ( ) . forResource ( ca . uhn . fhir . jaxrs . server . example . Patient . class ) . where ( Patient . NAME . matchesExactly ( ) . value ( ca . uhn . fhir . jaxrs . server . example . JaxRsPatientProviderDstu3Test . PATIENT_NAME ) ) . returnBundle ( ca . uhn . fhir . jaxrs . server . example . Bundle . class ) . execute ( ) ; System . out . println ( results . getEntry ( ) . get ( 0 ) ) ; "<AssertPlaceHolder>" ; } getEntry ( ) { if ( ( this . entry ) == null ) this . entry = new org . hl7 . fhir . dstu3 . model . ArrayList < org . hl7 . fhir . dstu3 . model . Bundle . BundleEntryComponent > ( ) ; return this . entry ; } | org . junit . Assert . assertEquals ( results . getEntry ( ) . size ( ) , 1 ) |
findFunctionsByNameInNamespaceForResourceWithSameNamedResourceFunctionShouldReturnOtherFunction ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity rootResourceType = createRootResourceType ( ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity subResourceType = createSubResourceType ( rootResourceType ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resource = createResourceWithType ( "amw" , 1000 , subResourceType , OTHER_FUNCTION_A ) ; when ( resourceRepositoryMock . loadWithFunctionsAndMiksForId ( resource . getId ( ) ) ) . thenReturn ( resource ) ; ch . puzzle . itc . mobiliar . business . function . control . List < ch . puzzle . itc . mobiliar . business . function . entity . AmwFunctionEntity > functionsWithName = functionService . findFunctionsByNameInNamespace ( resource , FUNCTION_A . getName ( ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition [ ] values = ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition . values ( ) ; for ( ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition value : values ) { if ( value . name ( ) . equals ( name ) ) { return true ; } } return false ; } | org . junit . Assert . assertTrue ( functionsWithName . contains ( OTHER_FUNCTION_A ) ) |
testTableExistsException ( ) { doThrow ( new com . bazaarvoice . emodb . sor . api . TableExistsException ( "table-name" ) ) . when ( _server ) . createTable ( eq ( "table-name" ) , any ( com . bazaarvoice . emodb . sor . api . TableOptions . class ) , any ( java . util . Map . class ) , any ( com . bazaarvoice . emodb . sor . api . Audit . class ) ) ; com . bazaarvoice . emodb . datacenter . api . DataCenter dataCenter = mock ( com . bazaarvoice . emodb . datacenter . api . DataCenter . class ) ; when ( _dataCenters . getSelf ( ) ) . thenReturn ( dataCenter ) ; when ( dataCenter . isSystem ( ) ) . thenReturn ( true ) ; com . bazaarvoice . emodb . sor . api . TableOptions options = new com . bazaarvoice . emodb . sor . api . TableOptionsBuilder ( ) . setPlacement ( "my:placement" ) . build ( ) ; java . util . Map < java . lang . String , java . lang . String > attributes = com . google . common . collect . ImmutableMap . of ( "key" , "value" ) ; com . bazaarvoice . emodb . sor . api . Audit audit = new com . bazaarvoice . emodb . sor . api . AuditBuilder ( ) . setLocalHost ( ) . build ( ) ; try { sorClient ( test . integration . sor . DataStoreJerseyTest . APIKEY_TABLE ) . createTable ( "table-name" , options , attributes , audit ) ; org . junit . Assert . fail ( ) ; } catch ( com . bazaarvoice . emodb . sor . api . TableExistsException e ) { "<AssertPlaceHolder>" ; } verify ( _server ) . createTable ( "table-name" , options , attributes , audit ) ; verifyNoMoreInteractions ( _server , _dataCenters ) ; } getTable ( ) { if ( ! ( _tableChecked ) ) { if ( ! ( _dataStore . getTableExists ( _tableName ) ) ) { _dataStore . createTable ( _tableName , new com . bazaarvoice . emodb . web . migrator . migratorstatus . TableOptionsBuilder ( ) . setPlacement ( _tablePlacement ) . build ( ) , com . bazaarvoice . emodb . web . migrator . migratorstatus . ImmutableMap . < java . lang . String , java . lang . Object > of ( ) , new com . bazaarvoice . emodb . web . migrator . migratorstatus . AuditBuilder ( ) . setLocalHost ( ) . setComment ( "Create<sp>migration<sp>status<sp>table" ) . build ( ) ) ; _tableChecked = true ; } } return _tableName ; } | org . junit . Assert . assertEquals ( e . getTable ( ) , "table-name" ) |
mergerPreservesBroadcastThatBeginsWhenTheAssertionEnds ( ) { org . atlasapi . query . content . merge . BroadcastMerger merger = org . atlasapi . query . content . merge . BroadcastMerger . parse ( "\"channelUri\"|\"2016-01-05T00:00:00Z\"|\"2016-01-06T00:00:00Z\"" ) ; org . atlasapi . media . entity . Broadcast broadcast = new org . atlasapi . media . entity . Broadcast ( "channelUri" , new org . joda . time . DateTime ( 2016 , 1 , 6 , 0 , 0 , 0 , org . joda . time . DateTimeZone . UTC ) , new org . joda . time . DateTime ( 2016 , 1 , 7 , 0 , 0 , 0 , org . joda . time . DateTimeZone . UTC ) ) ; com . google . common . collect . ImmutableSet < org . atlasapi . media . entity . Broadcast > merge = merger . merge ( com . google . common . collect . ImmutableSet . of ( ) , com . google . common . collect . ImmutableSet . of ( broadcast ) , true ) ; "<AssertPlaceHolder>" ; } contains ( org . joda . time . Interval ) { return ( this . interval . contains ( interval ) ) || ( isZeroDurationAtEndOfThisInterval ( interval ) ) ; } | org . junit . Assert . assertThat ( merge . contains ( broadcast ) , org . hamcrest . core . Is . is ( true ) ) |
testCreateAndImmediateList ( ) { int appCount = 10 ; java . lang . String random = org . apache . commons . lang3 . RandomStringUtils . randomAlphabetic ( 10 ) ; java . lang . String orgName = clientSetup . getOrganizationName ( ) ; java . lang . String appName = "testCreateAndImmediateList_app_" + random ; org . apache . usergrid . rest . test . resource . model . Token orgAdminToken = getAdminToken ( clientSetup . getUsername ( ) , clientSetup . getPassword ( ) ) ; for ( int i = 0 ; i < appCount ; i ++ ) { createAppWithCollection ( orgName , ( appName + i ) , orgAdminToken , new org . apache . usergrid . rest . applications . ArrayList ( ) ) ; } org . apache . usergrid . rest . test . resource . endpoints . mgmt . ManagementResponse orgAppResponse = clientSetup . getRestClient ( ) . management ( ) . orgs ( ) . org ( orgName ) . apps ( ) . getOrganizationApplications ( ) ; int count = 0 ; for ( java . lang . String name : orgAppResponse . getData ( ) . keySet ( ) ) { if ( name . contains ( "testcreateandimmediatelist_app" ) ) { count ++ ; } } "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return geoSorts . containsKey ( name ) ; } | org . junit . Assert . assertEquals ( appCount , count ) |
getCountOfPatients_shouldCountPatientsBySearchableAttribute_SignatureNo2 ( ) { globalPropertiesTestHelper . setGlobalProperty ( OpenmrsConstants . GLOBAL_PROPERTY_PERSON_ATTRIBUTE_SEARCH_MATCH_MODE , OpenmrsConstants . GLOBAL_PROPERTY_PERSON_ATTRIBUTE_SEARCH_MATCH_ANYWHERE ) ; long patientCount = dao . getCountOfPatients ( "Story<sp>teller" ) ; "<AssertPlaceHolder>" ; } getCountOfPatients ( java . lang . String ) { return getCountOfPatients ( query , false ) ; } | org . junit . Assert . assertEquals ( 1 , patientCount ) |
shouldGetDefaultScoreWithNoOperationScores ( ) { final uk . gov . gchq . gaffer . store . operation . resolver . IfScoreResolver resolver = new uk . gov . gchq . gaffer . store . operation . resolver . IfScoreResolver ( ) ; final uk . gov . gchq . gaffer . store . operation . resolver . DefaultScoreResolver defaultResolver = new uk . gov . gchq . gaffer . store . operation . resolver . DefaultScoreResolver ( new java . util . LinkedHashMap ( ) ) ; final uk . gov . gchq . gaffer . operation . impl . If operation = new uk . gov . gchq . gaffer . operation . impl . If ( ) ; final int score = resolver . getScore ( operation , defaultResolver ) ; "<AssertPlaceHolder>" ; } getScore ( uk . gov . gchq . gaffer . operation . Operation , uk . gov . gchq . gaffer . store . operation . resolver . ScoreResolver ) { return defaultScoreResolver . getScore ( operation ) ; } | org . junit . Assert . assertEquals ( 2 , score ) |
testGetResource ( ) { this . pool = new org . springframework . data . redis . connection . jredis . JredisPool ( connectionSpec ) ; org . jredis . JRedis client = pool . getResource ( ) ; "<AssertPlaceHolder>" ; client . ping ( ) ; } getResource ( ) { try { return internalPool . borrowObject ( ) ; } catch ( java . lang . Exception e ) { throw new org . springframework . data . redis . connection . PoolException ( "Could<sp>not<sp>get<sp>a<sp>resource<sp>from<sp>the<sp>pool" , e ) ; } } | org . junit . Assert . assertNotNull ( client ) |
testGetTableSchemaWithPtnColsSerDeReportedFields ( ) { java . util . Map < java . lang . String , java . lang . String > parameters = com . google . common . collect . Maps . newHashMap ( ) ; parameters . put ( serdeConstants . SERIALIZATION_CLASS , "org.apache.hadoop.hive.serde2.thrift.test.IntString" ) ; parameters . put ( serdeConstants . SERIALIZATION_FORMAT , "org.apache.thrift.protocol.TBinaryProtocol" ) ; org . apache . hadoop . hive . metastore . api . SerDeInfo serDeInfo = new org . apache . hadoop . hive . metastore . api . SerDeInfo ( null , "org.apache.hadoop.hive.serde2.thrift.test.IntString" 2 , parameters ) ; org . apache . hadoop . hive . metastore . api . StorageDescriptor sd = new org . apache . hadoop . hive . metastore . api . StorageDescriptor ( new java . util . ArrayList < org . apache . hadoop . hive . metastore . api . FieldSchema > ( ) , "location" , "org.apache.hadoop.mapred.TextInputFormat" , "org.apache.hadoop.mapred.TextOutputFormat" , false , ( - 1 ) , serDeInfo , new java . util . ArrayList < java . lang . String > ( ) , new java . util . ArrayList < org . apache . hadoop . hive . metastore . api . Order > ( ) , new java . util . HashMap < java . lang . String , java . lang . String > ( ) ) ; org . apache . hadoop . hive . metastore . api . Table apiTable = new org . apache . hadoop . hive . metastore . api . Table ( "test_tblname" , "org.apache.hadoop.hive.serde2.thrift.test.IntString" 1 , "test_owner" , 0 , 0 , 0 , sd , new java . util . ArrayList < org . apache . hadoop . hive . metastore . api . FieldSchema > ( ) , new java . util . HashMap < java . lang . String , java . lang . String > ( ) , "viewOriginalText" , "viewExpandedText" , TableType . EXTERNAL_TABLE . name ( ) ) ; org . apache . hadoop . hive . ql . metadata . Table table = new org . apache . hadoop . hive . ql . metadata . Table ( apiTable ) ; java . util . List < org . apache . hive . hcatalog . data . schema . HCatFieldSchema > expectedHCatSchema = com . google . common . collect . Lists . newArrayList ( new org . apache . hive . hcatalog . data . schema . HCatFieldSchema ( "org.apache.hadoop.hive.serde2.thrift.test.IntString" 0 , HCatFieldSchema . Type . INT , null ) , new org . apache . hive . hcatalog . data . schema . HCatFieldSchema ( "mystring" , HCatFieldSchema . Type . STRING , null ) , new org . apache . hive . hcatalog . data . schema . HCatFieldSchema ( "org.apache.hadoop.hive.serde2.thrift.test.IntString" 3 , HCatFieldSchema . Type . INT , null ) ) ; "<AssertPlaceHolder>" ; } getTableSchemaWithPtnCols ( org . apache . hadoop . hive . ql . metadata . Table ) { org . apache . hive . hcatalog . data . schema . HCatSchema tableSchema = new org . apache . hive . hcatalog . data . schema . HCatSchema ( org . apache . hive . hcatalog . common . HCatUtil . getHCatFieldSchemaList ( table . getCols ( ) ) ) ; if ( ( table . getPartitionKeys ( ) . size ( ) ) != 0 ) { for ( org . apache . hadoop . hive . metastore . api . FieldSchema fs : table . getPartitionKeys ( ) ) { tableSchema . append ( org . apache . hive . hcatalog . data . schema . HCatSchemaUtils . getHCatFieldSchema ( fs ) ) ; } } return tableSchema ; } | org . junit . Assert . assertEquals ( new org . apache . hive . hcatalog . data . schema . HCatSchema ( expectedHCatSchema ) , org . apache . hive . hcatalog . common . HCatUtil . getTableSchemaWithPtnCols ( table ) ) |
testAddCycle ( ) { org . grain . thread . CycleTest cycleTest = new org . grain . thread . CycleTest ( ) ; cycleTest . name = "testAddCycle" ; boolean result = org . grain . thread . AsyncThreadManager . addCycle ( cycleTest , 1 , 1 ) ; "<AssertPlaceHolder>" ; } addCycle ( org . grain . thread . ICycle , int , int ) { if ( cycle == null ) { if ( ( org . grain . thread . AsyncThreadManager . log ) != null ) { org . grain . thread . AsyncThreadManager . log . warn ( "ICycle" ) ; } return false ; } org . grain . thread . AsyncThread asyncThread = org . grain . thread . AsyncThreadManager . asyncThreadMap . get ( threadId ) ; if ( asyncThread == null ) { if ( ( org . grain . thread . AsyncThreadManager . log ) != null ) { org . grain . thread . AsyncThreadManager . log . warn ( ( "id" + threadId ) ) ; } return false ; } org . grain . thread . AsyncHandleData asyncHandleData = asyncThread . asyncHandleDataMap . get ( priority ) ; if ( asyncHandleData == null ) { if ( ( org . grain . thread . AsyncThreadManager . log ) != null ) { org . grain . thread . AsyncThreadManager . log . warn ( ( "" + priority ) ) ; } return false ; } try { asyncHandleData . waitAddCycleQueue . put ( cycle ) ; return true ; } catch ( java . lang . InterruptedException e ) { if ( ( org . grain . thread . AsyncThreadManager . log ) != null ) { org . grain . thread . AsyncThreadManager . log . error ( "ICycle" , e ) ; } return false ; } } | org . junit . Assert . assertEquals ( true , result ) |
transBlobFile_1 ( ) { org . apache . jena . dboe . transaction . txn . journal . Journal journal = org . apache . jena . dboe . transaction . txn . journal . Journal . create ( org . apache . jena . dboe . base . file . Location . create ( org . apache . jena . dboe . trans . data . TestTransBlobPersistent . DIR ) ) ; org . apache . jena . dboe . base . file . BufferChannel chan = org . apache . jena . dboe . base . file . BufferChannelFile . create ( org . apache . jena . dboe . trans . data . TestTransBlobPersistent . DATA ) ; org . apache . jena . dboe . transaction . txn . ComponentId cid = org . apache . jena . dboe . transaction . txn . ComponentId . allocLocal ( ) ; org . apache . jena . dboe . trans . data . TransBlob transBlob = new org . apache . jena . dboe . trans . data . TransBlob ( cid , chan ) ; org . apache . jena . dboe . transaction . Transactional transactional = org . apache . jena . dboe . transaction . TransactionalFactory . createTransactional ( journal , transBlob ) ; java . lang . String str = "Hello" ; org . apache . jena . dboe . trans . data . TestTransBlob . write ( transactional , transBlob , str ) ; chan . close ( ) ; journal . close ( ) ; java . lang . String s = org . apache . jena . util . FileUtils . readWholeFileAsUTF8 ( org . apache . jena . dboe . trans . data . TestTransBlobPersistent . DATA ) ; "<AssertPlaceHolder>" ; } readWholeFileAsUTF8 ( java . lang . String ) { java . nio . file . Path path = java . nio . file . Paths . get ( filename ) ; byte [ ] b = java . nio . file . Files . readAllBytes ( path ) ; return new java . lang . String ( b , org . apache . jena . util . FileUtils . utf8 ) ; } | org . junit . Assert . assertEquals ( str , s ) |
testSortByData ( ) { java . util . List < edu . umass . cs . surveyman . survey . SurveyDatum > surveyDatumList = new java . util . ArrayList ( ) ; edu . umass . cs . surveyman . survey . StringDatum e = new edu . umass . cs . surveyman . survey . StringDatum ( "e" ) ; edu . umass . cs . surveyman . survey . StringDatum w = new edu . umass . cs . surveyman . survey . StringDatum ( "w" ) ; edu . umass . cs . surveyman . survey . StringDatum q = new edu . umass . cs . surveyman . survey . StringDatum ( "q" ) ; edu . umass . cs . surveyman . survey . StringDatum b = new edu . umass . cs . surveyman . survey . StringDatum ( "b" ) ; edu . umass . cs . surveyman . survey . StringDatum s = new edu . umass . cs . surveyman . survey . StringDatum ( "s" ) ; edu . umass . cs . surveyman . survey . StringDatum r = new edu . umass . cs . surveyman . survey . StringDatum ( "r" ) ; surveyDatumList . add ( e ) ; surveyDatumList . add ( w ) ; surveyDatumList . add ( q ) ; surveyDatumList . add ( b ) ; surveyDatumList . add ( s ) ; surveyDatumList . add ( r ) ; edu . umass . cs . surveyman . qc . respondents . LexicographicRespondent . sortByData ( surveyDatumList ) ; "<AssertPlaceHolder>" ; } sortByData ( java . util . List ) { for ( int i = 0 ; i < ( ( surveyDatumList . size ( ) ) - 1 ) ; i ++ ) { for ( int j = i + 1 ; j < ( surveyDatumList . size ( ) ) ; j ++ ) { edu . umass . cs . surveyman . qc . respondents . SurveyDatum datum1 = surveyDatumList . get ( i ) ; edu . umass . cs . surveyman . qc . respondents . SurveyDatum datum2 = surveyDatumList . get ( j ) ; java . lang . String comp1 = ( datum1 instanceof edu . umass . cs . surveyman . qc . respondents . StringDatum ) ? ( ( edu . umass . cs . surveyman . qc . respondents . StringDatum ) ( datum1 ) ) . data : ( ( edu . umass . cs . surveyman . qc . respondents . HTMLDatum ) ( datum1 ) ) . data ; java . lang . String comp2 = ( datum2 instanceof edu . umass . cs . surveyman . qc . respondents . StringDatum ) ? ( ( edu . umass . cs . surveyman . qc . respondents . StringDatum ) ( datum2 ) ) . data : ( ( edu . umass . cs . surveyman . qc . respondents . HTMLDatum ) ( datum2 ) ) . data ; if ( ( comp1 . compareTo ( comp2 ) ) > 0 ) { surveyDatumList . set ( i , datum2 ) ; surveyDatumList . set ( j , datum1 ) ; } } } } | org . junit . Assert . assertArrayEquals ( surveyDatumList . toArray ( ) , new java . lang . Object [ ] { b , e , q , r , s , w } ) |
testGetUnitPercentage ( ) { java . lang . String serviceCode = "service001" ; java . lang . String referralDate = "2009-12-31" ; org . oscarehr . common . model . BillingService billingService1 = createBillingService ( serviceCode , "20080101" ) ; billingService1 . setPercentage ( "20" ) ; org . oscarehr . common . model . BillingService billingService2 = createBillingService ( serviceCode , "20090101" ) ; billingService2 . setPercentage ( "40" ) ; org . oscarehr . common . model . BillingService billingService3 = createBillingService ( serviceCode , "20100101" ) ; billingService3 . setPercentage ( "60" ) ; dao . persist ( billingService3 ) ; dao . persist ( billingService2 ) ; dao . persist ( billingService1 ) ; java . lang . String expectedResult = "40" ; java . text . SimpleDateFormat sdf = new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) ; java . lang . String result = dao . getUnitPercentage ( serviceCode , sdf . parse ( referralDate ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { org . ccil . cowan . tagsoup . Parser p = new org . ccil . cowan . tagsoup . Parser ( ) ; p . setContentHandler ( this ) ; p . setErrorHandler ( this ) ; try { p . setFeature ( Parser . defaultAttributesFeature , false ) ; p . setFeature ( Parser . ignorableWhitespaceFeature , false ) ; p . setProperty ( Parser . lexicalHandlerProperty , this ) ; org . xml . sax . InputSource inputSource = new org . xml . sax . InputSource ( new java . io . StringReader ( html ) ) ; p . parse ( inputSource ) ; } catch ( java . lang . Exception e ) { } return rebuiltHtml . toString ( ) ; } | org . junit . Assert . assertEquals ( expectedResult , result ) |
shouldCreateFolderAndDocument ( ) { javax . jcr . Node root = getSession ( ) . getNode ( "jcr:data" 0 ) ; java . lang . String name = "test" + ( java . lang . System . currentTimeMillis ( ) ) ; javax . jcr . Node node = root . addNode ( name , "nt:folder" ) ; "<AssertPlaceHolder>" ; root = getSession ( ) . getNode ( ( "jcr:data" 4 + name ) ) ; javax . jcr . Node node1 = root . addNode ( "test-1" , "nt:file" ) ; byte [ ] content = "Hello<sp>World" . getBytes ( ) ; java . io . ByteArrayInputStream bin = new java . io . ByteArrayInputStream ( content ) ; bin . reset ( ) ; javax . jcr . Node contentNode = node1 . addNode ( "jcr:data" 2 , "nt:resource" ) ; javax . jcr . Binary binary = session . getValueFactory ( ) . createBinary ( bin ) ; contentNode . setProperty ( "jcr:data" , binary ) ; contentNode . setProperty ( "jcr:data" 3 , java . util . Calendar . getInstance ( ) ) ; getSession ( ) . save ( ) ; } equals ( org . modeshape . jca . JcrConnectionRequestInfo ) { return ( equals ( workspace , o . workspace ) ) && ( equals ( creds , o . creds ) ) ; } | org . junit . Assert . assertTrue ( name . equals ( node . getName ( ) ) ) |
testDestroy ( ) { java . lang . String appName = "example-app" ; try { int result = org . apache . hadoop . yarn . service . client . TestApiServiceClient . asc . actionDestroy ( appName ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException | org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( ) ; } } actionDestroy ( java . lang . String ) { int result = EXIT_SUCCESS ; try { com . sun . jersey . api . client . ClientResponse response = getApiClient ( getServicePath ( appName ) ) . delete ( com . sun . jersey . api . client . ClientResponse . class ) ; result = processResponse ( response ) ; } catch ( java . lang . Exception e ) { org . apache . hadoop . yarn . service . client . ApiServiceClient . LOG . error ( "Fail<sp>to<sp>destroy<sp>application:<sp>" , e ) ; result = EXIT_EXCEPTION_THROWN ; } return result ; } | org . junit . Assert . assertEquals ( org . apache . hadoop . yarn . service . client . EXIT_SUCCESS , result ) |
testWriteArray4SPP8BPS ( ) { com . twelvemonkeys . imageio . plugins . tiff . ByteArrayOutputStream bytes = new com . twelvemonkeys . imageio . plugins . tiff . ByteArrayOutputStream ( ) ; com . twelvemonkeys . imageio . plugins . tiff . OutputStream stream = new com . twelvemonkeys . imageio . plugins . tiff . HorizontalDifferencingStream ( bytes , 4 , 4 , 8 , java . nio . ByteOrder . BIG_ENDIAN ) ; stream . write ( new byte [ ] { ( ( byte ) ( 255 ) ) , 0 , 127 , 0 , ( ( byte ) ( 254 ) ) , ( ( byte ) ( 255 ) ) , 126 , ( ( byte ) ( 255 ) ) , ( ( byte ) ( 250 ) ) , ( ( byte ) ( 251 ) ) , 122 , ( ( byte ) ( 251 ) ) , ( ( byte ) ( 254 ) ) , ( ( byte ) ( 255 ) ) , 126 , ( ( byte ) ( 255 ) ) , 127 , 127 , 127 , 127 , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 132 ) ) , ( ( byte ) ( 132 ) ) , ( ( byte ) ( 132 ) ) , ( ( byte ) ( 132 ) ) , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 128 ) ) , ( ( byte ) ( 128 ) ) } ) ; byte [ ] data = new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 127 ) ) , 0 , - 1 , - 1 , - 1 , - 1 , - 4 , - 4 , - 4 , - 4 , 4 , 4 , 4 , 4 , 127 , 127 , 127 , 127 , 1 , 1 , 1 , 1 , 4 , 4 , 4 , 4 , - 4 , - 4 , - 4 , - 4 } ; "<AssertPlaceHolder>" ; } toByteArray ( ) { byte [ ] newBuf = new byte [ count ] ; java . lang . System . arraycopy ( buf , 0 , newBuf , 0 , count ) ; return newBuf ; } | org . junit . Assert . assertArrayEquals ( data , bytes . toByteArray ( ) ) |
shouldTransformToBooleanTarget ( ) { boolean result = new br . com . six2six . fixturefactory . transformer . PrimitiveTransformer ( ) . transform ( "true" , boolean . class ) ; "<AssertPlaceHolder>" ; } transform ( java . lang . Object , java . lang . Class ) { return ( ( T ) ( value . toString ( ) . concat ( "1" ) ) ) ; } | org . junit . Assert . assertTrue ( result ) |
commercialCard ( ) { com . braintreegateway . integrationtest . BraintreeGateway processingRulesGateway = new com . braintreegateway . integrationtest . BraintreeGateway ( Environment . DEVELOPMENT , "processing_rules_merchant_id" , "processing_rules_public_key" , "processing_rules_private_key" ) ; com . braintreegateway . integrationtest . Customer customer = processingRulesGateway . customer ( ) . create ( new com . braintreegateway . integrationtest . CustomerRequest ( ) ) . getTarget ( ) ; com . braintreegateway . integrationtest . CreditCardRequest request = new com . braintreegateway . integrationtest . CreditCardRequest ( ) . customerId ( customer . getId ( ) ) . number ( CreditCardNumbers . CardTypeIndicators . Commercial . getValue ( ) ) . expirationDate ( "05/12" ) . options ( ) . verifyCard ( true ) . done ( ) ; com . braintreegateway . integrationtest . Result < com . braintreegateway . integrationtest . CreditCard > result = processingRulesGateway . creditCard ( ) . create ( request ) ; com . braintreegateway . integrationtest . CreditCard card = result . getTarget ( ) ; "<AssertPlaceHolder>" ; } getCommercial ( ) { if ( commercial . equals ( CreditCard . Commercial . YES . toString ( ) ) ) { return CreditCard . Commercial . YES ; } else if ( commercial . equals ( CreditCard . Commercial . NO . toString ( ) ) ) { return CreditCard . Commercial . NO ; } else { return CreditCard . Commercial . UNKNOWN ; } } | org . junit . Assert . assertEquals ( CreditCard . Commercial . YES , card . getCommercial ( ) ) |
testGetNodeNoNamespace ( ) { java . io . InputStream is = new java . io . ByteArrayInputStream ( "<foo><bar/></foo>" . getBytes ( ) ) ; org . apache . cxf . jaxrs . ext . xml . XMLSource xp = new org . apache . cxf . jaxrs . ext . xml . XMLSource ( is ) ; xp . setBuffering ( ) ; org . apache . cxf . jaxrs . ext . xml . XMLSourceTest . Bar bar = xp . getNode ( "/foo/bar" , org . apache . cxf . jaxrs . ext . xml . XMLSourceTest . Bar . class ) ; "<AssertPlaceHolder>" ; } getNode ( java . lang . String , java . lang . Class ) { return getNode ( expression , org . apache . cxf . helpers . CastUtils . cast ( java . util . Collections . emptyMap ( ) , java . lang . String . class , java . lang . String . class ) , cls ) ; } | org . junit . Assert . assertNotNull ( bar ) |
xmldbURICompareTo2 ( ) { org . exist . xmldb . XmldbURI xmldbURI1 = org . exist . xmldb . XmldbURI . xmldbUriFor ( "xmldb:exist:///db/collection1" ) ; org . exist . xmldb . XmldbURI xmldbURI2 = org . exist . xmldb . XmldbURI . xmldbUriFor ( "xmldb:exist:///db/collection1" ) ; "<AssertPlaceHolder>" ; } compareTo ( org . exist . indexing . ngram . NGramIndexWorker$QNameTerm ) { final int cmp = qname . compareTo ( other . qname ) ; if ( cmp == 0 ) { return term . compareTo ( other . term ) ; } return cmp ; } | org . junit . Assert . assertEquals ( 0 , xmldbURI1 . compareTo ( xmldbURI2 ) ) |
testCase66 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase66 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) ) |
composeRedirectUrl_RedirectToService ( ) { org . oscm . ui . dialog . mp . landingpage . LandingpageEntryModel entry = new org . oscm . ui . dialog . mp . landingpage . LandingpageEntryModel ( newEntry ( "s1" ) ) ; entry . setSubscribed ( true ) ; entry . setServiceAccessURL ( "base_url" ) ; entry . setAccessLink ( "access_url" ) ; java . lang . String result = ctrl . composeRedirectUrl ( entry ) ; "<AssertPlaceHolder>" ; } composeRedirectUrl ( org . oscm . ui . dialog . mp . landingpage . LandingpageEntryModel ) { if ( selectedEntry . isSubscribed ( ) ) { if ( ( selectedEntry . getServiceAccessURL ( ) ) == null ) { return composeMySubscriptionsUrl ( ) ; } else { return composeServiceUrl ( selectedEntry ) ; } } else { return composeServiceDetailsUrl ( selectedEntry ) ; } } | org . junit . Assert . assertEquals ( "access_url" , result ) |
whenMimeIsEncoded_thenOk ( ) { final java . lang . StringBuilder buffer = com . baeldung . java8 . base64 . Java8EncodeDecodeUnitTest . getMimeBuffer ( ) ; final byte [ ] forEncode = buffer . toString ( ) . getBytes ( ) ; final java . lang . String encodedMime = java . util . Base64 . getMimeEncoder ( ) . encodeToString ( forEncode ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "Movie<sp>[imdbId=" + ( imdbId ) ) + ",<sp>director=" ) + ( director ) ) + ",<sp>actors=" ) + ( actors ) ) + "]" ; } | org . junit . Assert . assertNotNull ( encodedMime ) |
itComputesAPIEndpointBasedOnAutomationEndpoint ( ) { java . lang . String [ ] [ ] expectedTransformations = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "/automation/" , "/api/v1/" } , new java . lang . String [ ] { "/nuxeo/site/automation/" , "/nuxeo/api/v1/" } , new java . lang . String [ ] { "/nuxeo/api/v1/automation/" , "/nuxeo/api/v1/" } , new java . lang . String [ ] { "/api/v1/automation/" , "/api/v1/" } } ; for ( java . lang . String [ ] expected : expectedTransformations ) { org . nuxeo . ecm . automation . client . jaxrs . impl . HttpAutomationClient client = new org . nuxeo . ecm . automation . client . jaxrs . impl . HttpAutomationClient ( expected [ 0 ] ) ; java . net . URI uri = client . getRestClient ( ) . service . getURI ( ) ; "<AssertPlaceHolder>" ; } } toString ( ) { buildAuditQuery ( true ) ; java . lang . StringBuffer sb = new java . lang . StringBuffer ( ) ; sb . append ( ( "\nquery<sp>:<sp>" + ( auditQuery ) ) ) ; sb . append ( "\nparams<sp>:<sp>" ) ; java . util . List < java . lang . String > pNames = new java . util . ArrayList < java . lang . String > ( auditQueryParams . keySet ( ) ) ; java . util . Collections . sort ( pNames ) ; for ( java . lang . String name : pNames ) { sb . append ( "\n<sp>" ) ; sb . append ( name ) ; sb . append ( "<sp>:<sp>" ) ; sb . append ( auditQueryParams . get ( name ) . toString ( ) ) ; } return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( expected [ 1 ] , uri . toString ( ) ) |
testEqualsWhenIdentical ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return super . equals ( o ) ; } | org . junit . Assert . assertThat ( entry . equals ( entry ) , org . hamcrest . Matchers . equalTo ( true ) ) |
isChangesetFullyCloaked_partiallyCloakedPaths ( ) { final java . util . List < java . lang . String > changesetPaths = java . util . Arrays . asList ( "$/foo" , "$/bar" ) ; final java . util . List < java . lang . String > cloakedPaths = java . util . Collections . singletonList ( "$/foo" ) ; final boolean actual = hudson . plugins . tfs . model . Project . isChangesetFullyCloaked ( changesetPaths , cloakedPaths ) ; "<AssertPlaceHolder>" ; } isChangesetFullyCloaked ( java . util . Collection , java . util . Collection ) { if ( cloakedPaths == null ) { return false ; } for ( final java . lang . String tfsPath : changesetPaths ) { boolean isPathCloaked = false ; for ( final java . lang . String cloakedPath : cloakedPaths ) { if ( tfsPath . regionMatches ( true , 0 , cloakedPath , 0 , cloakedPath . length ( ) ) ) { isPathCloaked = true ; break ; } } if ( ! isPathCloaked ) { return false ; } } return true ; } | org . junit . Assert . assertEquals ( false , actual ) |
isPropertyDisplayableWhenCardinalityIsNullShouldReturnTrue ( ) { java . lang . Integer cardinality = null ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty propertyMock = mock ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . class ) ; when ( propertyMock . getCardinalityProperty ( ) ) . thenReturn ( cardinality ) ; boolean propertyDisplayable = editPropertiesTable . isPropertyDisplayable ( propertyMock ) ; "<AssertPlaceHolder>" ; } isPropertyDisplayable ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty ) { return ( property != null ) && ( ( ( property . getCardinalityProperty ( ) ) == null ) || ( ( property . getCardinalityProperty ( ) ) != ( - 1 ) ) ) ; } | org . junit . Assert . assertTrue ( propertyDisplayable ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . document . library . kernel . model . DLFileEntry newDLFileEntry = addDLFileEntry ( ) ; com . liferay . document . library . kernel . model . DLFileEntry existingDLFileEntry = _persistence . fetchByPrimaryKey ( newDLFileEntry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; } | org . junit . Assert . assertEquals ( existingDLFileEntry , newDLFileEntry ) |
itConvertsUTF8 ( ) { java . lang . String ecProperty = "utf-8" ; java . lang . String expected = "UTF-8" ; com . welovecoding . nbeditorconfig . io . model . MappedCharset charset = com . welovecoding . nbeditorconfig . mapper . EditorConfigPropertyMapper . mapCharset ( ecProperty ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( expected , charset . getName ( ) ) |
testparse2EdmPropertyValueMap ( ) { com . sap . core . odata . processor . core . jpa . access . data . JPAEntityParser resultParser = new com . sap . core . odata . processor . core . jpa . access . data . JPAEntityParser ( ) ; java . lang . Object jpaEntity = new com . sap . core . odata . processor . core . jpa . JPAEntityParserTest . demoItem ( "abc" , 10 ) ; com . sap . core . odata . api . edm . EdmStructuralType structuralType = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmStructuralType . class ) ; com . sap . core . odata . api . edm . EdmProperty edmTyped = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmProperty . class ) ; com . sap . core . odata . api . edm . EdmType edmType = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmType . class ) ; com . sap . core . odata . api . edm . EdmProperty edmTyped01 = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmProperty . class ) ; com . sap . core . odata . api . edm . EdmType edmType01 = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmType . class ) ; com . sap . core . odata . api . edm . EdmMapping edmMapping = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmMapping . class ) ; com . sap . core . odata . api . edm . EdmMapping edmMapping01 = org . easymock . EasyMock . createMock ( com . sap . core . odata . api . edm . EdmMapping . class ) ; try { org . easymock . EasyMock . expect ( edmType . getKind ( ) ) . andStubReturn ( EdmTypeKind . SIMPLE ) ; org . easymock . EasyMock . expect ( edmTyped . getName ( ) ) . andStubReturn ( "identifier" ) ; org . easymock . EasyMock . replay ( edmType ) ; org . easymock . EasyMock . expect ( edmMapping . getInternalName ( ) ) . andStubReturn ( "id" ) ; org . easymock . EasyMock . replay ( edmMapping ) ; org . easymock . EasyMock . expect ( edmTyped . getType ( ) ) . andStubReturn ( edmType ) ; org . easymock . EasyMock . expect ( edmTyped . getMapping ( ) ) . andStubReturn ( edmMapping ) ; org . easymock . EasyMock . replay ( edmTyped ) ; org . easymock . EasyMock . expect ( structuralType . getProperty ( "identifier" ) ) . andStubReturn ( edmTyped ) ; org . easymock . EasyMock . expect ( edmType01 . getKind ( ) ) . andStubReturn ( EdmTypeKind . SIMPLE ) ; org . easymock . EasyMock . expect ( edmTyped01 . getName ( ) ) . andStubReturn ( "Value" ) ; org . easymock . EasyMock . replay ( edmType01 ) ; org . easymock . EasyMock . expect ( edmMapping01 . getInternalName ( ) ) . andStubReturn ( "value" ) ; org . easymock . EasyMock . replay ( edmMapping01 ) ; org . easymock . EasyMock . expect ( edmTyped01 . getType ( ) ) . andStubReturn ( edmType01 ) ; org . easymock . EasyMock . expect ( edmTyped01 . getMapping ( ) ) . andStubReturn ( edmMapping01 ) ; org . easymock . EasyMock . replay ( edmTyped01 ) ; org . easymock . EasyMock . expect ( structuralType . getProperty ( "value" ) ) . andStubReturn ( edmTyped01 ) ; java . util . List < java . lang . String > propNames = new java . util . ArrayList < java . lang . String > ( ) ; propNames . add ( "identifier" ) ; propNames . add ( "value" ) ; org . easymock . EasyMock . expect ( structuralType . getPropertyNames ( ) ) . andReturn ( propNames ) ; org . easymock . EasyMock . replay ( structuralType ) ; } catch ( com . sap . core . odata . api . edm . EdmException e ) { org . junit . Assert . fail ( ( ( ( com . sap . core . odata . processor . core . jpa . common . ODataJPATestConstants . EXCEPTION_MSG_PART_1 ) + ( e . getMessage ( ) ) ) + ( com . sap . core . odata . processor . core . jpa . common . ODataJPATestConstants . EXCEPTION_MSG_PART_2 ) ) ) ; } try { java . util . Map < java . lang . String , java . lang . Object > result = resultParser . parse2EdmPropertyValueMap ( jpaEntity , structuralType ) ; "<AssertPlaceHolder>" ; } catch ( com . sap . core . odata . processor . api . jpa . exception . ODataJPARuntimeException e ) { org . junit . Assert . fail ( ( ( ( com . sap . core . odata . processor . core . jpa . common . ODataJPATestConstants . EXCEPTION_MSG_PART_1 ) + ( e . getMessage ( ) ) ) + ( com . sap . core . odata . processor . core . jpa . common . ODataJPATestConstants . EXCEPTION_MSG_PART_2 ) ) ) ; } } parse2EdmPropertyValueMap ( java . lang . Object , com . sap . core . odata . api . edm . EdmStructuralType ) { if ( ( jpaEntity == null ) || ( structuralType == null ) ) { return null ; } java . | org . junit . Assert . assertEquals ( 2 , result . size ( ) ) |
retrieveSubscriptionReportDataUnitListEmpty ( ) { java . util . List < org . oscm . reportingservice . dao . ReportResultData > result = retrieveSubscriptionReportData ( supplierCustomer . getOrganizationId ( ) , java . util . Collections . < java . lang . Long > emptyList ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testSysPurposePoolPriorityUseCase10RoleMatchesSLABreaksTheTie ( ) { consumer . setRole ( "RHEL<sp>Server" ) ; consumer . setServiceLevel ( "Premium" ) ; org . candlepin . model . Product prodRH00009 = createSysPurposeProduct ( null , "RHEL<sp>Server" , "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." 1 , "Standard" , "Production" ) ; org . candlepin . model . Pool RH00009 = org . candlepin . test . TestUtil . createPool ( owner , prodRH00009 ) ; RH00009 . setId ( "RH00009" ) ; org . candlepin . model . Product prodRH00008 = createSysPurposeProduct ( null , "RHEL<sp>Server" , "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." 1 , "Premium" , "Production" ) ; org . candlepin . model . Pool RH00008 = org . candlepin . test . TestUtil . createPool ( owner , prodRH00008 ) ; RH00008 . setId ( "RH00008" ) ; jsRules . reinitTo ( "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." 2 ) ; org . candlepin . policy . js . JsonJsContext args = new org . candlepin . policy . js . JsonJsContext ( mapper ) ; args . put ( "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." 0 , org . candlepin . policy . AutobindRulesTest . log , false ) ; args . put ( "consumer" , consumer ) ; args . put ( "compliance" , compliance ) ; args . put ( "pool" , RH00009 ) ; java . lang . Double RH00009Priority = jsRules . invokeMethod ( "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." 3 , args ) ; args . put ( "pool" , RH00008 ) ; java . lang . Double RH00008Priority = jsRules . invokeMethod ( "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." 3 , args ) ; "<AssertPlaceHolder>" ; } invokeMethod ( java . lang . String , org . candlepin . policy . js . JsContext ) { context . applyTo ( scope ) ; return ( ( T ) ( invokeMethod ( method ) ) ) ; } | org . junit . Assert . assertTrue ( "Pool<sp>RH00008<sp>should<sp>have<sp>a<sp>higher<sp>priority<sp>than<sp>pool<sp>RH00009." , ( RH00008Priority > RH00009Priority ) ) |
testSearchByStorageType ( ) { addStructure ( com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , com . liferay . portal . kernel . util . StringUtil . randomString ( ) ) ; java . util . List < com . liferay . dynamic . data . mapping . model . DDMStructure > structures = com . liferay . dynamic . data . mapping . service . DDMStructureLocalServiceUtil . search ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) , new long [ ] { group . getGroupId ( ) } , com . liferay . dynamic . data . mapping . service . test . DDMStructureLocalServiceTest . _classNameId , null , null , StorageType . JSON . toString ( ) , DDMStructureConstants . TYPE_DEFAULT , WorkflowConstants . STATUS_APPROVED , true , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( structures . toString ( ) , 1 , structures . size ( ) ) |
main_NoInputState_TextPrintedToConsole ( ) { java . util . Map < com . baeldung . hashcode . entities . User , com . baeldung . hashcode . entities . User > users = new java . util . HashMap ( ) ; com . baeldung . hashcode . entities . User user1 = new com . baeldung . hashcode . entities . User ( 1L , "John" , "john@domain.com" ) ; com . baeldung . hashcode . entities . User user2 = new com . baeldung . hashcode . entities . User ( 2L , "Jennifer" , "jennifer@domain.com" ) ; com . baeldung . hashcode . entities . User user3 = new com . baeldung . hashcode . entities . User ( 3L , "Mary" , "mary@domain.com" ) ; users . put ( user1 , user1 ) ; users . put ( user2 , user2 ) ; users . put ( user3 , user3 ) ; "<AssertPlaceHolder>" ; } containsKey ( java . lang . String ) { try { readLock . lock ( ) ; return com . baeldung . concurrent . locks . SynchronizedHashMapWithRWLock . syncHashMap . containsKey ( key ) ; } finally { readLock . unlock ( ) ; } } | org . junit . Assert . assertTrue ( users . containsKey ( user1 ) ) |
setPropertyValueOnAllResourceRelationsForContextWhereNotYetSetShouldThrowExceptionWhenNoRelationsFound ( ) { java . lang . String resourceGroupName = "resourceGroupName" ; java . lang . String relatedResourceGroupName = "relatedResourceGroupName" ; java . lang . String relatedResourceReleaseName = "relatedResourceReleaseName" ; java . lang . String contextName = "contextName" ; java . lang . String propertyName = "propertyName" ; java . lang . String propertyValue = "propertyValue" ; ch . puzzle . itc . mobiliar . business . property . boundary . List < ch . puzzle . itc . mobiliar . business . property . boundary . ResourceEntity > resourcesByGroupNameWithRelations = new ch . puzzle . itc . mobiliar . business . property . boundary . ArrayList ( ) ; when ( resourceLocatorMock . getResourcesByGroupNameWithRelations ( resourceGroupName ) ) . thenReturn ( resourcesByGroupNameWithRelations ) ; ch . puzzle . itc . mobiliar . business . property . boundary . ResourceEntity relatedResource = createWithIdNameAndTypeName ( 1 , relatedResourceGroupName , "relatedResourceType" ) ; when ( resourceLocatorMock . getResourceByGroupNameAndRelease ( relatedResourceGroupName , relatedResourceReleaseName ) ) . thenReturn ( relatedResource ) ; "<AssertPlaceHolder>" ; editor . setPropertyValueOnAllResourceRelationsForContextWhereNotYetSet ( resourceGroupName , relatedResourceGroupName , relatedResourceReleaseName , contextName , propertyName , propertyValue ) ; } isEmpty ( ) { if ( ( ( asProperties ) != null ) && ( ! ( asProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( nodeProperties ) != null ) && ( ! ( nodeProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( consumerUnit ) != null ) && ( ! ( consumerUnit . isEmpty ( ) ) ) ) { return false ; } return true ; } | org . junit . Assert . assertTrue ( resourcesByGroupNameWithRelations . isEmpty ( ) ) |
should_return_this ( ) { org . fest . assertions . api . BooleanAssert returned = assertions . isFalse ( ) ; "<AssertPlaceHolder>" ; } isFalse ( ) { return isEqualTo ( false ) ; } | org . junit . Assert . assertSame ( assertions , returned ) |
givenNotAllEqualList_whenUsingStream_thenReturnFalse ( ) { boolean allEqual = com . baeldung . allequalelements . VerifyAllEqualListElementsUnitTest . verifyAllEqualListElements . verifyAllEqualUsingStream ( com . baeldung . allequalelements . VerifyAllEqualListElementsUnitTest . notAllEqualList ) ; "<AssertPlaceHolder>" ; } verifyAllEqualUsingStream ( java . util . List ) { return ( list . stream ( ) . distinct ( ) . count ( ) ) <= 1 ; } | org . junit . Assert . assertFalse ( allEqual ) |
testSetParent ( ) { org . eclipse . swt . widgets . Composite parent = mock ( org . eclipse . swt . widgets . Composite . class ) ; adapter . setParent ( parent ) ; "<AssertPlaceHolder>" ; } getParent ( ) { return parent ; } | org . junit . Assert . assertSame ( parent , adapter . getParent ( ) ) |
testGetValue_Integer ( ) { int result = ( ( java . lang . Integer ) ( com . eclipsesource . v8 . utils . V8ObjectUtils . getValue ( 7 ) ) ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object ) { return com . eclipsesource . v8 . utils . V8ObjectUtils . getValue ( v8Object , com . eclipsesource . v8 . utils . V8ObjectUtils . DEFAULT_TYPE_ADAPTER ) ; } | org . junit . Assert . assertEquals ( 7 , result ) |
testGetUsersFromNullListIds ( ) { final org . bonitasoft . engine . identity . model . SUser eetu = org . bonitasoft . engine . builder . BuilderFactory . get ( org . bonitasoft . engine . identity . model . builder . SUserBuilderFactory . class ) . createNewInstance ( ) . setUserName ( "Eetu" ) . setPassword ( "kikoo" ) . done ( ) ; final org . bonitasoft . engine . identity . model . SUser inkeri = org . bonitasoft . engine . builder . BuilderFactory . get ( org . bonitasoft . engine . identity . model . builder . SUserBuilderFactory . class ) . createNewInstance ( ) . setUserName ( "Inkeri" ) . setPassword ( "kikoo" ) . done ( ) ; getTransactionService ( ) . begin ( ) ; org . bonitasoft . engine . identity . IdentityServiceTest . identityService . createUser ( eetu ) ; org . bonitasoft . engine . identity . IdentityServiceTest . identityService . createUser ( inkeri ) ; final java . util . List < org . bonitasoft . engine . identity . model . SUser > retrievedUsers = org . bonitasoft . engine . identity . IdentityServiceTest . identityService . getUsers ( null ) ; getTransactionService ( ) . complete ( ) ; "<AssertPlaceHolder>" ; } complete ( ) { } | org . junit . Assert . assertEquals ( 0 , retrievedUsers . size ( ) ) |
shouldApplyNodePropertyCommandToTheStoreInRecovery ( ) { final org . neo4j . kernel . impl . api . BatchTransactionApplier applier = newApplier ( true ) ; final org . neo4j . kernel . impl . store . record . PropertyRecord before = new org . neo4j . kernel . impl . store . record . PropertyRecord ( 11 ) ; final org . neo4j . kernel . impl . store . record . PropertyRecord after = new org . neo4j . kernel . impl . store . record . PropertyRecord ( 12 ) ; after . setNodeId ( 42 ) ; final org . neo4j . kernel . impl . transaction . command . Command command = new org . neo4j . kernel . impl . transaction . command . Command . PropertyCommand ( before , after ) ; boolean result = apply ( applier , command :: handle , transactionToApply ) ; "<AssertPlaceHolder>" ; verify ( lockService , times ( 1 ) ) . acquireNodeLock ( 42 , LockService . LockType . WRITE_LOCK ) ; verify ( propertyStore , times ( 1 ) ) . setHighestPossibleIdInUse ( after . getId ( ) ) ; verify ( propertyStore , times ( 1 ) ) . updateRecord ( after ) ; } apply ( org . neo4j . kernel . api . proc . Context , java . lang . Object [ ] , org . neo4j . kernel . api . ResourceTracker ) { try { java . lang . Thread . sleep ( 50 ) ; } catch ( java . lang . InterruptedException e ) { throw new org . neo4j . internal . kernel . api . exceptions . ProcedureException ( Status . General . UnknownError , e , "Interrupted" ) ; } return org . neo4j . collection . RawIterator . empty ( ) ; } | org . junit . Assert . assertFalse ( result ) |
testRandomInt ( ) { int random = org . openscience . cdk . math . RandomNumbersTool . randomInt ( ) ; "<AssertPlaceHolder>" ; } randomInt ( ) { return org . openscience . cdk . math . RandomNumbersTool . randomInt ( 0 , 1 ) ; } | org . junit . Assert . assertTrue ( ( ( random == 0 ) || ( random == 1 ) ) ) |
testInstall ( ) { when ( applicationEntityService . create ( any ( org . apache . eagle . metadata . model . ApplicationEntity . class ) ) ) . thenReturn ( generateCommonEntity ( ) ) ; resultEntity = applicationManagementService . install ( installOperation ) ; "<AssertPlaceHolder>" ; } install ( org . apache . eagle . app . service . impl . ApplicationOperations$InstallOperation ) { com . google . common . base . Preconditions . checkNotNull ( operation . getSiteId ( ) , "siteId<sp>is<sp>null" ) ; com . google . common . base . Preconditions . checkNotNull ( operation . getAppType ( ) , "appType<sp>is<sp>null" ) ; org . apache . eagle . app . service . impl . SiteEntity siteEntity = siteEntityService . getBySiteId ( operation . getSiteId ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( siteEntity , ( ( "Site<sp>with<sp>ID:<sp>" + ( operation . getSiteId ( ) ) ) + "<sp>is<sp>not<sp>found" ) ) ; org . apache . eagle . app . service . impl . ApplicationDesc appDesc = applicationProviderService . getApplicationDescByType ( operation . getAppType ( ) ) ; com . google . common . base . Preconditions . checkNotNull ( ( ( "Application<sp>with<sp>TYPE:<sp>" + ( operation . getAppType ( ) ) ) + "<sp>is<sp>not<sp>found" ) ) ; org . apache . eagle . app . service . impl . ApplicationEntity applicationEntity = new org . apache . eagle . app . service . impl . ApplicationEntity ( ) ; applicationEntity . setDescriptor ( appDesc ) ; applicationEntity . setSite ( siteEntity ) ; applicationEntity . setMode ( operation . getMode ( ) ) ; applicationEntity . setJarPath ( ( ( operation . getJarPath ( ) ) == null ? appDesc . getJarPath ( ) : operation . getJarPath ( ) ) ) ; applicationEntity . ensureDefault ( ) ; java . util . Map < java . lang . String , java . lang . Object > appConfig = new java . util . HashMap ( ) ; org . apache . eagle . app . spi . ApplicationProvider provider = applicationProviderService . getApplicationProviderByType ( operation . getAppType ( ) ) ; org . apache . eagle . app . service . impl . ApplicationDesc applicationDesc = provider . getApplicationDesc ( ) ; if ( ( applicationDesc . getConfiguration ( ) ) != null ) { java . util . List < org . apache . eagle . app . service . impl . Property > propertyList = provider . getApplicationDesc ( ) . getConfiguration ( ) . getProperties ( ) ; for ( org . apache . eagle . app . service . impl . Property p : propertyList ) { appConfig . put ( p . getName ( ) , p . getValue ( ) ) ; } if ( ( operation . getConfiguration ( ) ) != null ) { appConfig . putAll ( operation . getConfiguration ( ) ) ; } } applicationEntity . setConfiguration ( appConfig ) ; applicationEntity . getContext ( ) . put ( "siteId" , siteEntity . getSiteId ( ) ) ; applicationEntity . getContext ( ) . put ( "appId" , applicationEntity . getAppId ( ) ) ; validateDependingApplicationInstalled ( applicationEntity ) ; org . apache . eagle . app . spi . ApplicationProvider < ? > applicationProvider = applicationProviderService . getApplicationProviderByType ( applicationEntity . getDescriptor ( ) . getType ( ) ) ; org . apache . eagle . app . service . impl . ApplicationAction applicationAction = new org . apache . eagle . app . service . impl . ApplicationAction ( applicationProvider . getApplication ( ) , applicationEntity , config , alertMetadataService ) ; applicationAction . doInstall ( ) ; applicationHealthCheckService . register ( applicationEntity ) ; org . apache . eagle . app . service . impl . ApplicationEntity result = applicationEntityService . create ( applicationEntity ) ; applicationProvider . getApplicationListener ( ) . ifPresent ( ( listener ) -> { currentInjector . injectMembers ( listener ) ; listener . init ( result ) ; listener . afterInstall ( ) ; } ) ; return result ; } | org . junit . Assert . assertNotNull ( resultEntity ) |
init ( ) { final java . lang . Object value = org . springframework . test . util . ReflectionTestUtils . getField ( repository , "workersManager" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( value ) |
roundtripOfDateIntervalClosed ( ) { net . time4j . PlainDate start = net . time4j . PlainDate . of ( 2014 , 2 , 27 ) ; net . time4j . PlainDate end = net . time4j . PlainDate . of ( 2014 , 5 , 14 ) ; java . lang . Object interval = net . time4j . range . DateInterval . between ( start , end ) ; java . lang . Object ser = net . time4j . range . SerializationTest . roundtrip ( interval ) ; "<AssertPlaceHolder>" ; } roundtrip ( java . lang . Object ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream oos = new java . io . ObjectOutputStream ( baos ) ; oos . writeObject ( obj ) ; byte [ ] data = baos . toByteArray ( ) ; oos . close ( ) ; java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( data ) ; java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( bais ) ; java . lang . Object ser = ois . readObject ( ) ; ois . close ( ) ; return ser ; } | org . junit . Assert . assertThat ( interval , org . hamcrest . CoreMatchers . is ( ser ) ) |
testOperator_minusNull ( ) { java . lang . Number x = null ; java . math . BigDecimal result = org . eclipse . smarthome . model . script . lib . NumberExtensions . operator_minus ( x ) ; "<AssertPlaceHolder>" ; } operator_minus ( java . lang . Number ) { java . math . BigDecimal xValue = org . eclipse . smarthome . model . script . lib . NumberExtensions . numberToBigDecimal ( x ) ; if ( xValue == null ) { return xValue ; } else { return xValue . negate ( ) ; } } | org . junit . Assert . assertNull ( result ) |
replace_3arg_NullValue1 ( ) { try { "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception<sp>-<sp>null<sp>value<sp>not<sp>allowed" ) ; } catch ( java . lang . NullPointerException e ) { } } replace ( K , V , V ) { return new Semantic . UpdateExisting < K , V , java . lang . Boolean > ( ) { @ java . lang . Override public void update ( Progress < org . cache2k . core . operation . K , org . cache2k . core . operation . V , java . lang . Boolean > c , ExaminationEntry < org . cache2k . core . operation . K , org . cache2k . core . operation . V > e ) { if ( ( c . isPresentOrMiss ( ) ) && ( ( value == ( e . getValueOrException ( ) ) ) || ( ( value != null ) && ( value . equals ( e . getValueOrException ( ) ) ) ) ) ) { c . result ( true ) ; c . put ( newValue ) ; return ; } c . result ( false ) ; } } ; } | org . junit . Assert . assertFalse ( cache . replace ( 1L , null , "2" ) ) |
testAddBrandingWithAbsentBranding ( ) { org . candlepin . dto . manifest . v1 . PoolDTO dto = new org . candlepin . dto . manifest . v1 . PoolDTO ( ) ; org . candlepin . dto . manifest . v1 . BrandingDTO branding = new org . candlepin . dto . manifest . v1 . BrandingDTO ( ) ; branding . setProductId ( "test-branding-product-id-1" ) ; branding . setName ( "test-branding-name-1" ) ; branding . setType ( "test-branding-type-1" ) ; "<AssertPlaceHolder>" ; } addBranding ( org . candlepin . dto . manifest . v1 . BrandingDTO ) { if ( isNullOrIncomplete ( branding ) ) { throw new java . lang . IllegalArgumentException ( "branding<sp>is<sp>null<sp>or<sp>incomplete" ) ; } if ( ( this . branding ) == null ) { this . branding = new java . util . HashSet ( ) ; } return this . branding . add ( branding ) ; } | org . junit . Assert . assertTrue ( dto . addBranding ( branding ) ) |
shouldExtractSessionServiceTask ( ) { android . content . Intent intent = new android . content . Intent ( mock ( android . content . Context . class ) , pl . llp . aircasting . sensor . common . SensorService . class ) ; intent . putExtra ( Intents . SESSION_SERVICE_TASK , Intents . STOP_SENSORS ) ; "<AssertPlaceHolder>" ; } getSensorServiceTask ( android . content . Intent ) { if ( ( intent != null ) && ( intent . hasExtra ( pl . llp . aircasting . Intents . SESSION_SERVICE_TASK ) ) ) { return intent . getIntExtra ( pl . llp . aircasting . Intents . SESSION_SERVICE_TASK , pl . llp . aircasting . Intents . START_SENSORS ) ; } else { return pl . llp . aircasting . Intents . UNKNOWN ; } } | org . junit . Assert . assertThat ( pl . llp . aircasting . Intents . getSensorServiceTask ( intent ) , org . hamcrest . CoreMatchers . equalTo ( Intents . STOP_SENSORS ) ) |
duplicateStatementIdentifierException ( ) { liquibase . exception . DuplicateStatementIdentifierException ex = new liquibase . exception . DuplicateStatementIdentifierException ( "Message<sp>Here" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { java . lang . String message = "Migration<sp>failed" ; if ( ( failedChangeSetName ) != null ) { message += "<sp>for<sp>change<sp>set<sp>" + ( failedChangeSetName ) ; } message += ":\n<sp>Reason:<sp>" + ( super . getMessage ( ) ) ; return message ; } | org . junit . Assert . assertEquals ( "Message<sp>Here" , ex . getMessage ( ) ) |
testTreeGetStringAt ( ) { org . jdesktop . swingx . decorator . ComponentAdapterTest . JXTreeT tree = new org . jdesktop . swingx . decorator . ComponentAdapterTest . JXTreeT ( org . jdesktop . test . AncientSwingTeam . createNamedColorTreeModel ( ) ) ; tree . expandAll ( ) ; tree . setCellRenderer ( new org . jdesktop . swingx . renderer . DefaultTreeRenderer ( sv ) ) ; java . lang . String text = sv . getString ( ( ( javax . swing . tree . DefaultMutableTreeNode ) ( tree . getPathForRow ( 2 ) . getLastPathComponent ( ) ) ) . getUserObject ( ) ) ; org . jdesktop . swingx . decorator . ComponentAdapter adapter = tree . getComponentAdapter ( 2 ) ; "<AssertPlaceHolder>" ; } getStringAt ( int , int ) { org . jdesktop . swingx . renderer . StringValue sv = list . getStringValueRegistry ( ) . getStringValue ( row , column ) ; return sv . getString ( getValueAt ( row , column ) ) ; } | org . junit . Assert . assertEquals ( text , adapter . getStringAt ( 2 , 0 ) ) |
testAvailableItems ( ) { org . drools . runtime . StatefulKnowledgeSession knowledgeSession = knowledgeBase . newStatefulKnowledgeSession ( ) ; try { org . drools . informer . rules . Questionnaire questionnaire = new org . drools . informer . rules . Questionnaire ( "questionnaire" ) ; org . drools . informer . rules . Group group2 = new org . drools . informer . rules . Group ( "group2" ) ; org . drools . informer . rules . Group group5 = new org . drools . informer . rules . Group ( "group5" ) ; org . drools . informer . rules . Group group6 = new org . drools . informer . rules . Group ( "group6" ) ; questionnaire . setItems ( new java . lang . String [ ] { "group1UUID" , group2 . getId ( ) , "group3UUID" , "group4UUID" , group5 . getId ( ) , group6 . getId ( ) , "group7UUID" } ) ; knowledgeSession . insert ( questionnaire ) ; knowledgeSession . insert ( group2 ) ; knowledgeSession . insert ( group5 ) ; knowledgeSession . insert ( group6 ) ; knowledgeSession . fireAllRules ( ) ; for ( java . lang . String s : new java . lang . String [ ] { group2 . getId ( ) , group5 . getId ( ) , group6 . getId ( ) } ) { "<AssertPlaceHolder>" ; } } finally { knowledgeSession . dispose ( ) ; } } getAvailableItemSet ( ) { return availableItems ; } | org . junit . Assert . assertTrue ( questionnaire . getAvailableItemSet ( ) . contains ( s ) ) |
testStringExtent_usesStoreageForKnowStrings ( ) { org . eclipse . swt . graphics . Point storedSize = new org . eclipse . swt . graphics . Point ( 100 , 10 ) ; fakeMeasurement ( org . eclipse . rap . rwt . internal . textsize . TextSizeUtil_Test . TEST_STRING , SWT . DEFAULT , TextSizeUtil . STRING_EXTENT , storedSize ) ; org . eclipse . swt . graphics . Point determinedSize = org . eclipse . rap . rwt . internal . textsize . TextSizeUtil . stringExtent ( getFont ( ) , org . eclipse . rap . rwt . internal . textsize . TextSizeUtil_Test . TEST_STRING ) ; "<AssertPlaceHolder>" ; } getFont ( ) { return new org . eclipse . swt . graphics . Font ( display , org . eclipse . rap . rwt . internal . textsize . TextSizeUtil_Test . FONT_DATA ) ; } | org . junit . Assert . assertEquals ( storedSize , determinedSize ) |
connectivity ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getAtomExpr ( "[X4]" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . TOTAL_DEGREE , 4 ) ; "<AssertPlaceHolder>" ; } expr ( org . openscience . cdk . isomorphism . matchers . Expr$Type , int ) { return new org . openscience . cdk . isomorphism . matchers . Expr ( type , val ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testGETWithEndpointEnabled ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; config . setProperty ( Key . API_ENABLED , true ) ; edu . illinois . library . cantaloupe . http . Response response = client . send ( ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; } | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testCheckForAuthenticatedAdminWithConfiguredAdminGroup ( ) { configuration . setAdminGroups ( com . google . common . collect . ImmutableSet . of ( "heartOfGold" ) ) ; sonia . scm . user . User slarti = sonia . scm . user . UserTestData . createSlarti ( ) ; slarti . setAdmin ( false ) ; java . util . Set < java . lang . String > groups = com . google . common . collect . ImmutableSet . of ( "heartOfGold" ) ; detector . checkForAuthenticatedAdmin ( slarti , groups ) ; "<AssertPlaceHolder>" ; } isAdmin ( ) { return subject . hasRole ( Roles . ADMIN ) ; } | org . junit . Assert . assertTrue ( slarti . isAdmin ( ) ) |
when_focus_is_delayed_then_it_is_not_applied_on_ajax_postback ( ) { browser . get ( contextPath . toExternalForm ( ) ) ; guardAjax ( ajax ) . click ( ) ; "<AssertPlaceHolder>" ; } getFocusedElement ( ) { return org . richfaces . utils . focus . FocusRetriever . retrieveActiveElement ( ) ; } | org . junit . Assert . assertEquals ( null , getFocusedElement ( ) ) |
categoryFilterLeavesOnlyMatchingMethods ( ) { org . junit . experimental . categories . Categories . CategoryFilter filter = org . junit . experimental . categories . Categories . CategoryFilter . include ( org . junit . tests . experimental . categories . CategoryTest . SlowTests . class ) ; org . junit . runners . BlockJUnit4ClassRunner runner = new org . junit . runners . BlockJUnit4ClassRunner ( org . junit . tests . experimental . categories . CategoryTest . A . class ) ; filter . apply ( runner ) ; "<AssertPlaceHolder>" ; } testCount ( ) { if ( isTest ( ) ) { return 1 ; } int result = 0 ; for ( org . junit . runner . Description child : fChildren ) { result += child . testCount ( ) ; } return result ; } | org . junit . Assert . assertEquals ( 1 , runner . testCount ( ) ) |
singleHyphen ( ) { joptsimple . OptionSet options = parser . parse ( "-" ) ; "<AssertPlaceHolder>" ; } nonOptionArguments ( ) { joptsimple . AbstractOptionSpec < ? > spec = detectedOptions . get ( NonOptionArgumentSpec . NAME ) ; return valuesOf ( spec ) ; } | org . junit . Assert . assertEquals ( singletonList ( "-" ) , options . nonOptionArguments ( ) ) |
shouldAccessObjectIdPropertyForDocument ( ) { javax . jcr . Node node = getSession ( ) . getNode ( "/cmis/My_Folder-0-0/My_Document-1-0" ) ; java . lang . String objectId = node . getProperty ( "jcr:uuid" ) . getString ( ) ; "<AssertPlaceHolder>" ; } getString ( ) { return value ; } | org . junit . Assert . assertTrue ( ( objectId != null ) ) |
testAddingConnectionFactoriesWithTargets ( ) { final java . lang . String poolName = "form:propertySheet:poolPropertySheet:transprop:trans" 4 + ( generateRandomString ( ) ) ; final java . lang . String description = "form:propertySheet:poolPropertySheet:transprop:trans" 1 + poolName ; final java . lang . String instanceName = "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 2 + ( generateRandomString ( ) ) ; org . glassfish . admingui . devtests . StandaloneTest instanceTest = new org . glassfish . admingui . devtests . StandaloneTest ( ) ; instanceTest . createStandAloneInstance ( instanceName ) ; clickAndWait ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 7 ) ; clickAndWait ( "form:propertySheet:poolPropertySheet:transprop:trans" 3 ) ; setFieldValue ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" , poolName ) ; org . openqa . selenium . support . ui . Select select = new org . openqa . selenium . support . ui . Select ( driver . findElement ( org . openqa . selenium . By . id ( "form:propertySheet:generalPropertySheet:resTyped:resType" ) ) ) ; select . selectByVisibleText ( "form:propertySheet:poolPropertySheet:transprop:trans" 7 ) ; setFieldValue ( "form:propertySheet:generalPropertySheet:descProp:descProp" , description ) ; org . openqa . selenium . support . ui . Select select1 = new org . openqa . selenium . support . ui . Select ( driver . findElement ( org . openqa . selenium . By . id ( "form:propertySheet:poolPropertySheet:transprop:trans" ) ) ) ; select1 . selectByVisibleText ( "form:propertySheet:poolPropertySheet:transprop:trans" 5 ) ; org . openqa . selenium . support . ui . Select select2 = new org . openqa . selenium . support . ui . Select ( driver . findElement ( org . openqa . selenium . By . id ( "form:targetSection:targetSectionId:addRemoveProp:commonAddRemove_available" ) ) ) ; select2 . selectByVisibleText ( instanceName ) ; select2 . selectByVisibleText ( "server" ) ; clickByIdAction ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 5 ) ; clickAndWait ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 0 ) ; java . lang . String prefix = getTableRowByValue ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 1 , poolName , "colName" ) ; "<AssertPlaceHolder>" ; java . lang . String selectId = prefix + "form:propertySheet:poolPropertySheet:transprop:trans" 6 ; clickByIdAction ( selectId ) ; clickAndWait ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 3 ) ; waitforBtnDisable ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 4 ) ; clickByIdAction ( selectId ) ; clickAndWait ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 4 ) ; waitforBtnDisable ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 4 ) ; java . lang . String clickId = prefix + "form:propertySheet:generalPropertySheet:resTyped:resType" 0 ; clickByIdAction ( clickId ) ; clickAndWait ( "propertyForm:resEditTabs:targetTab" ) ; clickAndWait ( "form:propertySheet:poolPropertySheet:transprop:trans" 8 ) ; org . openqa . selenium . support . ui . Select select5 = new org . openqa . selenium . support . ui . Select ( driver . findElement ( org . openqa . selenium . By . id ( "form:propertySheet:poolPropertySheet:transprop:trans" 9 ) ) ) ; select5 . selectByVisibleText ( instanceName ) ; select5 . selectByVisibleText ( "server" ) ; clickByIdAction ( "form:targetSection:targetSectionId:addRemoveProp:commonAddRemove:commonAddRemove_removeButton" ) ; clickByIdAction ( "form:propertyContentPage:topButtons:saveButton" ) ; gotoDasPage ( ) ; clickAndWait ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 7 ) ; clickByIdAction ( selectId ) ; clickAndWait ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 9 ) ; closeAlertAndGetItsText ( ) ; waitForAlertProcess ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 6 ) ; clickAndWait ( "form:propertySheet:poolPropertySheet:transprop:trans" 0 ) ; deleteRow ( "form:propertySheet:generalPropertySheet:jndiProp:jndiProp" 8 , "form:propertySheet:poolPropertySheet:transprop:trans" 2 , instanceName ) ; } getText ( java . lang . String ) { java . lang . String text = null ; try { text = super . getText ( locator ) ; } catch ( java . lang . Exception e ) { sleep ( 1000 ) ; text = super . getText ( locator ) ; } return text ; } | org . junit . Assert . assertEquals ( poolName , getText ( ( prefix + "form:propertySheet:generalPropertySheet:resTyped:resType" 0 ) ) ) |
testNeverSampleExtractedSampleAllContext ( ) { org . hawkular . apm . client . opentracing . APMTracerTest . TestTraceRecorder traceRecorder = new org . hawkular . apm . client . opentracing . APMTracerTest . TestTraceRecorder ( ) ; io . opentracing . Tracer tracer = new org . hawkular . apm . client . opentracing . APMTracer ( traceRecorder , org . hawkular . apm . client . api . sampler . Sampler . NEVER_SAMPLE ) ; io . opentracing . Span span = tracer . buildSpan ( "foo" ) . asChildOf ( extractedTraceState ( tracer , ReportingLevel . All ) ) . start ( ) ; span . finish ( ) ; "<AssertPlaceHolder>" ; } getTraces ( ) { return traces ; } | org . junit . Assert . assertEquals ( 1 , traceRecorder . getTraces ( ) . size ( ) ) |
testMultiply02 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . eval ( "null<sp>*<sp>null" ) ; "<AssertPlaceHolder>" ; } eval ( java . lang . String ) { return getValue ( expression , java . lang . Object . class ) ; } | org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 0 ) , result ) |
testBadExpressions ( ) { int count = 1 ; for ( final java . lang . String booleanExpression : org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . INVALID_BOOLEAN_EXPRESSIONS ) { org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . log . info ( ( "Invalid<sp>Test:<sp>" + count ) ) ; try { org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . log . info ( ( "Original:<sp>" + booleanExpression ) ) ; final org . apache . rya . mongodb . document . visibility . DocumentVisibility dv = new org . apache . rya . mongodb . document . visibility . DocumentVisibility ( booleanExpression ) ; final java . lang . Object [ ] multidimensionalArray = org . apache . rya . mongodb . document . util . DocumentVisibilityUtil . toMultidimensionalArray ( dv ) ; org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . log . info ( ( "Array<sp>:<sp>" + ( java . util . Arrays . deepToString ( multidimensionalArray ) ) ) ) ; final java . lang . String booleanString = org . apache . rya . mongodb . document . util . DocumentVisibilityUtil . multidimensionalArrayToBooleanString ( multidimensionalArray ) ; org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . log . info ( ( "Result<sp>:<sp>" + booleanString ) ) ; final java . lang . String expected = new java . lang . String ( dv . flatten ( ) , com . google . common . base . Charsets . UTF_8 ) ; "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "Bad<sp>expression<sp>passed." ) ; } catch ( final java . lang . Exception e ) { } org . apache . rya . mongodb . document . util . DocumentVisibilityUtilTest . log . info ( "===========================" ) ; count ++ ; } } flatten ( ) { final org . apache . rya . api . model . visibility . ColumnVisibility . Node normRoot = org . apache . rya . api . model . visibility . ColumnVisibility . normalize ( node , expression ) ; final java . lang . StringBuilder builder = new java . lang . StringBuilder ( expression . length ) ; org . apache . rya . api . model . visibility . ColumnVisibility . stringify ( normRoot , expression , builder ) ; return builder . toString ( ) . getBytes ( org . apache . rya . api . model . visibility . UTF_8 ) ; } | org . junit . Assert . assertEquals ( expected , booleanString ) |
shouldNotValidateProcessorIfInvalidMetric ( ) { com . statful . client . framework . springboot . common . ExportedMetric exportedMetric = new com . statful . client . framework . springboot . common . ExportedMetric . Builder ( ) . withName ( com . statful . client . framework . springboot . processor . StatfulMetricProcessorTest . INVALID ) . build ( ) ; boolean validated = subject . validate ( exportedMetric ) ; "<AssertPlaceHolder>" ; } validate ( com . statful . client . framework . springboot . common . ExportedMetric ) { return processorMap . validateProcessor ( exportedMetric . getName ( ) ) ; } | org . junit . Assert . assertFalse ( validated ) |
notAdjacent ( ) { java . lang . String h = "<ol><li<sp>id=1>One<li<sp>id=2>Two<li<sp>id=3>Three</ol>" ; org . jsoup . nodes . Document doc = org . jsoup . Jsoup . parse ( h ) ; org . jsoup . select . Elements sibs = doc . select ( "li#1<sp>+<sp>li#3" ) ; "<AssertPlaceHolder>" ; } size ( ) { return contents . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , sibs . size ( ) ) |
create ( ) { com . foxinmy . weixin4j . mp . model . Tag tag = tagApi . createTag ( "" ) ; "<AssertPlaceHolder>" ; System . out . println ( tag ) ; } createTag ( java . lang . String ) { java . lang . String tag_create_uri = getRequestUri ( "tag_create_uri" ) ; com . foxinmy . weixin4j . http . weixin . WeixinResponse response = weixinExecutor . post ( java . lang . String . format ( tag_create_uri , tokenManager . getAccessToken ( ) ) , java . lang . String . format ( "{\"tag\":{\"name\":\"%s\"}}" , name ) ) ; com . alibaba . fastjson . JSONObject obj = response . getAsJson ( ) . getJSONObject ( "tag" ) ; return new com . foxinmy . weixin4j . mp . model . Tag ( obj . getIntValue ( "id" ) , obj . getString ( "name" ) ) ; } | org . junit . Assert . assertNotNull ( tag ) |
test ( ) { try ( final net . openhft . chronicle . map . ChronicleMap < net . openhft . chronicle . core . values . IntValue , java . lang . CharSequence > map = net . openhft . chronicle . map . ChronicleMapBuilder . of ( net . openhft . chronicle . core . values . IntValue . class , net . openhft . chronicle . map . CharSequence . class ) . averageValue ( "test" ) . entries ( 20000 ) . create ( ) ) { net . openhft . chronicle . core . values . IntValue value = net . openhft . chronicle . values . Values . newNativeReference ( net . openhft . chronicle . core . values . IntValue . class ) ; ( ( net . openhft . chronicle . bytes . Byteable ) ( value ) ) . bytesStore ( net . openhft . chronicle . bytes . NativeBytesStore . nativeStoreWithFixedCapacity ( 4 ) , 0 , 4 ) ; value . setValue ( 1 ) ; final java . lang . String expected = "test" ; map . put ( value , expected ) ; final java . lang . CharSequence actual = map . get ( value ) ; "<AssertPlaceHolder>" ; map . toString ( ) ; } } toString ( ) { return ( ( "<sp>ChronicleSetBuilder{" + "chronicleMapBuilder=" ) + ( chronicleMapBuilder ) ) + '}' ; } | org . junit . Assert . assertEquals ( expected , actual . toString ( ) ) |
showSchemaTest ( ) { java . lang . String sql = "show<sp>schemas" ; switch ( database ) { case "mysql" : break ; case "impala" : break ; case "postgresql" : sql = "select<sp>schema_name<sp>from<sp>information_schema.schemata" ; break ; case "redshift" : sql = "select<sp>schema_name<sp>from<sp>information_schema.schemata" ; break ; default : org . junit . Assert . fail ( java . lang . String . format ( "Database<sp>'%s'<sp>not<sp>supported." , database ) ) ; } java . sql . Statement jdbcStmt = org . verdictdb . coordinator . MetaDataStatementsTest . connMap . get ( database ) . createStatement ( ) ; java . sql . ResultSet jdbcRs = jdbcStmt . executeQuery ( sql ) ; org . verdictdb . connection . DbmsConnection dbmsconn = new org . verdictdb . connection . CachedDbmsConnection ( new org . verdictdb . connection . JdbcConnection ( org . verdictdb . coordinator . MetaDataStatementsTest . connMap . get ( database ) , org . verdictdb . coordinator . MetaDataStatementsTest . syntaxMap . get ( database ) ) ) ; org . verdictdb . commons . VerdictOption option = new org . verdictdb . commons . VerdictOption ( ) ; final java . lang . String verdictmeta = "verdictmeta" + ( org . apache . commons . lang3 . RandomStringUtils . randomAlphanumeric ( 8 ) . toLowerCase ( ) ) ; option . setVerdictMetaSchemaName ( verdictmeta ) ; org . verdictdb . VerdictContext verdict = new org . verdictdb . VerdictContext ( dbmsconn , option ) ; org . verdictdb . coordinator . ExecutionContext exec = new org . verdictdb . coordinator . ExecutionContext ( dbmsconn , verdict . getMetaStore ( ) , verdict . getContextId ( ) , 0 , org . verdictdb . coordinator . MetaDataStatementsTest . options ) ; org . verdictdb . VerdictSingleResult result = exec . sql ( "show<sp>schemas" ) ; java . util . Set < java . lang . String > expected = new java . util . HashSet ( ) ; java . util . Set < java . lang . String > actual = new java . util . HashSet ( ) ; while ( jdbcRs . next ( ) ) { result . next ( ) ; expected . add ( jdbcRs . getString ( 1 ) ) ; actual . add ( result . getString ( 0 ) ) ; } "<AssertPlaceHolder>" ; dbmsconn . execute ( java . lang . String . format ( "drop<sp>schema<sp>if<sp>exists<sp>%s" , verdictmeta ) ) ; } getString ( java . lang . String ) { if ( colNameIdx . containsKey ( standardizedLabel ( columnLabel ) ) ) { return queryResult . getString ( standardizedLabel ( columnLabel . toLowerCase ( ) ) ) ; } else throw new java . sql . SQLException ( "ColumnLabel<sp>does<sp>not<sp>exist." ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testBackendApolloDomain ( ) { final com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . parseMap ( com . google . common . collect . ImmutableMap . of ( "apollo.domain" , "foo" ) ) ; final com . spotify . apollo . environment . ApolloConfig sut = new com . spotify . apollo . environment . ApolloConfig ( config ) ; "<AssertPlaceHolder>" ; } backend ( ) { return com . spotify . apollo . environment . ConfigUtil . either ( com . spotify . apollo . environment . ConfigUtil . either ( com . spotify . apollo . environment . ConfigUtil . optionalString ( apolloNode , "domain" ) , com . spotify . apollo . environment . ConfigUtil . optionalString ( apolloNode , "backend" ) ) , com . spotify . apollo . environment . ConfigUtil . optionalString ( root , "domain" ) ) . orElse ( "" ) ; } | org . junit . Assert . assertThat ( sut . backend ( ) , org . hamcrest . Matchers . is ( "foo" ) ) |
testLongSuv ( ) { byte [ ] expected = org . apache . commons . codec . binary . Hex . decodeHex ( "8395c64122bb430432d8b0298209b736" . toCharArray ( ) ) ; byte [ ] tag = test ( false ) ; "<AssertPlaceHolder>" ; } test ( boolean ) { com . github . aelstad . keccakj . keyak . v2 . LakeKeyak global = new com . github . aelstad . keccakj . keyak . v2 . LakeKeyak ( ) ; global . init ( new byte [ 0 ] , null , 0 , 0 , null , 0 , false , false ) ; byte [ ] ABC = new byte [ ] { 'A' , 'B' , 'C' } ; byte [ ] DEF = new byte [ ] { 'D' , 'E' , 'F' } ; int ra = 192 ; int rs = 168 ; int nlenMax = ( oneBlockSuv ) ? 150 : 200 ; for ( int keylen = 16 ; keylen <= 32 ; keylen ++ ) { for ( int nlen = 0 ; nlen <= nlenMax ; nlen += ( keylen == 16 ) ? 1 : nlenMax ) { for ( int forgetFlag = 0 ; forgetFlag < 2 ; ++ forgetFlag ) { for ( int tagFlag = 0 ; tagFlag < 2 ; ++ tagFlag ) { com . github . aelstad . keccakj . keyak . v2 . LakeKeyak wrap = new com . github . aelstad . keccakj . keyak . v2 . LakeKeyak ( ) ; com . github . aelstad . keccakj . keyak . v2 . LakeKeyak unwrap = new com . github . aelstad . keccakj . keyak . v2 . LakeKeyak ( ) ; startEngine ( global , wrap , unwrap , generateSimpleRawMaterial ( keylen , ( ( keylen + nlen ) + 18 ) , 3 ) , generateSimpleRawMaterial ( nlen , ( ( keylen + nlen ) + 69 ) , 6 ) , ( tagFlag != 0 ) , ( forgetFlag != 0 ) ) ; wrapUnwrap ( global , wrap , unwrap , ABC , DEF , false ) ; } } } } java . util . List < java . lang . Integer > alengths = new java . util . ArrayList < java . lang . Integer > ( ) ; alengths . add ( 0 ) ; alengths . add ( 1 ) ; alengths . add ( ( ( ra - rs ) - 1 ) ) ; alengths . add ( ( ra - rs ) ) ; alengths . add ( ( ( ra - rs ) + 1 ) ) ; for ( int forgetFlag = 0 ; forgetFlag < 2 ; ++ forgetFlag ) { for ( int tagFlag = 0 ; tagFlag < 2 ; ++ tagFlag ) { for ( int aidx = 0 ; aidx < ( alengths . size ( ) ) ; ++ aidx ) { for ( int mlen = 0 ; mlen <= ( rs + 1 ) ; mlen += ( aidx == 0 ) ? 1 : ( ( 1 + forgetFlag ) * ( 8 + tagFlag ) ) + 1 ) { int klen = 16 ; int nlen = 150 ; int alen = alengths . get ( aidx ) ; com . github . aelstad . keccakj . keyak . v2 . LakeKeyak wrap = new com . github . aelstad . keccakj . keyak . v2 . LakeKeyak ( ) ; com . github . aelstad . keccakj . keyak . v2 . LakeKeyak unwrap = new com . github . aelstad . keccakj . keyak . v2 . LakeKeyak ( ) ; startEngine ( global , wrap , unwrap , generateSimpleRawMaterial ( klen , ( ( 35 + mlen ) + alen ) , 4 ) , generateSimpleRawMaterial ( nlen , ( ( 86 + mlen ) + alen ) , 7 ) , ( tagFlag != 0 ) , ( forgetFlag != 0 ) ) ; wrapUnwrap ( global , wrap , unwrap , generateSimpleRawMaterial ( alen , ( ( 171 + mlen ) + alen ) , 3 ) , generateSimpleRawMaterial ( mlen , ( ( 205 + mlen ) + alen ) , 4 ) , ( forgetFlag != 0 ) ) ; wrapUnwrap ( global , wrap , unwrap , generateSimpleRawMaterial ( alen , ( ( 205 + mlen ) + alen ) , 3 ) , generateSimpleRawMaterial ( mlen , ( ( 239 + mlen ) + alen ) , 4 ) , ( forgetFlag != 0 ) ) ; } } } } java . util . List < java . lang . Integer > mlengths = new java . util . ArrayList < java . lang . Integer > ( ) ; mlengths . add ( 0 ) ; mlengths . add ( 1 ) ; mlengths . add ( ( rs - 1 ) ) ; mlengths . add ( rs ) ; mlengths . add ( ( rs + 1 ) ) ; for ( int forgetFlag = 0 ; forgetFlag < 2 ; ++ forgetFlag ) { for ( int tagFlag = 0 ; tagFlag < 2 ; ++ tagFlag ) { for ( int midx = 0 ; midx < ( mlengths . size ( ) ) ; ++ midx ) { for ( int alen = 0 ; alen <= ( ra + 1 ) ; alen += ( midx == 0 ) ? 1 : ( ( 1 + forgetFlag ) * ( 8 + tagFlag ) ) + 1 ) { int klen = 16 ; int nlen = 150 ; int mlen = mlengths . get ( midx ) ; com . github . aelstad . keccakj . keyak . v2 . LakeKeyak wrap = new com . github . aelstad . keccakj . keyak . v2 . | org . junit . Assert . assertArrayEquals ( expected , tag ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.