input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testRun_projectHasApplication ( ) { com . google . cloud . tools . eclipse . projectselector . model . AppEngine appEngine = com . google . cloud . tools . eclipse . projectselector . model . AppEngine . withId ( "unique-id" ) ; when ( projectRepository . getAppEngineApplication ( credential , "projectId" ) ) . thenReturn ( appEngine ) ; queryJob . schedule ( ) ; queryJob . join ( ) ; verify ( isLatestQueryJob , never ( ) ) . test ( queryJob ) ; verify ( projectSelector , never ( ) ) . isDisposed ( ) ; verify ( projectSelector , never ( ) ) . setStatusLink ( anyString ( ) , anyString ( ) ) ; "<AssertPlaceHolder>" ; } getAppEngine ( ) { return appEngine . get ( ) ; }
|
org . junit . Assert . assertTrue ( ( appEngine == ( project . getAppEngine ( ) ) ) )
|
testRetryTimeoutInSecondsCanBeSet ( ) { configuration . setRetryTimeoutInSeconds ( 123 ) ; "<AssertPlaceHolder>" ; } getRetryTimeoutInSeconds ( ) { return retryTimeoutInSeconds ; }
|
org . junit . Assert . assertEquals ( 123 , configuration . getRetryTimeoutInSeconds ( ) )
|
testMultipleChildren ( ) { java . lang . String multipleChildren = "C(C)C" ; java . lang . String signatureString = this . canonicalStringFromSmiles ( multipleChildren ) ; java . lang . String expected = "[C]([C]([C]))" ; "<AssertPlaceHolder>" ; } canonicalStringFromSmiles ( java . lang . String ) { org . openscience . cdk . interfaces . IAtomContainer mol = parser . parseSmiles ( smiles ) ; org . openscience . cdk . signature . MoleculeSignature signature = new org . openscience . cdk . signature . MoleculeSignature ( mol ) ; return signature . toCanonicalString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , signatureString )
|
shouldRejectIfCrlAbsentForNonRootCertificate ( ) { rootCrl = null ; net . ripe . rpki . commons . validation . objectvalidators . X509ResourceCertificateParentChildValidator validator = new net . ripe . rpki . commons . validation . objectvalidators . X509ResourceCertificateParentChildValidator ( options , result , root , rootCrl , root . getResources ( ) ) ; validate ( validator , child ) ; "<AssertPlaceHolder>" ; } hasFailures ( ) { for ( java . util . Map < net . ripe . rpki . commons . validation . ValidationStatus , java . util . List < net . ripe . rpki . commons . validation . ValidationCheck > > checks : this . results . values ( ) ) { java . util . List < net . ripe . rpki . commons . validation . ValidationCheck > errors = checks . get ( ValidationStatus . ERROR ) ; if ( ( errors != null ) && ( ! ( errors . isEmpty ( ) ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( result . hasFailures ( ) )
|
testThrowsNoSuitableHostsExceptionWhenLoadBalancerReturnsNull ( ) { reset ( _loadBalanceAlgorithm ) ; when ( _loadBalanceAlgorithm . choose ( org . mockito . Matchers . < java . lang . Iterable < com . bazaarvoice . ostrich . ServiceEndPoint > > any ( ) , any ( com . bazaarvoice . ostrich . ServicePoolStatistics . class ) ) ) . thenReturn ( null ) ; boolean called = _pool . execute ( com . bazaarvoice . ostrich . pool . AbstractServicePoolTestingHarness . NEVER_RETRY , new com . bazaarvoice . ostrich . ServiceCallback < com . bazaarvoice . ostrich . pool . AbstractServicePoolTestingHarness . Service , java . lang . Boolean > ( ) { @ com . bazaarvoice . ostrich . pool . Override public com . bazaarvoice . ostrich . pool . Boolean call ( com . bazaarvoice . ostrich . pool . AbstractServicePoolTestingHarness . Service service ) throws com . bazaarvoice . ostrich . exceptions . ServiceException { return true ; } } ) ; "<AssertPlaceHolder>" ; } call ( S ) { try { return method . invoke ( service , args ) ; } catch ( java . lang . IllegalAccessException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . reflect . InvocationTargetException e ) { com . google . common . base . Throwables . throwIfUnchecked ( e . getTargetException ( ) ) ; throw new java . lang . RuntimeException ( e . getTargetException ( ) ) ; } }
|
org . junit . Assert . assertFalse ( called )
|
test_until_TemporalUnit ( int , int , int , int , int , int , java . time . temporal . TemporalUnit , long ) { org . threeten . extra . chrono . CopticDate start = org . threeten . extra . chrono . CopticDate . of ( year1 , month1 , dom1 ) ; org . threeten . extra . chrono . CopticDate end = org . threeten . extra . chrono . CopticDate . of ( year2 , month2 , dom2 ) ; "<AssertPlaceHolder>" ; } until ( java . time . temporal . Temporal , java . time . temporal . TemporalUnit ) { org . threeten . extra . YearQuarter end = org . threeten . extra . YearQuarter . from ( endExclusive ) ; long quartersUntil = ( end . getProlepticQuarter ( ) ) - ( getProlepticQuarter ( ) ) ; if ( unit == ( java . time . temporal . IsoFields . QUARTER_YEARS ) ) { return quartersUntil ; } else if ( unit instanceof java . time . temporal . ChronoUnit ) { switch ( ( ( java . time . temporal . ChronoUnit ) ( unit ) ) ) { case java . time . temporal . ChronoUnit . YEARS : return quartersUntil / 4 ; case java . time . temporal . ChronoUnit . DECADES : return quartersUntil / 40 ; case java . time . temporal . ChronoUnit . CENTURIES : return quartersUntil / 400 ; case java . time . temporal . ChronoUnit . MILLENNIA : return quartersUntil / 4000 ; case java . time . temporal . ChronoUnit . ERAS : return ( end . getLong ( java . time . temporal . ChronoField . ERA ) ) - ( getLong ( java . time . temporal . ChronoField . ERA ) ) ; default : throw new java . time . temporal . UnsupportedTemporalTypeException ( ( "Unsupported<sp>unit:<sp>" + unit ) ) ; } } return unit . between ( this , end ) ; }
|
org . junit . Assert . assertEquals ( expected , start . until ( end , unit ) )
|
testProjectAdminTrue ( ) { when ( projectPrivilegeService . getOrCreateProjectPrivilegeByUserId ( anyInt ( ) , anyInt ( ) ) ) . thenReturn ( projectPrivilege ) ; boolean result = roleServiceImpl . projectAdmin ( user . getId ( ) , company . getId ( ) , project . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return com . onboard . test . moduleutils . ModuleHelper . id ; }
|
org . junit . Assert . assertEquals ( result , true )
|
instantiation ( ) { org . junithelper . core . config . Configuration config = null ; org . junithelper . core . extractor . ArgTypeMetaExtractor target = new org . junithelper . core . extractor . ArgTypeMetaExtractor ( config ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( target )
|
testMapActivityWithUnmappedParentWhichHasAEventSubProcessChild ( ) { org . camunda . bpm . model . bpmn . BpmnModelInstance testProcess = org . camunda . bpm . engine . test . api . runtime . migration . ModifiableBpmnModelInstance . modify ( ProcessModels . SUBPROCESS_PROCESS ) . addSubProcessTo ( "subProcess" ) . triggerByEvent ( ) . embeddedSubProcess ( ) . startEvent ( ) . message ( org . camunda . bpm . engine . test . api . runtime . migration . MigrationPlanCreationTest . MESSAGE_NAME ) . endEvent ( ) . subProcessDone ( ) . done ( ) ; org . camunda . bpm . engine . repository . ProcessDefinition sourceProcessDefinition = testHelper . deployAndGetDefinition ( testProcess ) ; org . camunda . bpm . engine . repository . ProcessDefinition targetProcessDefinition = testHelper . deployAndGetDefinition ( testProcess ) ; org . camunda . bpm . engine . migration . MigrationPlan migrationPlan = runtimeService . createMigrationPlan ( sourceProcessDefinition . getId ( ) , targetProcessDefinition . getId ( ) ) . mapActivities ( "userTask" , "userTask" ) . build ( ) ; "<AssertPlaceHolder>" . hasSourceProcessDefinition ( sourceProcessDefinition ) . hasTargetProcessDefinition ( targetProcessDefinition ) . hasInstructions ( migrate ( "userTask" ) . to ( "userTask" ) ) ; } build ( ) { return migrationPlan ; }
|
org . junit . Assert . assertThat ( migrationPlan )
|
getCardinality ( ) { final int expectedCardinality ; if ( ( expectedSubsequenceLength ) == 0 ) { expectedCardinality = org . exist . xquery . Cardinality . EMPTY ; } else if ( ( expectedSubsequenceLength ) == 1 ) { expectedCardinality = org . exist . xquery . Cardinality . ONE ; } else { expectedCardinality = org . exist . xquery . Cardinality . MANY ; } "<AssertPlaceHolder>" ; } getSubsequence ( ) { return new org . exist . xquery . value . SubSequence ( fromInclusive , toExclusive , org . exist . xquery . value . SubSequenceTest . range ) ; }
|
org . junit . Assert . assertEquals ( expectedCardinality , getSubsequence ( ) . getCardinality ( ) )
|
size_napthalene ( ) { int [ ] [ ] napthalene = org . openscience . cdk . graph . InitialCyclesTest . naphthalene ( ) ; org . openscience . cdk . graph . VertexShortCycles vsc = new org . openscience . cdk . graph . VertexShortCycles ( napthalene ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
|
org . junit . Assert . assertThat ( vsc . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
|
testToString ( ) { br . com . insula . opes . Agencia agencia = br . com . insula . opes . Agencia . fromString ( "3522" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return numero ; }
|
org . junit . Assert . assertEquals ( "3522" , agencia . toString ( ) )
|
setReservationId_anInteger_reservationIdIsSet ( ) { java . lang . Integer anInteger = 42 ; request . setReservationId ( anInteger ) ; "<AssertPlaceHolder>" ; } getReservationId ( ) { return reservationId ; }
|
org . junit . Assert . assertThat ( request . getReservationId ( ) , org . hamcrest . CoreMatchers . equalTo ( anInteger ) )
|
testHasValueThatOnNullValue ( ) { "<AssertPlaceHolder>" ; } hasValueThat ( org . hamcrest . Matcher ) { return new com . annimon . stream . test . hamcrest . OptionalBooleanMatcher . HasValueMatcher ( matcher ) ; }
|
org . junit . Assert . assertThat ( null , com . annimon . stream . test . hamcrest . OptionalBooleanMatcher . hasValueThat ( org . hamcrest . CoreMatchers . is ( false ) ) )
|
testSerialization ( ) { org . jfree . chart . labels . StandardXYToolTipGenerator g1 = new org . jfree . chart . labels . StandardXYToolTipGenerator ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( g1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . labels . StandardXYToolTipGenerator g2 = ( ( org . jfree . chart . labels . StandardXYToolTipGenerator ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
|
org . junit . Assert . assertEquals ( g1 , g2 )
|
testIncludeWithNestedArgs ( ) { java . lang . String template = "load<sp><box(foo(\"arg\"))>;" ; org . stringtemplate . v4 . ST st = new org . stringtemplate . v4 . ST ( template ) ; st . impl . nativeGroup . defineTemplate ( "box" , "y" , "kewl<sp><y><sp>daddy" ) ; st . impl . nativeGroup . defineTemplate ( "foo" , "x" , "blech<sp><x>" ) ; st . add ( "name" , "Ter" ) ; java . lang . String expected = "))>;" 0 ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
shouldReturnFalseWhenOrdersAreNotNullAndPreviousOrderDateToIsAndOrderDateFromIsNull ( ) { stubStringField ( previousOrder , OrderFields . STATE , OrderStateStringValues . ACCEPTED ) ; stubDateField ( previousOrder , OrderFields . FINISH_DATE , null ) ; stubDateField ( order , OrderFields . START_DATE , null ) ; boolean result = lineChangeoverNormsForOrdersService . previousOrderEndsBeforeOrIsWithdrawed ( previousOrder , order ) ; "<AssertPlaceHolder>" ; } previousOrderEndsBeforeOrIsWithdrawed ( com . qcadoo . model . api . Entity , com . qcadoo . model . api . Entity ) { boolean bothOrdersAreNotNull = ( previousOrder != null ) && ( order != null ) ; if ( bothOrdersAreNotNull && ( ( isDeclinedOrAbandoned ( previousOrder ) ) || ( areDatesCorrect ( previousOrder , order ) ) ) ) { return false ; } return true ; }
|
org . junit . Assert . assertFalse ( result )
|
testDeblokkeringAntwoordFout ( ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . DeblokkeringVerzoekType deblokkeringVerzoekType = new nl . bzk . migratiebrp . bericht . model . sync . generated . DeblokkeringVerzoekType ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . DeblokkeringVerzoekBericht deblokkeringInfoVerzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . DeblokkeringVerzoekBericht ( deblokkeringVerzoekType ) ; deblokkeringInfoVerzoek . setMessageId ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; try { deblokkeringVerzoekService . verwerkBericht ( deblokkeringInfoVerzoek ) ; org . junit . Assert . fail ( "Er<sp>zou<sp>een<sp>fout<sp>op<sp>moeten<sp>treden." ) ; } catch ( final java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } verwerkBericht ( nl . bzk . migratiebrp . bericht . model . sync . impl . LeesGemeenteRegisterVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . LeesGemeenteRegisterAntwoordType type = new nl . bzk . migratiebrp . bericht . model . sync . generated . LeesGemeenteRegisterAntwoordType ( ) ; type . setGemeenteRegister ( new nl . bzk . migratiebrp . bericht . model . sync . generated . GemeenteRegisterType ( ) ) ; final java . util . List < nl . bzk . migratiebrp . bericht . model . sync . generated . GemeenteType > gemeentenList = type . getGemeenteRegister ( ) . getGemeente ( ) ; for ( final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Gemeente gemeente : brpDalService . geefAlleGemeenten ( ) ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . GemeenteType gemeenteType = new nl . bzk . migratiebrp . bericht . model . sync . generated . GemeenteType ( ) ; gemeenteType . setGemeenteCode ( asGemeenteCode ( gemeente . getCode ( ) ) ) ; gemeenteType . setPartijCode ( asPartijCode ( gemeente . getPartij ( ) . getCode ( ) ) ) ; if ( ( gemeente . getPartij ( ) . getDatumOvergangNaarBrp ( ) ) != null ) { gemeenteType . setDatumBrp ( java . math . BigInteger . valueOf ( gemeente . getPartij ( ) . getDatumOvergangNaarBrp ( ) . longValue ( ) ) ) ; } gemeentenList . add ( gemeenteType ) ; } final nl . bzk . migratiebrp . bericht . model . sync . generated . GemeenteType rni = new nl . bzk . migratiebrp . bericht . model . sync . generated . GemeenteType ( ) ; rni . setGemeenteCode ( nl . bzk . migratiebrp . synchronisatie . runtime . service . GemeenteRegisterService . RNI_GEMEENTE_CODE ) ; rni . setPartijCode ( nl . bzk . migratiebrp . synchronisatie . runtime . service . GemeenteRegisterService . RNI_PARTIJ_CODE ) ; gemeentenList . add ( rni ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . LeesGemeenteRegisterAntwoordBericht antwoord = new nl . bzk . migratiebrp . bericht . model . sync . impl . LeesGemeenteRegisterAntwoordBericht ( type ) ; antwoord . setStatus ( StatusType . OK ) ; antwoord . setMessageId ( nl . bzk . migratiebrp . synchronisatie . runtime . util . MessageId . generateSyncMessageId ( ) ) ; antwoord . setCorrelationId ( verzoek . getMessageId ( ) ) ; return antwoord ; }
|
org . junit . Assert . assertNotNull ( "Er<sp>zou<sp>een<sp>fout<sp>op<sp>moeten<sp>treden." , e )
|
testExportResources ( ) { org . pentaho . di . trans . steps . xmloutput . XMLOutputMeta xmlOutputMeta = new org . pentaho . di . trans . steps . xmloutput . XMLOutputMeta ( ) ; xmlOutputMeta . setDefault ( ) ; org . pentaho . di . resource . ResourceNamingInterface resourceNamingInterface = mock ( org . pentaho . di . resource . ResourceNamingInterface . class ) ; org . pentaho . di . core . variables . Variables space = new org . pentaho . di . core . variables . Variables ( ) ; when ( resourceNamingInterface . nameResource ( any ( org . apache . commons . vfs2 . FileObject . class ) , eq ( space ) , eq ( true ) ) ) . thenReturn ( "exportFile" ) ; xmlOutputMeta . exportResources ( space , null , resourceNamingInterface , null , null ) ; "<AssertPlaceHolder>" ; } getFileName ( ) { return fileName ; }
|
org . junit . Assert . assertEquals ( "exportFile" , xmlOutputMeta . getFileName ( ) )
|
testToString ( ) { de . metanome . algorithm_integration . ColumnIdentifier expectedColumn1 = new de . metanome . algorithm_integration . ColumnIdentifier ( "table56" , "column1" ) ; de . metanome . algorithm_integration . ColumnIdentifier expectedColumn2 = new de . metanome . algorithm_integration . ColumnIdentifier ( "table2" , "column2" ) ; de . metanome . algorithm_integration . ColumnCombination columnCombination = new de . metanome . algorithm_integration . ColumnCombination ( expectedColumn1 , expectedColumn2 ) ; java . lang . String expectedStringRepresentation = ( ( ( "[" + ( expectedColumn2 . toString ( ) ) ) + ",<sp>" ) + ( expectedColumn1 . toString ( ) ) ) + "]" ; java . lang . String actualStringRepresentation = columnCombination . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder stringBuilder = new java . lang . StringBuilder ( ) ; stringBuilder . append ( "ColumnCombinationBitset<sp>" ) ; int lastSetBitIndex = bitset . previousSetBit ( bitset . length ( ) ) ; for ( int i = 0 ; i <= lastSetBitIndex ; i ++ ) { stringBuilder . append ( ( bitset . get ( i ) ? 1 : 0 ) ) ; } return stringBuilder . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expectedStringRepresentation , actualStringRepresentation )
|
testEncodeKanjiMode ( ) { java . util . Map < com . google . zxing . EncodeHintType , java . lang . Object > hints = new java . util . EnumMap ( com . google . zxing . EncodeHintType . class ) ; hints . put ( EncodeHintType . CHARACTER_SET , "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 6 ) ; com . google . zxing . qrcode . encoder . QRCode qrCode = com . google . zxing . qrcode . encoder . Encoder . encode ( "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 0 , ErrorCorrectionLevel . M , hints ) ; java . lang . String expected = "<sp>version:<sp>1\n" 9 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp>version:<sp>1\n" 7 + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 4 ) + "<sp>version:<sp>1\n" ) + "<sp>maskPattern:<sp>0\n" ) + "<sp>matrix:\n" ) + "<sp>version:<sp>1\n" 5 ) + "<sp>version:<sp>1\n" 8 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>0<sp>0<sp>0<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" ) + "<sp>version:<sp>1\n" 1 ) + "<sp>version:<sp>1\n" 2 ) + "<sp>version:<sp>1\n" 3 ) + "<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>1<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0<sp>0\n" ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 1 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 2 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 7 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 9 ) + "<sp>0<sp>1<sp>1<sp>0<sp>0<sp>1<sp>1<sp>0<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1\n" ) + "<sp>version:<sp>1\n" 4 ) + "<sp>1<sp>1<sp>1<sp>1<sp>1<sp>1<sp>1<sp>0<sp>0<sp>0<sp>0<sp>0<sp>1<sp>0<sp>0<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1\n" ) + "<sp>version:<sp>1\n" 0 ) + "<sp>version:<sp>1\n" 6 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 8 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 5 ) + "<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>0<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>1\n" 3 ) + "<sp>1<sp>1<sp>1<sp>1<sp>1<sp>1<sp>1<sp>0<sp>1<sp>1<sp>0<sp>1<sp>0<sp>1<sp>1<sp>1<sp>0<sp>0<sp>1<sp>0<sp>0\n" ) + ">>\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return label ; }
|
org . junit . Assert . assertEquals ( expected , qrCode . toString ( ) )
|
sharedCollectionsAreCopiedWithTheSameReference ( ) { org . libreplan . business . util . deepcopy . EntityExamples . EntityA entityA = new org . libreplan . business . util . deepcopy . EntityExamples . EntityA ( ) ; java . util . List < java . lang . String > originalList = java . util . Collections . singletonList ( "bla" ) ; entityA . setSharedListProperty ( originalList ) ; org . libreplan . business . util . deepcopy . EntityExamples . EntityA copy = new org . libreplan . business . util . deepcopy . DeepCopy ( ) . copy ( entityA ) ; "<AssertPlaceHolder>" ; } getSharedListProperty ( ) { return sharedListProperty ; }
|
org . junit . Assert . assertSame ( originalList , copy . getSharedListProperty ( ) )
|
testDecodeGeneralizedTimeWithoutTimeZoneWithFracSec2Byte ( ) { java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . clear ( ) ; cal . set ( Calendar . YEAR , 2010 ) ; cal . set ( Calendar . MONTH , Calendar . JULY ) ; cal . set ( Calendar . DAY_OF_MONTH , 12 ) ; cal . set ( Calendar . HOUR_OF_DAY , 21 ) ; cal . set ( Calendar . MINUTE , 45 ) ; cal . set ( Calendar . SECOND , 27 ) ; cal . set ( Calendar . MILLISECOND , 360 ) ; java . util . Date expectedDate = cal . getTime ( ) ; byte [ ] data = new byte [ ] { 24 , 17 , 50 , 48 , 49 , 48 , 48 , 55 , 49 , 50 , 50 , 49 , 52 , 53 , 50 , 55 , 46 , 51 , 54 } ; java . util . Date actualDate = org . kaazing . gateway . util . asn1 . Asn1Utils . decodeGeneralizedTime ( java . nio . ByteBuffer . wrap ( data ) ) ; "<AssertPlaceHolder>" ; } wrap ( org . kaazing . mina . netty . buffer . ByteBufferWrappingChannelBuffer ) { this . buffer = buffer . buffer ; order = buffer . order ; capacity = buffer . capacity ; setIndex ( buffer . readerIndex ( ) , buffer . writerIndex ( ) ) ; return this ; }
|
org . junit . Assert . assertEquals ( expectedDate , actualDate )
|
findFunctionsByNameInNamespaceForRootResourceTypeWithFunctionsWithSameNameOnSubTypResourceShouldReturnOtherFunction ( ) { 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 ( rootResourceType , 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 ) )
|
testExplicitPassphrase ( ) { factoryBean . setLocation ( SSLTestConstants . KEYSTORE_JKS_RESOURCE ) ; factoryBean . setPassword ( SSL . DEFAULT_KEYSTORE_PASSWORD ) ; "<AssertPlaceHolder>" ; } createKeyStore ( ) { if ( ( getLocation ( ) ) == null ) { throw new java . lang . IllegalArgumentException ( "location<sp>is<sp>required" ) ; } java . io . InputStream inputStream = null ; try { java . net . URL url = ch . qos . logback . core . util . LocationUtil . urlForResource ( getLocation ( ) ) ; inputStream = url . openStream ( ) ; java . security . KeyStore keyStore = newKeyStore ( ) ; keyStore . load ( inputStream , getPassword ( ) . toCharArray ( ) ) ; return keyStore ; } catch ( java . security . NoSuchProviderException ex ) { throw new java . security . NoSuchProviderException ( ( "no<sp>such<sp>keystore<sp>provider:<sp>" + ( getProvider ( ) ) ) ) ; } catch ( java . security . NoSuchAlgorithmException ex ) { throw new java . security . NoSuchAlgorithmException ( ( "no<sp>such<sp>keystore<sp>type:<sp>" + ( getType ( ) ) ) ) ; } catch ( java . io . FileNotFoundException ex ) { throw new java . security . KeyStoreException ( ( ( getLocation ( ) ) + ":<sp>file<sp>not<sp>found" ) ) ; } catch ( java . lang . Exception ex ) { throw new java . security . KeyStoreException ( ( ( ( getLocation ( ) ) + ":<sp>" ) + ( ex . getMessage ( ) ) ) , ex ) ; } finally { try { if ( inputStream != null ) { inputStream . close ( ) ; } } catch ( java . io . IOException ex ) { ex . printStackTrace ( System . err ) ; } } }
|
org . junit . Assert . assertNotNull ( factoryBean . createKeyStore ( ) )
|
testUpdateSinkGroupFilter ( ) { config . setUserNameAttribute ( "sAMAccountName" ) ; config . setUserSearchBase ( "cn=users,DC=ranger,DC=qe,DC=hortonworks,DC=com" ) ; config . setUserSearchFilter ( "" ) ; config . setGroupSearchBase ( "OU=Groups,DC=ranger,DC=qe,DC=hortonworks,DC=com" ) ; config . setGroupSearchFilter ( "cn=Group19" ) ; config . setUserGroupMemberAttributeName ( "member" ) ; config . setUserObjectClass ( "organizationalPerson" ) ; config . setGroupObjectClass ( "groupOfNames" ) ; config . setGroupSearchEnabled ( true ) ; config . setGroupSearchFirstEnabled ( false ) ; ldapBuilder . init ( ) ; org . apache . ranger . usergroupsync . PolicyMgrUserGroupBuilderTest sink = new org . apache . ranger . usergroupsync . PolicyMgrUserGroupBuilderTest ( ) ; sink . init ( ) ; ldapBuilder . updateSink ( sink ) ; "<AssertPlaceHolder>" ; } getTotalGroups ( ) { return allGroups . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , sink . getTotalGroups ( ) )
|
testReplacementForSingleVariable ( ) { java . lang . String value = "${testproperty}" ; java . lang . System . setProperty ( "testproperty" , "correctreplacement" ) ; java . lang . String result = io . joynr . messaging . bounceproxy . runtime . BounceProxySystemPropertyLoader . replaceVariableBySystemProperty ( value ) ; "<AssertPlaceHolder>" ; java . lang . System . clearProperty ( "testproperty" ) ; } replaceVariableBySystemProperty ( java . lang . String ) { if ( value == null ) return null ; int startVariableIndex = value . indexOf ( "${" ) ; while ( startVariableIndex >= 0 ) { int endVariableIndex = value . indexOf ( "}" , startVariableIndex ) ; java . lang . String propertyName = value . substring ( ( startVariableIndex + 2 ) , endVariableIndex ) ; java . lang . String systemProperty = java . lang . System . getProperty ( propertyName ) ; if ( systemProperty == null ) { throw new io . joynr . exceptions . JoynrRuntimeException ( ( ( "No<sp>value<sp>for<sp>system<sp>property<sp>'" + propertyName ) + "'<sp>set<sp>as<sp>defined<sp>in<sp>property<sp>file.<sp>Unable<sp>to<sp>start<sp>Bounce<sp>Proxy" ) ) ; } else { value = ( ( value . substring ( 0 , startVariableIndex ) ) + systemProperty ) + ( value . substring ( ( endVariableIndex + 1 ) ) ) ; } startVariableIndex = value . indexOf ( "${" ) ; } return value ; }
|
org . junit . Assert . assertEquals ( "correctreplacement" , result )
|
testSimple2 ( ) { java . lang . Object obj = new net . bytebuddy . ByteBuddy ( ) . subclass ( java . lang . Object . class ) . name ( "example.Type" ) . method ( named ( "toString" ) ) . intercept ( net . bytebuddy . implementation . FixedValue . value ( "Hello<sp>World!" ) ) . make ( ) . load ( getClass ( ) . getClassLoader ( ) ) . getLoaded ( ) . newInstance ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( "Binary{" + "value=size(" ) + ( value . length ) ) + ")}" ; }
|
org . junit . Assert . assertThat ( obj . toString ( ) , org . hamcrest . Matchers . is ( "Hello<sp>World!" ) )
|
testServicesAnnotatedButNotImplementsMultiple ( ) { @ com . liferay . portal . kernel . spring . osgi . OSGiBeanProperties ( service = { java . util . EventListener . class , java . io . Serializable . class } ) class C implements java . io . Serializable { } java . util . Set < java . lang . String > interfaceNames = OSGiBeanProperties . Service . interfaceNames ( new C ( ) , C . class . getAnnotation ( com . liferay . portal . kernel . spring . osgi . OSGiBeanProperties . class ) , StringPool . EMPTY_ARRAY ) ; "<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 ( interfaceNames . toString ( ) , 1 , interfaceNames . size ( ) )
|
testLimit ( ) { final org . geotoolkit . data . FeatureCollection featureList = org . geotoolkit . processing . vector . maxlimit . MaxLimitTest . buildFeatureList ( ) ; org . geotoolkit . process . ProcessDescriptor desc = org . geotoolkit . process . ProcessFinder . getProcessDescriptor ( GeotkProcessingRegistry . NAME , "vector:maxlimit" ) ; org . opengis . parameter . ParameterValueGroup in = desc . getInputDescriptor ( ) . createValue ( ) ; in . parameter ( "feature_in" ) . setValue ( featureList ) ; in . parameter ( "max_in" ) . setValue ( 5 ) ; org . geotoolkit . process . Process proc = desc . createProcess ( in ) ; final org . geotoolkit . data . FeatureCollection featureListOut = ( ( org . geotoolkit . data . FeatureCollection ) ( proc . call ( ) . parameter ( "feature_out" ) . getValue ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; }
|
org . junit . Assert . assertEquals ( 5 , featureListOut . size ( ) )
|
testNamespaceCreateAndAssign ( ) { org . apache . hadoop . hbase . rsgroup . TestRSGroupsBasics . LOG . info ( "testNamespaceCreateAndAssign" ) ; java . lang . String nsName = ( tablePrefix ) + "_foo" ; final org . apache . hadoop . hbase . TableName tableName = org . apache . hadoop . hbase . TableName . valueOf ( nsName , ( ( tablePrefix ) + "_testCreateAndAssign" ) ) ; org . apache . hadoop . hbase . rsgroup . RSGroupInfo appInfo = addGroup ( "appInfo" , 1 ) ; admin . createNamespace ( org . apache . hadoop . hbase . NamespaceDescriptor . create ( nsName ) . addConfiguration ( RSGroupInfo . NAMESPACE_DESC_PROP_GROUP , "appInfo" ) . build ( ) ) ; final org . apache . hadoop . hbase . client . TableDescriptor desc = org . apache . hadoop . hbase . client . TableDescriptorBuilder . newBuilder ( tableName ) . setColumnFamily ( org . apache . hadoop . hbase . client . ColumnFamilyDescriptorBuilder . of ( "f" ) ) . build ( ) ; admin . createTable ( desc ) ; org . apache . hadoop . hbase . rsgroup . TEST_UTIL . waitFor ( org . apache . hadoop . hbase . rsgroup . WAIT_TIMEOUT , new org . apache . hadoop . hbase . Waiter . Predicate < java . lang . Exception > ( ) { @ java . lang . Override public boolean evaluate ( ) throws java . lang . Exception { return ( getTableRegionMap ( ) . get ( desc . getTableName ( ) ) ) != null ; } } ) ; org . apache . hadoop . hbase . ServerName targetServer = getServerName ( appInfo . getServers ( ) . iterator ( ) . next ( ) ) ; "<AssertPlaceHolder>" ; } getRegions ( org . apache . hadoop . hbase . net . Address ) { java . util . LinkedList < org . apache . hadoop . hbase . client . RegionInfo > regions = new java . util . LinkedList ( ) ; for ( Map . Entry < org . apache . hadoop . hbase . client . RegionInfo , org . apache . hadoop . hbase . ServerName > el : master . getAssignmentManager ( ) . getRegionStates ( ) . getRegionAssignments ( ) . entrySet ( ) ) { if ( ( el . getValue ( ) ) == null ) { continue ; } if ( el . getValue ( ) . getAddress ( ) . equals ( server ) ) { addRegion ( regions , el . getKey ( ) ) ; } } for ( org . apache . hadoop . hbase . master . assignment . RegionStateNode state : master . getAssignmentManager ( ) . getRegionsInTransition ( ) ) { if ( state . getRegionLocation ( ) . getAddress ( ) . equals ( server ) ) { addRegion ( regions , state . getRegionInfo ( ) ) ; } } return regions ; }
|
org . junit . Assert . assertEquals ( 1 , admin . getRegions ( targetServer ) . size ( ) )
|
testMatchGraphSourceAtLeastWSC01 ( ) { es . usc . citius . composit . core . knowledge . Concept c = es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con1233457844" ) ; java . util . Map < es . usc . citius . composit . core . knowledge . Concept , es . usc . citius . composit . core . matcher . logic . LogicMatchType > expected = new java . util . HashMap < es . usc . citius . composit . core . knowledge . Concept , es . usc . citius . composit . core . matcher . logic . LogicMatchType > ( ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con677999980" ) , LogicMatchType . PLUGIN ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con1648412736" ) , LogicMatchType . PLUGIN ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con1233457844" ) , LogicMatchType . EXACT ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con1578980503" ) , LogicMatchType . PLUGIN ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con471341825" ) , LogicMatchType . PLUGIN ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con54748427" ) , LogicMatchType . PLUGIN ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con332477359" ) , LogicMatchType . PLUGIN ) ; expected . put ( es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . dataset . getKb ( ) . getConcept ( "con1094593378" ) , LogicMatchType . PLUGIN ) ; java . util . Map < es . usc . citius . composit . core . knowledge . Concept , es . usc . citius . composit . core . matcher . logic . LogicMatchType > result = es . usc . citius . composit . test . matcher . graph . WSCHashMatchGraphTest . matchGraph . getSourceElementsThatMatch ( c , LogicMatchType . PLUGIN , MatchGraph . TypeSelector . AT_LEAST ) ; "<AssertPlaceHolder>" ; } getSourceElementsThatMatch ( E , T extends es . usc . citius . composit . core . matcher . graph . Comparable , es . usc . citius . composit . core . matcher . graph . TypeSelector ) { return filter ( getSourceElementsThatMatch ( target ) , type , selector ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
computeEndTimeForPaymentPreview_InvokeInLastTimeSliceEndingWithBillingEnd ( ) { long endTimeForPeriod = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-01-31<sp>23:59:59" ) ; long endTimeForBilling = org . oscm . test . DateTimeHandling . calculateMillis ( "2012-02-01<sp>00:00:00" ) ; long endTime = new org . oscm . billingservice . business . calculation . revenue . CostCalculatorPerUnit ( ) . computeEndTimeForPaymentPreview ( endTimeForPeriod , endTimeForBilling , PricingPeriod . MONTH ) ; "<AssertPlaceHolder>" ; } calculateMillis ( java . lang . String ) { return org . oscm . test . DateTimeHandling . parseToCalendar ( dateSource ) . getTimeInMillis ( ) ; }
|
org . junit . Assert . assertEquals ( org . oscm . test . DateTimeHandling . calculateMillis ( "2012-02-01<sp>00:00:00" ) , endTime )
|
testEarlyEvalOfDefaultArgs ( ) { java . lang . String templates = "s(x,y={<(x)>})<sp>::=<sp>\"<x><y>\"\n" ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroupString ( templates ) ; org . stringtemplate . v4 . ST b = group . getInstanceOf ( "s" ) ; b . add ( "x" , "a" ) ; java . lang . String expecting = "aa" ; java . lang . String result = b . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , result )
|
testSelectBitwiseNot ( ) { if ( ! ( accessStackAdapter . supportsBitwiseOps ( ) ) ) { return ; } createNumericsDataSet ( ) ; org . apache . cayenne . exp . Expression left = new org . apache . cayenne . exp . parser . ASTBitwiseNot ( new org . apache . cayenne . exp . parser . ASTBitwiseNot ( new org . apache . cayenne . exp . parser . ASTObjPath ( ReturnTypesMap1 . INTEGER_COLUMN . getName ( ) ) ) ) ; org . apache . cayenne . exp . Expression right = new org . apache . cayenne . exp . parser . ASTScalar ( 2 ) ; org . apache . cayenne . exp . Expression greater = new org . apache . cayenne . exp . parser . ASTGreater ( ) ; greater . setOperand ( 0 , left ) ; greater . setOperand ( 1 , right ) ; org . apache . cayenne . query . SelectQuery query = new org . apache . cayenne . query . SelectQuery ( org . apache . cayenne . testdo . return_types . ReturnTypesMap1 . class ) ; query . setQualifier ( greater ) ; java . util . List < org . apache . cayenne . testdo . return_types . ReturnTypesMap1 > objects = context . performQuery ( query ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , objects . size ( ) )
|
getPropertyAsBoolean_notDefinedProp_defaultfalse ( ) { boolean property = ch . puzzle . itc . mobiliar . common . util . ConfigurationService . getPropertyAsBoolean ( ConfigKey . ENCRYPTION_KEY , false ) ; "<AssertPlaceHolder>" ; } getPropertyAsBoolean ( ch . puzzle . itc . mobiliar . common . util . ConfigKey , java . lang . Boolean ) { java . lang . String propValue = ch . puzzle . itc . mobiliar . common . util . ConfigurationService . getPropertyValue ( key ) ; if ( propValue != null ) { return "true" . equals ( propValue . toLowerCase ( ) ) ; } return defaultValue ; }
|
org . junit . Assert . assertFalse ( property )
|
testIsDrbdStatus ( ) { for ( final lcmc . host . domain . Host host : integrationTestLauncher . getHosts ( ) ) { "<AssertPlaceHolder>" ; } } isDrbdStatusOk ( ) { return drbdStatusOk ; }
|
org . junit . Assert . assertTrue ( host . isDrbdStatusOk ( ) )
|
testReadWrite ( ) { query . setFields ( org . apache . gora . query . impl . TestQueryBase . FIELDS ) ; query . setKeyRange ( org . apache . gora . query . impl . TestQueryBase . START_KEY , org . apache . gora . query . impl . TestQueryBase . END_KEY ) ; org . apache . gora . util . TestIOUtils . testSerializeDeserialize ( query ) ; "<AssertPlaceHolder>" ; } getDataStore ( ) { return ( ( org . apache . gora . accumulo . store . AccumuloStore < K , T > ) ( super . getDataStore ( ) ) ) ; }
|
org . junit . Assert . assertNotNull ( query . getDataStore ( ) )
|
initiallyEmpty ( ) { com . vaadin . ui . RichTextArea richTextArea = new com . vaadin . ui . RichTextArea ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; }
|
org . junit . Assert . assertTrue ( richTextArea . isEmpty ( ) )
|
testGetDoubleSameSizeArray ( ) { com . eclipsesource . v8 . V8Array a = v8 . executeArrayScript ( "[1,2.2,3.3,4]" ) ; double [ ] result = new double [ 4 ] ; int size = a . getDoubles ( 0 , 4 , result ) ; "<AssertPlaceHolder>" ; a . close ( ) ; } executeArrayScript ( java . lang . String ) { return executeArrayScript ( script , null , 0 ) ; }
|
org . junit . Assert . assertEquals ( 4 , size )
|
testGetIntsPartialFirstBlock ( ) { int p = m . malloc ( m_allocationSize ) ; int [ ] buf = new int [ ( m_allocationSize ) - 1 ] ; for ( int i = 0 ; i < ( ( m_allocationSize ) - 1 ) ; i ++ ) { buf [ i ] = i ; } m . setInt ( p , 0 , ( - 100 ) ) ; for ( int i = 0 ; i < ( buf . length ) ; i ++ ) { m . setInt ( p , ( i + 1 ) , buf [ i ] ) ; } int [ ] buf2 = new int [ buf . length ] ; m . getInts ( p , 1 , buf2 , 0 , buf . length ) ; "<AssertPlaceHolder>" ; m . free ( p ) ; } getInts ( int , int , int [ ] , int , int ) { m_parent . getInts ( pointer , ( ( m_baseOffset ) + src_offset_in_record ) , dst_data , dst_pos , length ) ; }
|
org . junit . Assert . assertArrayEquals ( buf , buf2 )
|
testLoadNotPresentSnapshot ( ) { io . global . ot . server . Optional < io . global . ot . server . SignedData < io . global . ot . server . RawSnapshot > > snapshot = await ( intermediateNode . loadSnapshot ( io . global . ot . server . GlobalOTNodeImplTest . REPO_ID , io . global . ot . server . GlobalOTNodeImplTest . getCommitId ( 1 ) ) ) ; "<AssertPlaceHolder>" ; } isPresent ( ) { return ( ( initializer ) != null ) || ( ( ( initializers ) != null ) && ( ! ( initializers . isEmpty ( ) ) ) ) ; }
|
org . junit . Assert . assertFalse ( snapshot . isPresent ( ) )
|
forcedFeaturesInjectedExternal ( ) { java . lang . String gadgetXml = "bar" 6 + ( ( ( "<sp><Require<sp>feature='foo'/>" + "</ModulePrefs>" ) + "bar" 5 ) + "bar" 0 ) ; final java . util . Set < java . lang . String > libs = com . google . common . collect . ImmutableSortedSet . of ( "bar" 1 , "bar" , "baz" ) ; org . apache . shindig . gadgets . GadgetContext context = new org . apache . shindig . gadgets . GadgetContext ( ) { @ org . apache . shindig . gadgets . render . Override public java . lang . String getParameter ( java . lang . String name ) { if ( name . equals ( "libs" ) ) { return com . google . caja . util . Join . join ( "bar" 3 , libs ) ; } return null ; } } ; org . apache . shindig . gadgets . Gadget gadget = makeGadgetWithSpec ( gadgetXml ) . setContext ( context ) ; org . apache . shindig . gadgets . features . FeatureResource fooResource = inline ( "bar" 4 , "foo-debug" ) ; expectFeatureCalls ( gadget , com . google . common . collect . ImmutableList . of ( fooResource ) , libs , com . google . common . collect . ImmutableList . of ( fooResource , inline ( "bar-c" , "bar-d" ) , inline ( "baz-c" , "baz-d" ) ) ) ; java . lang . String rewritten = rewrite ( gadget , "bar" 2 ) ; java . util . Set < java . lang . String > actual = getInjectedScript ( rewritten ) ; java . util . Set < java . lang . String > expected = com . google . common . collect . ImmutableSortedSet . of ( "bar" 1 , "bar" , "baz" ) ; "<AssertPlaceHolder>" ; } getInjectedScript ( java . lang . String ) { java . util . regex . Pattern featurePattern = java . util . regex . Pattern . compile ( "(?:.*)<script<sp>src=\"\\/js\\/(.*?)\"><\\/script>(?:.*)" , Pattern . DOTALL ) ; java . util . regex . Matcher matcher = featurePattern . matcher ( content ) ; org . junit . Assert . assertTrue ( "Forced<sp>scripts<sp>not<sp>injected." , matcher . matches ( ) ) ; return com . google . common . collect . Sets . newHashSet ( matcher . group ( 1 ) . split ( ":" ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
trimLabelsHours1 ( ) { java . util . List < java . lang . String > input = java . util . Arrays . asList ( "2014/11/26<sp>09:00:00.000000000" , "2014/11/26<sp>10:00:00.000000000" , "2014/11/26<sp>11:00:00.000000000" , "2014/11/26<sp>12:00:00.000000000" , "2014/11/26<sp>13:00:00.000000000" ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "2014/11/26<sp>09:00" , "10:00" , "11:00" , "12:00" , "13:00" ) ; java . util . List < java . lang . String > found = org . diirt . graphene . TimeScales . trimLabels ( input ) ; "<AssertPlaceHolder>" ; } trimLabels ( java . util . List ) { if ( ( labels . size ( ) ) <= 1 ) { return labels ; } int greatestChangingPrecision = org . diirt . graphene . TimeScales . calculateGreatestChangingField ( labels ) ; java . util . ArrayList < java . lang . String > rtn = new java . util . ArrayList < java . lang . String > ( labels . size ( ) ) ; org . diirt . graphene . TimeScales . DateTrimmer firstDate = new org . diirt . graphene . TimeScales . DateTrimmer ( labels . get ( 0 ) ) ; rtn . add ( firstDate . getCompactForm ( org . diirt . graphene . TimeScales . DateTrimmer . NO_PRECISION , greatestChangingPrecision ) ) ; for ( int i = 1 ; i < ( labels . size ( ) ) ; i ++ ) { java . lang . String prevLabel = labels . get ( ( i - 1 ) ) ; java . lang . String nextLabel = labels . get ( i ) ; int redundancePrecision = org . diirt . graphene . TimeScales . greatestRedundancePrecision ( prevLabel , nextLabel ) ; org . diirt . graphene . TimeScales . DateTrimmer f = new org . diirt . graphene . TimeScales . DateTrimmer ( nextLabel ) ; java . lang . String trimmedLabel = f . getCompactForm ( redundancePrecision , greatestChangingPrecision ) ; rtn . add ( trimmedLabel ) ; } return rtn ; }
|
org . junit . Assert . assertThat ( found , equalTo ( expected ) )
|
testMove ( ) { actual . add ( connection . set ( "foo" , "bar" ) ) ; actual . add ( connection . move ( "foo" , 1 ) ) ; verifyResults ( java . util . Arrays . asList ( new java . lang . Object [ ] { true , true } ) ) ; org . springframework . data . redis . connection . lettuce . LettuceConnectionFactory factory2 = new org . springframework . data . redis . connection . lettuce . LettuceConnectionFactory ( ) ; factory2 . setClientResources ( org . springframework . data . redis . connection . lettuce . LettuceTestClientResources . getSharedClientResources ( ) ) ; factory2 . setDatabase ( 1 ) ; factory2 . afterPropertiesSet ( ) ; org . springframework . data . redis . connection . StringRedisConnection conn2 = new org . springframework . data . redis . connection . DefaultStringRedisConnection ( factory2 . getConnection ( ) ) ; try { "<AssertPlaceHolder>" ; } finally { if ( conn2 . exists ( "foo" ) ) { conn2 . del ( "foo" ) ; } conn2 . close ( ) ; factory2 . destroy ( ) ; } } get ( java . lang . Object ) { return delegate . get ( key ) ; }
|
org . junit . Assert . assertEquals ( "bar" , conn2 . get ( "foo" ) )
|
testRemove ( ) { com . liferay . portal . kernel . model . PasswordTracker newPasswordTracker = addPasswordTracker ( ) ; _persistence . remove ( newPasswordTracker ) ; com . liferay . portal . kernel . model . PasswordTracker existingPasswordTracker = _persistence . fetchByPrimaryKey ( newPasswordTracker . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingPasswordTracker )
|
testEncryptedPassword ( ) { java . lang . String encryptedPassword = passwordEncryptor . encrypt ( "security" ) ; "<AssertPlaceHolder>" ; } encrypt ( java . lang . String ) { if ( ( callbackHandler ) != null ) { org . apache . wss4j . common . ext . WSPasswordCallback pwCb = new org . apache . wss4j . common . ext . WSPasswordCallback ( "" , org . apache . wss4j . common . ext . WSPasswordCallback . PASSWORD_ENCRYPTOR_PASSWORD ) ; try { callbackHandler . handle ( new javax . security . auth . callback . Callback [ ] { pwCb } ) ; } catch ( java . io . IOException | javax . security . auth . callback . UnsupportedCallbackException e ) { org . apache . wss4j . common . crypto . JasyptPasswordEncryptor . LOG . debug ( "Error<sp>in<sp>getting<sp>master<sp>password:<sp>" , e ) ; } if ( ( pwCb . getPassword ( ) ) != null ) { passwordEncryptor . setPassword ( pwCb . getPassword ( ) ) ; } } return passwordEncryptor . encrypt ( password ) ; }
|
org . junit . Assert . assertNotNull ( encryptedPassword )
|
testFirst ( ) { java . lang . Exception ex = new java . lang . Exception ( ) ; java . sql . SQLIntegrityConstraintViolationException sqlEx = new java . sql . SQLIntegrityConstraintViolationException ( ) ; java . sql . SQLException sex = new java . sql . SQLException ( ) ; sex . setNextException ( sqlEx ) ; ex . addSuppressed ( sex ) ; java . lang . Throwable first = org . spf4j . base . Throwables . first ( ex , ( t ) -> t instanceof java . sql . SQLIntegrityConstraintViolationException ) ; "<AssertPlaceHolder>" ; } first ( java . lang . Throwable , java . lang . Class ) { return ( ( T ) ( org . spf4j . base . Throwables . first ( t , ( java . lang . Throwable th ) -> clasz . isAssignableFrom ( th . getClass ( ) ) ) ) ) ; }
|
org . junit . Assert . assertSame ( sqlEx , first )
|
testInvalidExchange ( ) { gov . hhs . fha . nhinc . exchangemgr . ExchangeManager exMgr = createExchangeManagerWithInvalidExType ( ) ; try { "<AssertPlaceHolder>" ; } catch ( gov . hhs . fha . nhinc . exchangemgr . ExchangeManagerException ex ) { org . junit . Assert . fail ( ( "Error<sp>running<sp>testInvalidExchange:<sp>" + ( ex . getMessage ( ) ) ) ) ; } } getCache ( ) { refreshExchangeCacheIfRequired ( ) ; return exInternalCache ; }
|
org . junit . Assert . assertTrue ( exMgr . getCache ( ) . isEmpty ( ) )
|
disabledAdvice ( ) { registerAndRefreshContext ( "springlets.mvc.advices.enabled:false" ) ; io . springlets . web . mvc . advice . StringTrimmerAdvice advice = this . context . getBean ( io . springlets . web . mvc . advice . StringTrimmerAdvice . class ) ; "<AssertPlaceHolder>" ; } registerAndRefreshContext ( java . lang . String [ ] ) { org . springframework . boot . test . util . EnvironmentTestUtils . addEnvironment ( this . context , env ) ; this . context . register ( io . springlets . boot . autoconfigure . web . mvc . SpringletsWebMvcAutoConfiguration . class ) ; this . context . refresh ( ) ; }
|
org . junit . Assert . assertNull ( advice )
|
shouldNotExtractAttribute_emptyParameter ( ) { java . lang . String attribute = io . gravitee . management . idp . ldap . utils . LdapUtils . extractAttribute ( "" ) ; "<AssertPlaceHolder>" ; } extractAttribute ( java . lang . String ) { if ( filter == null ) { return null ; } java . lang . String [ ] parts = filter . split ( io . gravitee . management . idp . ldap . utils . LdapUtils . PROTECTED_FILTER_VARIABLE ) ; if ( ( ( parts . length ) > 1 ) || ( ( ( parts . length ) == 1 ) && ( filter . endsWith ( io . gravitee . management . idp . ldap . utils . LdapUtils . FILTER_VARIABLE ) ) ) ) { java . lang . String attribute = parts [ 0 ] ; int idxSep = java . lang . Math . max ( attribute . lastIndexOf ( ',' ) , attribute . lastIndexOf ( '(' ) ) ; int idx = ( idxSep == ( - 1 ) ) ? 0 : idxSep + 1 ; return attribute . substring ( idx ) ; } return null ; }
|
org . junit . Assert . assertNull ( attribute )
|
testGetCacheServerDiskStoreNameWhenUnspecified ( ) { final com . gemstone . gemfire . cache . server . CacheServer mockCacheServer = mockContext . mock ( com . gemstone . gemfire . cache . server . CacheServer . class , "CacheServer" ) ; final com . gemstone . gemfire . cache . server . ClientSubscriptionConfig mockClientSubscriptionConfig = mockContext . mock ( com . gemstone . gemfire . cache . server . ClientSubscriptionConfig . class , "ClientSubscriptionConfig" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { exactly ( 2 ) . of ( mockCacheServer ) . getClientSubscriptionConfig ( ) ; will ( returnValue ( mockClientSubscriptionConfig ) ) ; oneOf ( mockClientSubscriptionConfig ) . getDiskStoreName ( ) ; will ( returnValue ( null ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( null ) ; "<AssertPlaceHolder>" ; } getDiskStoreName ( com . gemstone . gemfire . cache . Region ) { return com . gemstone . gemfire . internal . lang . StringUtils . defaultIfBlank ( region . getAttributes ( ) . getDiskStoreName ( ) , DiskStoreDetails . DEFAULT_DISK_STORE_NAME ) ; }
|
org . junit . Assert . assertEquals ( DiskStoreDetails . DEFAULT_DISK_STORE_NAME , function . getDiskStoreName ( mockCacheServer ) )
|
findAllVerkrijgingNLNationaliteit ( ) { final java . util . Collection < nl . bzk . brp . model . algemeen . stamgegeven . kern . RedenVerkrijgingNLNationaliteit > result = stamTabelRepository . findAllVerkrijgingNLNationaliteit ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
|
org . junit . Assert . assertFalse ( result . isEmpty ( ) )
|
testBasicDownload ( ) { java . lang . String blobValue = "Hello<sp>World<sp>Café" ; java . lang . String encoding = "ISO-8859-1" ; org . nuxeo . ecm . core . api . Blob blob = org . nuxeo . ecm . core . api . Blobs . createBlob ( blobValue , "text/plain" , encoding ) ; blob . setFilename ( "myFile.txt" ) ; blob . setDigest ( "12345" ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; javax . servlet . http . HttpServletRequest request = mock ( javax . servlet . http . HttpServletRequest . class ) ; when ( request . getMethod ( ) ) . thenReturn ( "GET" ) ; javax . servlet . http . HttpServletResponse response = mock ( javax . servlet . http . HttpServletResponse . class ) ; javax . servlet . ServletOutputStream sos = new org . nuxeo . ecm . core . io . download . TestDownloadService . DummyServletOutputStream ( ) { @ org . nuxeo . ecm . core . io . download . Override public void write ( int b ) { out . write ( b ) ; } } ; java . io . PrintWriter printWriter = new java . io . PrintWriter ( sos ) ; when ( response . getOutputStream ( ) ) . thenReturn ( sos ) ; when ( response . getWriter ( ) ) . thenReturn ( printWriter ) ; downloadService . downloadBlob ( request , response , null , null , blob , null , null ) ; "<AssertPlaceHolder>" ; } toString ( org . w3c . dom . Document ) { return org . nuxeo . common . xmap . DOMSerializer . toString ( doc , org . nuxeo . common . xmap . DOMSerializer . DEFAULT_FORMAT ) ; }
|
org . junit . Assert . assertEquals ( blobValue , out . toString ( encoding ) )
|
testBuildWithParameters ( ) { org . lnu . is . domain . person . paper . PersonPaper personPaper = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; org . lnu . is . domain . person . award . PersonAward context = new org . lnu . is . domain . person . award . PersonAward ( ) ; context . setPerson ( person ) ; context . setPersonPaper ( personPaper ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonAward<sp>e<sp>WHERE<sp>(<sp>e.person<sp>=<sp>:person<sp>AND<sp>e.person<sp>=<sp>:person<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . award . PersonAward > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testGetStreamName ( ) { java . lang . String name = "test-get-stream-name" ; when ( impl . getStreamName ( ) ) . thenReturn ( name ) ; "<AssertPlaceHolder>" ; verify ( impl , times ( 1 ) ) . getStreamName ( ) ; } getStreamName ( ) { return bkDistributedLogManager . getStreamName ( ) ; }
|
org . junit . Assert . assertEquals ( name , manager . getStreamName ( ) )
|
shouldFailWebSocketConnectionWhenServerSendPingFrameWithRsv2 ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
|
shouldFindKeyValueStores ( ) { final java . util . List < org . apache . kafka . streams . state . ReadOnlyKeyValueStore < java . lang . String , java . lang . String > > results = wrappingStoreProvider . stores ( "kv" , org . apache . kafka . streams . state . QueryableStoreTypes . < java . lang . String , java . lang . String > keyValueStore ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( headers ) == null ? 0 : headers . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , results . size ( ) )
|
testBasicRole ( ) { org . apache . activemq . artemis . core . server . management . JMXAccessControlList controlList = new org . apache . activemq . artemis . core . server . management . JMXAccessControlList ( ) ; controlList . addToRoleAccess ( "org.myDomain" , null , "listSomething" , "admin" ) ; java . util . List < java . lang . String > roles = controlList . getRolesForObject ( new javax . management . ObjectName ( "org.myDomain:*" ) , "listSomething" ) ; "<AssertPlaceHolder>" ; } toArray ( ) { char [ ] result = new char [ size ] ; for ( int i = 0 ; i < ( result . length ) ; i ++ ) { result [ i ] = ( ( char ) ( read ( ) ) ) ; } return result ; }
|
org . junit . Assert . assertArrayEquals ( roles . toArray ( ) , new java . lang . String [ ] { "admin" } )
|
testQuerySourceInitialSplit_NoReferencedTables ( ) { com . google . api . services . bigquery . model . Table queryResultTable = new com . google . api . services . bigquery . model . Table ( ) . setSchema ( new com . google . api . services . bigquery . model . TableSchema ( ) . setFields ( org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . ImmutableList . of ( new com . google . api . services . bigquery . model . TableFieldSchema ( ) . setName ( "name" ) . setType ( "STRING" ) , new com . google . api . services . bigquery . model . TableFieldSchema ( ) . setName ( "number" ) . setType ( "INTEGER" ) ) ) ) . setNumBytes ( ( 1024L * 1024L ) ) ; java . lang . String encodedQuery = org . apache . beam . sdk . io . gcp . bigquery . FakeBigQueryServices . encodeQueryResult ( queryResultTable ) ; fakeJobService . expectDryRunQuery ( options . getProject ( ) , encodedQuery , new com . google . api . services . bigquery . model . JobStatistics ( ) . setQuery ( new com . google . api . services . bigquery . model . JobStatistics2 ( ) . setTotalBytesProcessed ( ( 1024L * 1024L ) ) . setReferencedTables ( org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . ImmutableList . of ( ) ) ) ) ; java . lang . String stepUuid = "testStepUuid" ; com . google . api . services . bigquery . model . TableReference tempTableReference = org . apache . beam . sdk . io . gcp . bigquery . BigQueryHelpers . createTempTableReference ( options . getProject ( ) , org . apache . beam . sdk . io . gcp . bigquery . BigQueryHelpers . createJobIdToken ( options . getJobName ( ) , stepUuid ) ) ; com . google . cloud . bigquery . storage . v1beta1 . Storage . CreateReadSessionRequest expectedRequest = com . google . cloud . bigquery . storage . v1beta1 . Storage . CreateReadSessionRequest . newBuilder ( ) . setParent ( ( "projects/" + ( options . getProject ( ) ) ) ) . setTableReference ( org . apache . beam . sdk . io . gcp . bigquery . BigQueryHelpers . toTableRefProto ( tempTableReference ) ) . setRequestedStreams ( 1024 ) . build ( ) ; com . google . cloud . bigquery . storage . v1beta1 . Storage . ReadSession . Builder builder = com . google . cloud . bigquery . storage . v1beta1 . Storage . ReadSession . newBuilder ( ) ; for ( int i = 0 ; i < 1024 ; i ++ ) { builder . addStreams ( com . google . cloud . bigquery . storage . v1beta1 . Storage . Stream . newBuilder ( ) . setName ( ( "stream-" + i ) ) ) ; } org . apache . beam . sdk . io . gcp . bigquery . BigQueryServices . StorageClient fakeStorageClient = mock ( org . apache . beam . sdk . io . gcp . bigquery . BigQueryServices . StorageClient . class ) ; when ( fakeStorageClient . createReadSession ( expectedRequest ) ) . thenReturn ( builder . build ( ) ) ; org . apache . beam . sdk . io . gcp . bigquery . BigQueryStorageQuerySource < com . google . api . services . bigquery . model . TableRow > querySource = org . apache . beam . sdk . io . gcp . bigquery . BigQueryStorageQuerySource . create ( stepUuid , ValueProvider . StaticValueProvider . of ( encodedQuery ) , true , true , QueryPriority . BATCH , null , null , new org . apache . beam . sdk . io . gcp . bigquery . BigQueryIO . TableRowParser ( ) , org . apache . beam . sdk . io . gcp . bigquery . TableRowJsonCoder . of ( ) , new org . apache . beam . sdk . io . gcp . bigquery . FakeBigQueryServices ( ) . withDatasetService ( fakeDatasetService ) . withJobService ( fakeJobService ) . withStorageClient ( fakeStorageClient ) ) ; java . util . List < ? extends org . apache . beam . sdk . io . BoundedSource < com . google . api . services . bigquery . model . TableRow > > sources = querySource . split ( 1024 , options ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 1024 , sources . size ( ) )
|
isResetPasswordSupported_SAML ( ) { when ( appBean . isInternalAuthMode ( ) ) . thenReturn ( false ) ; bean . isCheckResetPasswordSupported ( ) ; "<AssertPlaceHolder>" ; } isCheckResetPasswordSupported ( ) { if ( model . isUserIdChanged ( ) ) { try { reinitUser ( ) ; } catch ( org . oscm . ui . dialog . classic . operator . SaaSApplicationException e ) { org . oscm . ui . common . ExceptionHandler . execute ( e ) ; } } return getApplicationBean ( ) . isInternalAuthMode ( ) ; }
|
org . junit . Assert . assertEquals ( java . lang . Boolean . valueOf ( false ) , java . lang . Boolean . valueOf ( bean . isCheckResetPasswordSupported ( ) ) )
|
append_partition_by_name ( ) { org . apache . hadoop . hive . metastore . api . Partition inbound = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; org . apache . hadoop . hive . metastore . api . Partition outbound = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; when ( primaryMapping . transformInboundDatabaseName ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ) . thenReturn ( "inbound" ) ; when ( primaryClient . append_partition_by_name ( "inbound" , "table1" , "partName" ) ) . thenReturn ( inbound ) ; when ( primaryMapping . transformOutboundPartition ( inbound ) ) . thenReturn ( outbound ) ; org . apache . hadoop . hive . metastore . api . Partition result = handler . append_partition_by_name ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P , "table1" , "partName" ) ; "<AssertPlaceHolder>" ; verify ( primaryMapping ) . checkWritePermissions ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ; } append_partition_by_name ( java . lang . String , java . lang . String , java . lang . String ) { com . hotels . bdp . waggledance . mapping . model . DatabaseMapping mapping = checkWritePermissions ( db_name ) ; org . apache . hadoop . hive . metastore . api . Partition partition = mapping . getClient ( ) . append_partition_by_name ( mapping . transformInboundDatabaseName ( db_name ) , tbl_name , part_name ) ; return mapping . transformOutboundPartition ( partition ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( outbound ) )
|
shouldReturnZeroIfCurrentDateIsBeforeBirthDate ( ) { com . danidemi . tutorial . tdd . web . model . Actor tested = new com . danidemi . tutorial . tdd . web . model . Actor ( ) ; tested . setFirstName ( "Paul" ) ; tested . setLastName ( "Oldman" ) ; tested . setBirthDate ( new org . joda . time . DateTime ( 2010 , org . joda . time . DateTimeConstants . JANUARY , 1 , 0 , 0 ) . toDate ( ) ) ; int years = tested . getAgeInYears ( new org . joda . time . DateTime ( 1995 , org . joda . time . DateTimeConstants . JANUARY , 12 , 0 , 0 ) . toDate ( ) ) ; "<AssertPlaceHolder>" ; } setLastName ( java . lang . String ) { this . lastName = lastName ; }
|
org . junit . Assert . assertThat ( years , equalTo ( 0 ) )
|
testDeleteReferenceNodeOrLastNodeIsOk ( ) { org . neo4j . graphdb . Transaction tx = getTransaction ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { getGraphDb ( ) . createNode ( ) ; } for ( org . neo4j . graphdb . Node node : getGraphDb ( ) . getAllNodes ( ) ) { for ( org . neo4j . graphdb . Relationship rel : node . getRelationships ( ) ) { rel . delete ( ) ; } node . delete ( ) ; } tx . success ( ) ; tx . finish ( ) ; tx = getGraphDb ( ) . beginTx ( ) ; "<AssertPlaceHolder>" ; try { getGraphDb ( ) . getReferenceNode ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . neo4j . graphdb . NotFoundException nfe ) { } tx . success ( ) ; tx . finish ( ) ; } getGraphDb ( ) { return this . graphDb ; }
|
org . junit . Assert . assertFalse ( getGraphDb ( ) . getAllNodes ( ) . iterator ( ) . hasNext ( ) )
|
testGetBusinessObjectFormatExternalInterfaceDescriptiveInformation ( ) { org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey businessObjectFormatExternalInterfaceKey = new org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , EXTERNAL_INTERFACE ) ; org . finra . herd . model . api . xml . BusinessObjectFormatKey businessObjectFormatKey = new org . finra . herd . model . api . xml . BusinessObjectFormatKey ( NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , null ) ; org . finra . herd . model . jpa . ExternalInterfaceEntity externalInterfaceEntity = new org . finra . herd . model . jpa . ExternalInterfaceEntity ( ) ; org . finra . herd . model . jpa . BusinessObjectFormatEntity businessObjectFormatEntity = new org . finra . herd . model . jpa . BusinessObjectFormatEntity ( ) ; org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceDescriptiveInformation businessObjectFormatExternalInterfaceDescriptiveInformation = new org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceDescriptiveInformation ( businessObjectFormatExternalInterfaceKey , DISPLAY_NAME_FIELD , DESCRIPTION ) ; when ( externalInterfaceDaoHelper . getExternalInterfaceEntity ( org . finra . herd . service . impl . EXTERNAL_INTERFACE ) ) . thenReturn ( externalInterfaceEntity ) ; when ( businessObjectFormatDaoHelper . getBusinessObjectFormatEntity ( businessObjectFormatKey ) ) . thenReturn ( businessObjectFormatEntity ) ; when ( businessObjectFormatExternalInterfaceDescriptiveInformationHelper . createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities ( businessObjectFormatEntity , externalInterfaceEntity ) ) . thenReturn ( businessObjectFormatExternalInterfaceDescriptiveInformation ) ; org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceDescriptiveInformation result = businessObjectFormatExternalInterfaceDescriptiveInformationService . getBusinessObjectFormatExternalInterfaceDescriptiveInformation ( businessObjectFormatExternalInterfaceKey ) ; "<AssertPlaceHolder>" ; verify ( businessObjectFormatExternalInterfaceHelper ) . validateAndTrimBusinessObjectFormatExternalInterfaceKey ( businessObjectFormatExternalInterfaceKey ) ; verify ( businessObjectFormatExternalInterfaceDaoHelper ) . getBusinessObjectFormatExternalInterfaceEntity ( businessObjectFormatExternalInterfaceKey ) ; verify ( externalInterfaceDaoHelper ) . getExternalInterfaceEntity ( org . finra . herd . service . impl . EXTERNAL_INTERFACE ) ; verify ( businessObjectFormatDaoHelper ) . getBusinessObjectFormatEntity ( businessObjectFormatKey ) ; verify ( businessObjectFormatExternalInterfaceDescriptiveInformationHelper ) . createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities ( businessObjectFormatEntity , externalInterfaceEntity ) ; verifyNoMoreInteractionsHelper ( ) ; } getBusinessObjectFormatExternalInterfaceDescriptiveInformation ( org . finra . herd . model . api . xml . BusinessObjectFormatExternalInterfaceKey ) { businessObjectFormatExternalInterfaceHelper . validateAndTrimBusinessObjectFormatExternalInterfaceKey ( businessObjectFormatExternalInterfaceKey ) ; businessObjectFormatExternalInterfaceDaoHelper . getBusinessObjectFormatExternalInterfaceEntity ( businessObjectFormatExternalInterfaceKey ) ; org . finra . herd . model . jpa . ExternalInterfaceEntity externalInterfaceEntity = externalInterfaceDaoHelper . getExternalInterfaceEntity ( businessObjectFormatExternalInterfaceKey . getExternalInterfaceName ( ) ) ; org . finra . herd . model . api . xml . BusinessObjectFormatKey businessObjectFormatKey = new org . finra . herd . model . api . xml . BusinessObjectFormatKey ( businessObjectFormatExternalInterfaceKey . getNamespace ( ) , businessObjectFormatExternalInterfaceKey . getBusinessObjectDefinitionName ( ) , businessObjectFormatExternalInterfaceKey . getBusinessObjectFormatUsage ( ) , businessObjectFormatExternalInterfaceKey . getBusinessObjectFormatFileType ( ) , null ) ; org . finra . herd . model . jpa . BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectFormatDaoHelper . getBusinessObjectFormatEntity ( businessObjectFormatKey ) ; return businessObjectFormatExternalInterfaceDescriptiveInformationHelper . createBusinessObjectFormatExternalInterfaceDescriptiveInformationFromEntities ( businessObjectFormatEntity , externalInterfaceEntity ) ; }
|
org . junit . Assert . assertEquals ( businessObjectFormatExternalInterfaceDescriptiveInformation , result )
|
testToByteArrayWithPadding ( ) { byte [ ] bytes = new byte [ ] { 66 } ; dk . alexandra . fresco . suite . spdz2k . datatypes . UInt < dk . alexandra . fresco . suite . spdz2k . datatypes . CompUInt128 > uint = new dk . alexandra . fresco . suite . spdz2k . datatypes . CompUInt128 ( bytes , true ) ; byte [ ] expected = new byte [ 16 ] ; expected [ ( ( expected . length ) - 1 ) ] = 66 ; byte [ ] actual = uint . toByteArray ( ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { return dk . alexandra . fresco . framework . util . ByteAndBitConverter . toByteArray ( value ) ; }
|
org . junit . Assert . assertArrayEquals ( expected , actual )
|
shouldConnectToSecondUrlWhenTheFirstURLTimesOut ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( "yarn.resourcemanager.url" , ( ( ( org . apache . ambari . view . utils . ambari . ServicesTest . HTTP_RM_URL1 ) + ",<sp>" ) + ( org . apache . ambari . view . utils . ambari . ServicesTest . HTTP_RM_URL2 ) ) ) ; org . apache . ambari . view . ViewContext viewContext = getViewContext ( map ) ; org . apache . ambari . view . utils . ambari . AmbariApi ambariApi = createNiceMock ( org . apache . ambari . view . utils . ambari . AmbariApi . class ) ; org . apache . ambari . view . URLStreamProvider urlStreamProvider = createNiceMock ( org . apache . ambari . view . URLStreamProvider . class ) ; java . io . InputStream inputStream = org . apache . commons . io . IOUtils . toInputStream ( "{\"clusterInfo\":<sp>{\"haState\":<sp>\"ACTIVE\"}}" ) ; expect ( ambariApi . isClusterAssociated ( ) ) . andReturn ( false ) ; expect ( viewContext . getURLStreamProvider ( ) ) . andReturn ( urlStreamProvider ) . anyTimes ( ) ; expect ( urlStreamProvider . readFrom ( eq ( ( ( org . apache . ambari . view . utils . ambari . ServicesTest . HTTP_RM_URL1 ) + ( org . apache . ambari . view . utils . ambari . ServicesTest . RM_INFO_API_ENDPOINT ) ) ) , eq ( "GET" ) , anyString ( ) , org . easymock . EasyMock . < java . util . Map < java . lang . String , java . lang . String > > anyObject ( ) ) ) . andThrow ( new java . io . IOException ( ) ) ; expect ( urlStreamProvider . readFrom ( eq ( ( ( org . apache . ambari . view . utils . ambari . ServicesTest . HTTP_RM_URL2 ) + ( org . apache . ambari . view . utils . ambari . ServicesTest . RM_INFO_API_ENDPOINT ) ) ) , eq ( "GET" ) , anyString ( ) , org . easymock . EasyMock . < java . util . Map < java . lang . String , java . lang . String > > anyObject ( ) ) ) . andReturn ( inputStream ) ; replayAll ( ) ; org . apache . ambari . view . utils . ambari . Services services = new org . apache . ambari . view . utils . ambari . Services ( ambariApi , viewContext ) ; "<AssertPlaceHolder>" ; } getRMUrl ( ) { return ambariApi . getServices ( ) . getRMUrl ( ) ; }
|
org . junit . Assert . assertEquals ( org . apache . ambari . view . utils . ambari . ServicesTest . HTTP_RM_URL2 , services . getRMUrl ( ) )
|
needsUserPrefSubstInTitleUrl ( ) { java . lang . String xml = "<ModulePrefs<sp>title='foo'<sp>title_url='http://__UP_url__'/>" ; org . apache . shindig . gadgets . spec . ModulePrefs prefs = new org . apache . shindig . gadgets . spec . ModulePrefs ( org . apache . shindig . common . xml . XmlUtil . parse ( xml ) , org . apache . shindig . gadgets . spec . ModulePrefsTest . SPEC_URL ) ; "<AssertPlaceHolder>" ; } needsUserPrefSubstitution ( ) { return ( needsUserPrefSubstitution ) || ( ( type ) == ( org . apache . shindig . gadgets . spec . View . ContentType . URL ) ) ; }
|
org . junit . Assert . assertTrue ( prefs . needsUserPrefSubstitution ( ) )
|
testDoNotUrlEncodeCacheControl ( ) { org . exoplatform . portal . application . PortalRequestHandler handler = new org . exoplatform . portal . application . PortalRequestHandler ( ) ; java . lang . String cacheControl = "no-cache,<sp>max-age=0,<sp>must-revalidate,<sp>no-store" ; "<AssertPlaceHolder>" ; } getSanitizedCacheControl ( java . lang . String ) { if ( null == cacheControl ) { return null ; } return org . exoplatform . portal . application . PortalRequestHandler . CACHE_CONTROL_SANITIZE_PATTERN . matcher ( cacheControl ) . replaceAll ( "" ) ; }
|
org . junit . Assert . assertEquals ( cacheControl , handler . getSanitizedCacheControl ( cacheControl ) )
|
getPartnerServiceDetails ( ) { org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel m = new org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel ( ) ; org . oscm . internal . partnerservice . POPartnerServiceDetails s = m . getPartnerServiceDetails ( ) ; "<AssertPlaceHolder>" ; } getPartnerServiceDetails ( ) { org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel m = new org . oscm . ui . dialog . classic . partnerservice . PartnerServiceViewModel ( ) ; org . oscm . internal . partnerservice . POPartnerServiceDetails s = m . getPartnerServiceDetails ( ) ; org . junit . Assert . assertNull ( s ) ; }
|
org . junit . Assert . assertNull ( s )
|
defaultResizer ( ) { net . coobird . thumbnailator . resizers . Resizer resizer = Resizers . BICUBIC ; net . coobird . thumbnailator . resizers . ResizerFactory factory = new net . coobird . thumbnailator . resizers . FixedResizerFactory ( resizer ) ; net . coobird . thumbnailator . resizers . Resizer receivedResizer = factory . getResizer ( ) ; "<AssertPlaceHolder>" ; } getResizer ( ) { return resizer ; }
|
org . junit . Assert . assertEquals ( resizer , receivedResizer )
|
testRegisterMultipleCollectors ( ) { io . github . tcdl . msb . collector . Collector secondCollectorMock = mock ( io . github . tcdl . msb . collector . Collector . class ) ; when ( secondCollectorMock . getRequestMessage ( ) ) . thenReturn ( io . github . tcdl . msb . support . TestUtils . createSimpleRequestMessage ( io . github . tcdl . msb . collector . CollectorManagerTest . TOPIC ) ) ; io . github . tcdl . msb . collector . CollectorManager collectorManager = new io . github . tcdl . msb . collector . CollectorManager ( io . github . tcdl . msb . collector . CollectorManagerTest . TOPIC , channelManagerMock ) ; collectorManager . registerCollector ( collectorMock ) ; collectorManager . registerCollector ( secondCollectorMock ) ; "<AssertPlaceHolder>" ; verify ( channelManagerMock , times ( 1 ) ) . subscribeForResponses ( io . github . tcdl . msb . collector . CollectorManagerTest . TOPIC , collectorManager ) ; } registerCollector ( io . github . tcdl . msb . collector . Collector ) { java . lang . String correlationId = collector . getRequestMessage ( ) . getCorrelationId ( ) ; collectorsByCorrelationId . putIfAbsent ( correlationId , collector ) ; if ( ! ( isSubscribed ) ) { synchronized ( this ) { if ( ! ( isSubscribed ) ) { channelManager . subscribeForResponses ( topic , this ) ; isSubscribed = true ; } } } }
|
org . junit . Assert . assertEquals ( 2 , collectorManager . collectorsByCorrelationId . size ( ) )
|
testBuildTableNameRootServicePathDataModelByServicePathEncoding ( ) { System . out . println ( ( ( ( getTestTraceHead ( "-<sp>OK<sp>-<sp>'" 0 ) ) + "--------<sp>When<sp>encoding<sp>and<sp>when<sp>a<sp>root<sp>service-path<sp>is<sp>notified/defaulted<sp>and<sp>data_model<sp>is<sp>" ) + "'dm-by-service-path'<sp>the<sp>MySQL<sp>table<sp>name<sp>is<sp>the<sp>encoding<sp>of<sp><service-path>" ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String dataModel = "dm-by-service-path" ; java . lang . String enableEncoding = "true" ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String host = null ; java . lang . String password = null ; java . lang . String port = null ; java . lang . String username = null ; com . telefonica . iot . cygnus . sinks . NGSIMySQLSink sink = new com . telefonica . iot . cygnus . sinks . NGSIMySQLSink ( ) ; sink . configure ( createContext ( attrPersistence , batchSize , batchTime , batchTTL , dataModel , enableEncoding , enableGrouping , enableLowercase , host , password , port , username ) ) ; java . lang . String servicePath = "/" ; java . lang . String entity = null ; java . lang . String attribute = null ; try { java . lang . String builtTableName = sink . buildTableName ( servicePath , entity , attribute ) ; java . lang . String expecetedTableName = "x002f" ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( getTestTraceHead ( "-<sp>OK<sp>-<sp>'" 0 ) ) + "-<sp>OK<sp>-<sp>'" ) + builtTableName ) + "'<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service-path>" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( getTestTraceHead ( "-<sp>OK<sp>-<sp>'" 0 ) ) + "-<sp>FAIL<sp>-<sp>'" ) + builtTableName ) + "-<sp>OK<sp>-<sp>'" 1 ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "-<sp>OK<sp>-<sp>'" 0 ) ) + "-<sp>FAIL<sp>-<sp>There<sp>was<sp>some<sp>problem<sp>when<sp>building<sp>the<sp>table<sp>name" ) ) ; throw e ; } buildTableName ( java . lang . String , java . lang . String , java . lang . String ) { java . lang . String name ; switch ( dataModel ) { case DMBYSERVICEPATH : name = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; break ; case DMBYENTITY : java . lang . String truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ; break ; case DMBYATTRIBUTE : truncatedServicePath = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( servicePath ) ; name = ( ( ( truncatedServicePath . isEmpty ( ) ? "" : truncatedServicePath + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( entity ) ) ) + ( com . telefonica . iot . cygnus . utils . CommonConstants . CONCATENATOR ) ) + ( com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( attribute ) ) ; break ; default : throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( "Unknown<sp>data<sp>model<sp>'" + ( dataModel . toString ( ) ) ) + "'.<sp>Please,<sp>use<sp>dm-by-service-path,<sp>dm-by-entity<sp>or<sp>dm-by-attribute" ) ) ; } if ( ( name . length ( ) ) > ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) { throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( ( "Building<sp>table<sp>name<sp>'" + name ) + "'<sp>and<sp>its<sp>length<sp>is<sp>greater<sp>than<sp>" ) + ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) ) ; } return name ; }
|
org . junit . Assert . assertEquals ( expecetedTableName , builtTableName )
|
testSetResponseVariable ( ) { java . lang . String expResult = "http://localhost:54321null?response_variable=1" ; java . lang . Integer value = 1 ; instance = new edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFViewBuilder ( ) ; encoder = new edu . oswego . csc480_hci521_2013 . server . ServerUrlEncoder ( ) ; instance . setResponseVariable ( 1 ) ; "<AssertPlaceHolder>" ; } build ( edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . UrlEncoder ) { java . lang . StringBuilder query = new java . lang . StringBuilder ( ) ; for ( java . lang . String key : args . keySet ( ) ) { for ( java . lang . String value : args . get ( key ) ) { if ( ( query . length ( ) ) == 0 ) { query . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } else { query . append ( '&' ) . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } } } java . lang . String url = ( ( ( ( ( ( ( protocol ) + "://" ) + ( host ) ) + ":" ) + ( port ) ) + ( page ) ) + ( ( query . length ( ) ) > 0 ? "?" : "" ) ) + ( query . toString ( ) ) ; return url ; }
|
org . junit . Assert . assertEquals ( expResult , instance . build ( encoder ) )
|
testEqualSameValuesAndOrder ( ) { com . thoughtworks . gauge . TableRow row = new com . thoughtworks . gauge . TableRow ( ) ; row . addCell ( "hello" , "world" ) ; row . addCell ( "foo" , "bar" ) ; com . thoughtworks . gauge . TableRow otherRow = new com . thoughtworks . gauge . TableRow ( ) ; otherRow . addCell ( "hello" , "world" ) ; otherRow . addCell ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } com . thoughtworks . gauge . TableRow other = ( ( com . thoughtworks . gauge . TableRow ) ( obj ) ) ; return ( cells ) == null ? ( other . cells ) == null : cells . equals ( other . cells ) ; }
|
org . junit . Assert . assertTrue ( row . equals ( otherRow ) )
|
testIFElseExprOnSingleLine ( ) { org . stringtemplate . v4 . ST t = new org . stringtemplate . v4 . ST ( ( "begin\n" + ( "<if(users)><else><endif>\n" + "end\n" ) ) ) ; java . lang . String expecting = ( ( "begin" + ( newline ) ) + "end" ) + ( newline ) ; java . lang . String result = t . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , result )
|
nonceShouldGetARandomNumber ( ) { long rdm = 10 ; when ( mockRandom . nextLong ( ) ) . thenReturn ( rdm ) ; long currentSeconds = ( java . lang . System . currentTimeMillis ( ) ) + rdm ; long actual = java . lang . Long . valueOf ( toTest . nonce ( ) ) ; "<AssertPlaceHolder>" ; verify ( mockRandom ) . nextLong ( ) ; } nonce ( ) { return java . lang . String . valueOf ( ( ( java . lang . System . currentTimeMillis ( ) ) + ( rdm . nextLong ( ) ) ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( currentSeconds == actual ) || ( ( currentSeconds + 1 ) == actual ) ) )
|
testCloseStream ( ) { final java . util . concurrent . atomic . AtomicBoolean closed = new java . util . concurrent . atomic . AtomicBoolean ( ) ; java . io . InputStream in = new java . io . InputStream ( ) { @ org . apache . jackrabbit . oak . spi . blob . Override public void close ( ) { closed . set ( true ) ; } @ org . apache . jackrabbit . oak . spi . blob . Override public int read ( ) throws java . io . IOException { return - 1 ; } } ; store . writeBlob ( in ) ; "<AssertPlaceHolder>" ; } get ( ) { return result ; }
|
org . junit . Assert . assertTrue ( closed . get ( ) )
|
testGetKey ( ) { org . jfree . data . DefaultKeyedValues v1 = new org . jfree . data . DefaultKeyedValues ( ) ; try { v1 . getKey ( ( - 1 ) ) ; org . junit . Assert . fail ( "Should<sp>have<sp>thrown<sp>an<sp>IndexOutOfBoundsException" ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { } try { v1 . getKey ( 0 ) ; org . junit . Assert . fail ( "Should<sp>have<sp>thrown<sp>an<sp>IndexOutOfBoundsException" ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { } org . jfree . data . DefaultKeyedValues v2 = new org . jfree . data . DefaultKeyedValues ( ) ; v2 . addValue ( "K1" , new java . lang . Integer ( 1 ) ) ; v2 . addValue ( "K2" , new java . lang . Integer ( 2 ) ) ; v2 . addValue ( "K3" , new java . lang . Integer ( 3 ) ) ; "<AssertPlaceHolder>" ; } getKey ( int ) { return this . keys . get ( index ) ; }
|
org . junit . Assert . assertEquals ( "K2" , v2 . getKey ( 1 ) )
|
testWriteString ( ) { java . lang . String s = "Hello<sp>World" ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; org . jboss . as . host . controller . discovery . S3Util . writeString ( s , new java . io . DataOutputStream ( buffer ) ) ; java . lang . String result = org . jboss . as . host . controller . discovery . S3Util . readString ( new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ) ; "<AssertPlaceHolder>" ; } readString ( java . io . DataInput ) { int b = in . readByte ( ) ; if ( b == 1 ) { return in . readUTF ( ) ; } return null ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( s ) )
|
defaultPlatform ( ) { com . facebook . buck . features . haskell . HaskellPlatform ruleDefaultPlatform = HaskellTestUtils . DEFAULT_PLATFORM . withCxxPlatform ( HaskellTestUtils . DEFAULT_PLATFORM . getCxxPlatform ( ) . withFlavor ( com . facebook . buck . core . model . InternalFlavor . of ( "custom_platform" ) ) ) ; com . facebook . buck . features . haskell . HaskellLibraryBuilder libBuilder = new com . facebook . buck . features . haskell . HaskellLibraryBuilder ( com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//:rule" ) , HaskellTestUtils . DEFAULT_PLATFORM , com . facebook . buck . core . model . FlavorDomain . of ( "Haskell<sp>Platform" , HaskellTestUtils . DEFAULT_PLATFORM , ruleDefaultPlatform ) , com . facebook . buck . cxx . toolchain . CxxPlatformUtils . DEFAULT_CONFIG ) ; libBuilder . setPlatform ( ruleDefaultPlatform . getFlavor ( ) ) ; com . facebook . buck . core . model . targetgraph . TargetGraph targetGraph = com . facebook . buck . core . model . targetgraph . TargetGraphFactory . newInstance ( libBuilder . build ( ) ) ; com . facebook . buck . core . rules . ActionGraphBuilder graphBuilder = new com . facebook . buck . core . rules . resolver . impl . TestActionGraphBuilder ( targetGraph ) ; com . facebook . buck . features . haskell . HaskellHaddockLibRule rule = ( ( com . facebook . buck . features . haskell . HaskellHaddockLibRule ) ( graphBuilder . requireRule ( libBuilder . getTarget ( ) . withAppendedFlavors ( HaskellLibraryDescription . Type . HADDOCK . getFlavor ( ) ) ) ) ) ; "<AssertPlaceHolder>" ; } getPlatform ( ) { return platform ; }
|
org . junit . Assert . assertThat ( rule . getPlatform ( ) , org . hamcrest . Matchers . equalTo ( ruleDefaultPlatform ) )
|
setEmptyAttribute ( ) { com . vaadin . flow . dom . Element e = com . vaadin . flow . dom . ElementFactory . createDiv ( ) ; e . setAttribute ( "foo" , "" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return sessionAttributes . get ( name ) ; }
|
org . junit . Assert . assertEquals ( "" , e . getAttribute ( "foo" ) )
|
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . specoffer . SpecOfferWave context = new org . lnu . is . domain . specoffer . SpecOfferWave ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOfferWave<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferWave > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
flowName ( ) { org . mule . runtime . core . api . construct . FlowConstruct mockFlowConstruct = mock ( org . mule . runtime . core . api . construct . FlowConstruct . class ) ; when ( mockFlowConstruct . getName ( ) ) . thenReturn ( "myFlowName" ) ; java . lang . String result = ( ( java . lang . String ) ( expressionManager . evaluate ( "#[flow.name]" , testEvent ( ) , fromSingleComponent ( mockFlowConstruct . getName ( ) ) ) . getValue ( ) ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( mockFlowConstruct . getName ( ) ) )
|
getConfigurationRealms_should_throw_IllegalArgumentException_if_no_class_for_component_match_property ( ) { java . util . Collection < java . lang . Class < ? > > roleMappingClasses = new java . util . ArrayList ( ) ; roleMappingClasses . add ( org . seedstack . seed . security . RoleMapping . class ) ; securityClasses . put ( org . seedstack . seed . security . RoleMapping . class , roleMappingClasses ) ; when ( configuration . getRealms ( ) ) . thenReturn ( com . google . common . collect . ImmutableList . of ( new org . seedstack . seed . security . SecurityConfig . RealmConfig ( ) . setName ( "Realm" ) . setRoleMapper ( "toto" ) ) ) ; underTest = new org . seedstack . seed . security . internal . SecurityConfigurer ( configuration , securityClasses , null ) ; org . seedstack . seed . security . internal . RealmConfiguration realm = underTest . getConfigurationRealms ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getRoleMappingClass ( ) { return roleMappingClass ; }
|
org . junit . Assert . assertEquals ( org . seedstack . seed . security . RoleMapping . class , realm . getRoleMappingClass ( ) )
|
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . domain . benefit . BenefitType source = new org . lnu . is . domain . benefit . BenefitType ( ) ; source . setId ( id ) ; source . setName ( name ) ; java . util . List < org . lnu . is . domain . benefit . BenefitType > sources = java . util . Arrays . asList ( source ) ; org . lnu . is . resource . benefit . type . BenefitTypeResource expected = new org . lnu . is . resource . benefit . type . BenefitTypeResource ( ) ; expected . setId ( id ) ; expected . setName ( name ) ; java . util . List < org . lnu . is . resource . benefit . type . BenefitTypeResource > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . resource . benefit . type . BenefitTypeResource > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expecteds , actuals )
|
selectUpDoesntConsumeInEmpty ( ) { setTokens ( ) ; sync . placeholder ( ) . focus ( ) ; jetbrains . jetpad . event . KeyEvent event = press ( KeyStrokeSpecs . SELECT_UP ) ; "<AssertPlaceHolder>" ; } isConsumed ( ) { return myConsumed ; }
|
org . junit . Assert . assertFalse ( event . isConsumed ( ) )
|
a0 ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 4 , ( 2 + 2 ) )
|
testShouldBeAbleToTypeOnANumberInputField ( ) { driver . get ( pages . formPage ) ; org . openqa . selenium . WebElement email = driver . findElement ( org . openqa . selenium . By . id ( "age" ) ) ; email . sendKeys ( "33" ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return commandProcessor . getString ( "getAttribute" , new java . lang . String [ ] { attributeLocator } ) ; }
|
org . junit . Assert . assertThat ( email . getAttribute ( "value" ) , org . hamcrest . Matchers . equalTo ( "33" ) )
|
testCalcDiff50PercentPositive ( ) { java . lang . Double fiftyPercent = java . lang . Double . valueOf ( 50.0 ) ; "<AssertPlaceHolder>" ; } calcDiff ( double , double ) { java . lang . Double diff = java . lang . Double . valueOf ( 0 ) ; if ( from == 0.0 ) { if ( to != 0.0 ) { diff = 100.0 ; } } else { if ( to != 0.0 ) { diff = java . lang . Double . valueOf ( ( ( ( to - from ) * 100 ) / from ) ) ; } else { diff = - 100.0 ; } } diff = ( java . lang . Math . round ( ( diff * 100 ) ) ) / 100.0 ; return diff ; }
|
org . junit . Assert . assertEquals ( fiftyPercent , service . calcDiff ( 10 , 15 ) )
|
testReadEmptyDirectory ( ) { java . io . File dir = new java . io . File ( "/tmp/byte-blocks/empty" ) ; java . nio . file . Files . deleteIfExists ( dir . toPath ( ) ) ; java . nio . file . Files . createDirectories ( dir . toPath ( ) ) ; com . spinn3r . artemis . byte_block_stream . reader . RollingByteBlockReader rollingByteBlockReader = new com . spinn3r . artemis . byte_block_stream . reader . FileBackedRollingByteBlockReader ( dir ) ; int found = 0 ; while ( rollingByteBlockReader . hasNext ( ) ) { rollingByteBlockReader . next ( ) ; ++ found ; } "<AssertPlaceHolder>" ; } next ( ) { try { com . spinn3r . artemis . sequence . GlobalMutex globalMutex = globalMutexProvider . get ( ) ; long writerId = globalMutex . getValue ( ) ; if ( writerId < ( com . spinn3r . artemis . sequence . SequenceGenerator . MIN_WRITER_ID ) ) { throw new com . spinn3r . artemis . sequence . SequenceGeneratorRuntimeException . WriterIdTooSmall ( ( "Writer<sp>ID<sp>too<sp>small:<sp>" + writerId ) ) ; } if ( writerId > ( com . spinn3r . artemis . sequence . SequenceGenerator . MAX_WRITER_ID ) ) { throw new com . spinn3r . artemis . sequence . SequenceGeneratorRuntimeException . WriterIdTooLarge ( ( "Writer<sp>ID<sp>too<sp>large:<sp>" + writerId ) ) ; } long result ; synchronized ( MUTEX ) { sequence . incrementAndGet ( ) ; while ( true ) { int now = getTimeAsSecondsSinceEpoch ( ) ; if ( now > ( lastRollover . get ( ) ) ) { sequence . set ( 0 ) ; lastRollover . set ( now ) ; } if ( ( sequence . get ( ) ) < ( com . spinn3r . artemis . sequence . SequenceGenerator . MAX_SEQUENCE ) ) { break ; } else { com . spinn3r . artemis . sequence . SequenceGenerator . log . warn ( "Sequence<sp>generator<sp>sleeping<sp>for<sp>%,d<sp>for<sp>sequence<sp>=<sp>%s,<sp>generator<sp>id<sp>=<sp>%s,<sp>last<sp>rollover<sp>=<sp>%s,<sp>issued=%s" , com . spinn3r . artemis . sequence . SequenceGenerator . SLEEP_TIME , sequence , writerId , lastRollover , issued ) ; sleepUninterruptibly ( com . spinn3r . artemis . sequence . SequenceGenerator . SLEEP_TIME , TimeUnit . MILLISECONDS ) ; } } result = ( ( ( lastRollover . get ( ) ) * ( GLOBAL_TIME_PADDING ) ) + ( writerId * ( LOCAL_WRITER_ID_PADDING ) ) ) + ( sequence . get ( ) ) ; issued . incrementAndGet ( ) ; } return new com . spinn3r . artemis . time . sequence . SequenceReference ( result ) ; } catch ( com . spinn3r . artemis . sequence . GlobalMutexExpiredException e ) { throw new com . spinn3r . artemis . sequence . SequenceGeneratorRuntimeException . GlobalMutexExpired ( e ) ; } }
|
org . junit . Assert . assertEquals ( 0 , found )
|
testRenderDisposedWidget_beforeCreateWidgets ( ) { org . eclipse . swt . widgets . Shell parent = new org . eclipse . swt . widgets . Shell ( display ) ; org . eclipse . swt . widgets . Composite child1 = new org . eclipse . swt . widgets . Composite ( parent , org . eclipse . swt . SWT . NONE ) ; org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( parent ) ; org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( child1 ) ; child1 . dispose ( ) ; org . eclipse . swt . widgets . Composite child2 = new org . eclipse . swt . widgets . Composite ( parent , org . eclipse . swt . SWT . NONE ) ; displayLCA . render ( display ) ; org . eclipse . rap . rwt . testfixture . internal . TestMessage message = getProtocolMessage ( ) ; org . eclipse . rap . rwt . internal . protocol . Operation . DestroyOperation destroyOperation = message . findDestroyOperation ( child1 ) ; org . eclipse . rap . rwt . internal . protocol . Operation . CreateOperation createOperation = message . findCreateOperation ( child2 ) ; java . util . List < org . eclipse . rap . rwt . internal . protocol . Operation > operations = message . getOperations ( ) ; "<AssertPlaceHolder>" ; } indexOf ( org . eclipse . nebula . widgets . grid . GridItem ) { checkWidget ( ) ; if ( item == null ) { org . eclipse . swt . SWT . error ( SWT . ERROR_NULL_ARGUMENT ) ; } if ( item . isDisposed ( ) ) { org . eclipse . swt . SWT . error ( SWT . ERROR_INVALID_ARGUMENT ) ; } if ( ! ( hasChildren ) ) { throw new java . lang . IllegalArgumentException ( "GridItem<sp>has<sp>no<sp>children!" ) ; } return ( item . getParentItem ( ) ) == ( this ) ? item . index : - 1 ; }
|
org . junit . Assert . assertTrue ( ( ( operations . indexOf ( destroyOperation ) ) < ( operations . indexOf ( createOperation ) ) ) )
|
testHigher1_XProtocolVersionsDowngradeTo1_1 ( ) { request = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "/foo" ) ; request . setVersion ( new org . apache . hc . core5 . http . ProtocolVersion ( "HTTP" , 1 , 2 ) ) ; final org . apache . hc . core5 . http . ClassicHttpRequest downgraded = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "/foo" ) ; downgraded . setVersion ( HttpVersion . HTTP_1_1 ) ; org . easymock . EasyMock . expect ( mockExecChain . proceed ( eqRequest ( downgraded ) , org . easymock . EasyMock . isA ( ExecChain . Scope . class ) ) ) . andReturn ( originResponse ) ; replayMocks ( ) ; final org . apache . hc . core5 . http . ClassicHttpResponse result = execute ( request ) ; verifyMocks ( ) ; "<AssertPlaceHolder>" ; } semanticallyTransparent ( org . apache . hc . core5 . http . ClassicHttpResponse , org . apache . hc . core5 . http . ClassicHttpResponse ) { final boolean entitiesEquivalent = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . equivalent ( r1 . getEntity ( ) , r2 . getEntity ( ) ) ; if ( ! entitiesEquivalent ) { return false ; } final boolean statusLinesEquivalent = ( org . apache . hc . core5 . util . LangUtils . equals ( r1 . getReasonPhrase ( ) , r2 . getReasonPhrase ( ) ) ) && ( ( r1 . getCode ( ) ) == ( r2 . getCode ( ) ) ) ; if ( ! statusLinesEquivalent ) { return false ; } return org . apache . hc . client5 . http . impl . cache . HttpTestUtils . isEndToEndHeaderSubset ( r1 , r2 ) ; }
|
org . junit . Assert . assertTrue ( org . apache . hc . client5 . http . impl . cache . HttpTestUtils . semanticallyTransparent ( originResponse , result ) )
|
should_use_override_invocation_strategy_when_specified ( ) { com . artemis . SystemInvocationStrategy strategy = new com . artemis . SystemInvocationStrategy ( ) { @ com . artemis . Override protected void process ( ) { } } ; com . artemis . World world = new com . artemis . World ( new com . artemis . WorldConfiguration ( ) . setInvocationStrategy ( strategy ) ) ; "<AssertPlaceHolder>" ; } getInvocationStrategy ( ) { return ( ( T ) ( invocationStrategy ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( world . getInvocationStrategy ( ) ) == strategy ) )
|
test2502355_restoreAutoRangeBounds ( ) { org . jfree . data . xy . DefaultXYDataset dataset = new org . jfree . data . xy . DefaultXYDataset ( ) ; org . jfree . chart . JFreeChart chart = org . jfree . chart . ChartFactory . createXYLineChart ( "TestChart" , "X" , "Y" , dataset , PlotOrientation . VERTICAL , false , false , false ) ; org . jfree . chart . plot . XYPlot plot = ( ( org . jfree . chart . plot . XYPlot ) ( chart . getPlot ( ) ) ) ; plot . setRangeAxis ( 1 , new org . jfree . chart . axis . NumberAxis ( "X2" ) ) ; org . jfree . chart . ChartPanel panel = new org . jfree . chart . ChartPanel ( chart ) ; chart . addChangeListener ( this ) ; this . chartChangeEvents . clear ( ) ; panel . restoreAutoRangeBounds ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return queue . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , this . chartChangeEvents . size ( ) )
|
testValues ( ) { org . slc . sli . modeling . uml . Aggregation [ ] aggregations = org . slc . sli . modeling . uml . Aggregation . values ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 3 , aggregations . length )
|
multiLogDeliveryCallbackTest ( ) { org . kaaproject . kaa . server . operations . service . akka . messages . core . logs . MultiLogDeliveryCallback callback ; akka . actor . ActorSystem system = akka . actor . ActorSystem . create ( "actorSystem" ) ; akka . actor . ActorRef actorRef = system . actorOf ( akka . actor . Props . create ( org . kaaproject . kaa . server . operations . service . akka . messages . core . logs . CallbacksTest . TestActor . class ) ) ; callback = new org . kaaproject . kaa . server . operations . service . akka . messages . core . logs . MultiLogDeliveryCallback ( actorRef , 1 , 1 ) ; "<AssertPlaceHolder>" ; callback . onSuccess ( ) ; callback = new org . kaaproject . kaa . server . operations . service . akka . messages . core . logs . MultiLogDeliveryCallback ( actorRef , 1 , 3 ) ; callback . onSuccess ( ) ; callback . sendSuccessToEndpoint ( ) ; callback . sendFailureToEndpoint ( LogDeliveryErrorCode . APPENDER_INTERNAL_ERROR ) ; callback . onInternalError ( ) ; callback . onRemoteError ( ) ; callback . onConnectionError ( ) ; } create ( java . util . Map ) { java . util . List < java . lang . Object [ ] > params = new java . util . ArrayList ( ) ; int schemaCounter = 0 ; for ( org . kaaproject . kaa . server . datamigration . model . Ctl ctl : ctlToSchemas . keySet ( ) ) { for ( org . kaaproject . kaa . server . datamigration . model . Schema schema : ctlToSchemas . get ( ctl ) ) { schemaCounter ++ ; params . add ( new java . lang . Object [ ] { schema . getId ( ) , schema . getCreatedTime ( ) , schema . getCreatedUsername ( ) , schema . getDescription ( ) , schema . getName ( ) , schema . getVersion ( ) , ctl . getMetaInfo ( ) . getAppId ( ) , ctl . getId ( ) } ) ; } } runner . batch ( connection , "insert<sp>into<sp>base_schems<sp>values(?,<sp>?,<sp>?,<sp>?,<sp>?,<sp>?,<sp>?,<sp>?)" , params . toArray ( new java . lang . Object [ schemaCounter ] [ ] ) ) ; }
|
org . junit . Assert . assertNotNull ( callback )
|
testGeenLandAanvang ( ) { soortAH = nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortAdministratieveHandeling . VOLTREKKING_HUWELIJK_IN_BUITENLAND ; final nl . bzk . brp . model . bericht . kern . HuwelijkBericht huwelijk = bouwHuwelijk ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . verbintenis . BRBY0442Test . NEDERLAND ) ; org . springframework . test . util . ReflectionTestUtils . setField ( huwelijk . getStandaard ( ) , "landGebiedAanvang" , null ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > resultaat = brby0442 . voerRegelUit ( null , huwelijk , actie , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) )
|
testBigBadFile2 ( ) { java . lang . ClassLoader cloader = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ; java . io . InputStream istream = cloader . getResourceAsStream ( "big-bad.csv" ) ; no . priv . garshol . duke . utils . CSVReader reader = new no . priv . garshol . duke . utils . CSVReader ( new java . io . InputStreamReader ( istream ) , 90000 , "big-bad.csv" ) ; try { java . lang . String [ ] row = reader . next ( ) ; while ( ( reader . next ( ) ) != null ) ; org . junit . Assert . fail ( "Shouldn't<sp>accept<sp>malformed<sp>file" ) ; } catch ( no . priv . garshol . duke . DukeException e ) { "<AssertPlaceHolder>" ; } } next ( ) { try { element = cursor . next ( ) ; builder . newRecord ( ) ; for ( no . priv . garshol . duke . datasources . Column col : getColumns ( ) ) { java . lang . String value = getStringValueFromCursorElement ( element , col . getName ( ) ) ; builder . addValue ( col , value ) ; } hasNext = cursor . hasNext ( ) ; return builder . getRecord ( ) ; } catch ( com . mongodb . MongoException e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertTrue ( ( ( e . getMessage ( ) . indexOf ( "big-bad.csv" ) ) != ( - 1 ) ) )
|
getProjects ( ) { de . blizzy . documentr . web . project . ProjectsController projectsController = new de . blizzy . documentr . web . project . ProjectsController ( ) ; java . lang . String view = projectsController . getProjects ( ) ; "<AssertPlaceHolder>" ; } getProjects ( ) { return "/project/index" ; }
|
org . junit . Assert . assertEquals ( "/project/index" , view )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.