input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
insertWithEnter ( ) { insert ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return myValue . get ( ) ; }
org . junit . Assert . assertNotNull ( container . child . get ( ) )
testOneFalseFilter ( ) { com . northconcepts . eventbus . EventFilter filter = new com . northconcepts . eventbus . filter . AndFilter ( FALSE_FILTER ) ; "<AssertPlaceHolder>" ; } allow ( com . northconcepts . eventbus . Event , java . lang . Object ) { return true ; }
org . junit . Assert . assertFalse ( filter . allow ( event , listener ) )
testMatchExactlyLinkIdErr ( ) { java . util . List < org . o3project . odenos . core . component . network . flow . basic . BasicFlowMatch > matches = null ; java . util . List < java . lang . String > path = null ; java . util . Map < java . lang . String , java . util . List < org . o3project . odenos . core . component . network . flow . basic . FlowAction > > edgeAction = null ; java . util . Map < java . lang . String , java . lang . String > flowAttributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; long idleTimeout = 0 ; long hardTimeout = 0 ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlow flow = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlow ( "1" , "" , "" , true , "" , "established" , matches , idleTimeout , hardTimeout , path , edgeAction , flowAttributes ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match1 = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match2 = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match3 = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match4 = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; flow . addMatch ( match1 ) ; flow . addMatch ( match2 ) ; flow . addMatch ( match3 ) ; flow . addMatch ( match4 ) ; queriesString = "type=node&enabled=true&status=established&path=link_id=link01" ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowQuery ( queriesString ) ; target . parse ( ) ; "<AssertPlaceHolder>" ; } matchExactly ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) { if ( ( target == null ) || ( ! ( target . getType ( ) . equals ( org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionCopyTtlOut . class . getSimpleName ( ) ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . matchExactly ( flow ) , org . hamcrest . CoreMatchers . is ( false ) )
testLeeg ( ) { final nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder builder = new nl . bzk . brp . util . hisvolledig . kern . PersoonHisVolledigImplBuilder ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView persoonHisVolledig = new nl . bzk . brp . model . hisvolledig . predikaatview . kern . PersoonHisVolledigView ( builder . build ( ) , null ) ; final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpMigratieInhoud > brpInhoud = mapper . map ( persoonHisVolledig , new nl . bzk . brp . levering . lo3 . mapper . OnderzoekMapper ( persoonHisVolledig ) , new nl . bzk . brp . levering . lo3 . mapper . TestActieHisVolledigLocator ( ) ) ; "<AssertPlaceHolder>" ; } map ( B , nl . bzk . brp . levering . lo3 . mapper . OnderzoekMapper , nl . bzk . brp . levering . lo3 . mapper . ActieHisVolledigLocator ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . brp . BrpGroep < G > > groepen = new java . util . ArrayList ( ) ; final java . lang . Iterable < H > histories = getHistorieIterable ( volledig ) ; if ( histories != null ) { for ( final H historie : histories ) { if ( historie != null ) { if ( ! ( behoortTotStatischePersoonlijst ( historie ) ) ) { continue ; } final nl . bzk . migratiebrp . conversie . model . brp . BrpGroep < G > groep = mapGroep ( historie , onderzoekMapper , actieHisVolledigLocator ) ; if ( groep != null ) { groepen . add ( groep ) ; } } } } if ( groepen . isEmpty ( ) ) { return null ; } else { return new nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < G > ( groepen ) ; } }
org . junit . Assert . assertNull ( brpInhoud )
setRefLogEnabledToFalse_RefLogShouldBeDisabled ( ) { setRefLogEnabled ( false , repo ) ; "<AssertPlaceHolder>" ; } isRefLogEnabled ( com . beijunyi . parallelgit . utils . Repository ) { com . beijunyi . parallelgit . utils . StoredConfig config = repo . getConfig ( ) ; return config . getBoolean ( com . beijunyi . parallelgit . utils . CONFIG_CORE_SECTION , null , com . beijunyi . parallelgit . utils . CONFIG_KEY_LOGALLREFUPDATES , false ) ; }
org . junit . Assert . assertFalse ( isRefLogEnabled ( repo ) )
testToDate ( ) { final io . zero . epic . Instant now = new java . util . Date ( ) . toInstant ( ) ; final io . zero . epic . LocalDate date = io . zero . epic . Ut . toDate ( now ) ; final io . zero . epic . LocalDate date1 = io . zero . epic . LocalDate . now ( ) ; "<AssertPlaceHolder>" ; } now ( ) { return io . zero . epic . Period . parse ( java . time . LocalDateTime . now ( ) ) ; }
org . junit . Assert . assertEquals ( date , date1 )
shouldReturnNullForNullElement ( ) { final uk . gov . gchq . gaffer . data . element . function . ExtractGroup function = new uk . gov . gchq . gaffer . data . element . function . ExtractGroup ( ) ; final java . lang . String result = function . apply ( null ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . Object ) { if ( null == value ) { return null ; } if ( value instanceof java . lang . Number ) { return ( ( java . lang . Number ) ( value ) ) . intValue ( ) ; } if ( value instanceof java . lang . String ) { return java . lang . Integer . valueOf ( ( ( java . lang . String ) ( value ) ) ) ; } throw new java . lang . IllegalArgumentException ( ( "Could<sp>not<sp>convert<sp>value<sp>to<sp>Integer:<sp>" + value ) ) ; }
org . junit . Assert . assertNull ( result )
testSave ( ) { org . kaaproject . kaa . common . dto . NotificationDto expected = generateNotifications ( null , null , null , 1 , NotificationTypeDto . USER ) . get ( 0 ) ; org . kaaproject . kaa . common . dto . NotificationDto found = notificationDao . findById ( expected . getId ( ) ) . toDto ( ) ; "<AssertPlaceHolder>" ; } toDto ( ) { org . kaaproject . kaa . common . dto . ConfigurationSchemaDto dto = super . toDto ( ) ; dto . setProtocolSchema ( protocolSchema ) ; dto . setBaseSchema ( baseSchema ) ; dto . setOverrideSchema ( overrideSchema ) ; return dto ; }
org . junit . Assert . assertEquals ( expected , found )
testCreateWithModDate ( ) { org . oscm . domobjects . Organization org = new org . oscm . domobjects . Organization ( ) ; org . setHistoryModificationTime ( java . lang . Long . valueOf ( 123456789 ) ) ; final org . oscm . domobjects . DomainHistoryObject < ? > hist = org . oscm . dataservice . bean . HistoryObjectFactory . create ( org , ModificationType . MODIFY , "me" ) ; "<AssertPlaceHolder>" ; } getModdate ( ) { return moddate ; }
org . junit . Assert . assertEquals ( new java . util . Date ( 123456789 ) , hist . getModdate ( ) )
deleteUserTest ( ) { net . sjune . mongodb . persistence . domain . User user = new net . sjune . mongodb . persistence . domain . User ( ) ; user . setId ( 4 ) ; userService . deleteUser ( user ) ; net . sjune . mongodb . persistence . domain . User user2 = userService . getUser ( user ) ; "<AssertPlaceHolder>" ; } getUser ( net . sjune . mongodb . persistence . domain . User ) { net . sjune . mongodb . persistence . service . UserServiceImpl . logger . info ( ( "userServiceImple.getUser<sp>>>>" + user ) ) ; return ( ( net . sjune . mongodb . persistence . domain . User ) ( userDAO . getUser ( user ) ) ) ; }
org . junit . Assert . assertNull ( user2 )
initializationClusterSingletonServiceCandidateAlreadyRegistredTest ( ) { doThrow ( org . opendaylight . mdsal . eos . common . api . CandidateAlreadyRegisteredException . class ) . when ( mockEos ) . registerCandidate ( org . opendaylight . mdsal . singleton . dom . impl . AbstractDOMClusterServiceProviderTest . ENTITY ) ; final org . opendaylight . mdsal . singleton . common . api . ClusterSingletonServiceRegistration reg = clusterSingletonServiceProvider . registerClusterSingletonService ( clusterSingletonService ) ; "<AssertPlaceHolder>" ; } registerClusterSingletonService ( org . opendaylight . mdsal . singleton . common . api . ClusterSingletonService ) { org . opendaylight . mdsal . singleton . dom . impl . AbstractClusterSingletonServiceProviderImpl . LOG . debug ( "Call<sp>registrationService<sp>{}<sp>method<sp>for<sp>ClusterSingletonService<sp>Provider<sp>{}" , service , this ) ; final java . lang . String serviceIdentifier = service . getIdentifier ( ) . getValue ( ) ; checkArgument ( ( ! ( com . google . common . base . Strings . isNullOrEmpty ( serviceIdentifier ) ) ) , "ClusterSingletonService<sp>identifier<sp>may<sp>not<sp>be<sp>null<sp>nor<sp>empty" ) ; final org . opendaylight . mdsal . singleton . dom . impl . ClusterSingletonServiceGroup < P , E , C > serviceGroup ; org . opendaylight . mdsal . singleton . dom . impl . ClusterSingletonServiceGroup < P , E , C > existing = serviceGroupMap . get ( serviceIdentifier ) ; if ( existing == null ) { serviceGroup = createGroup ( serviceIdentifier , new java . util . ArrayList ( 1 ) ) ; serviceGroupMap . put ( serviceIdentifier , serviceGroup ) ; try { initializeOrRemoveGroup ( serviceGroup ) ; } catch ( org . opendaylight . mdsal . eos . common . api . CandidateAlreadyRegisteredException e ) { throw new java . lang . IllegalArgumentException ( "Service<sp>group<sp>already<sp>registered" , e ) ; } } else { serviceGroup = existing ; } final org . opendaylight . mdsal . singleton . common . api . ClusterSingletonServiceRegistration reg = new org . opendaylight . mdsal . singleton . dom . impl . AbstractClusterSingletonServiceRegistration ( service ) { @ org . opendaylight . mdsal . singleton . dom . impl . Override protected void removeRegistration ( ) { org . opendaylight . mdsal . singleton . dom . impl . AbstractClusterSingletonServiceProviderImpl . this . removeRegistration ( serviceIdentifier , this ) ; } } ; serviceGroup . registerService ( reg ) ; return reg ; }
org . junit . Assert . assertNull ( reg )
testResourceLoading_multipleTrailing ( ) { java . net . URL url = org . reficio . ws . common . ResourceUtils . getResourceWithAbsolutePackagePath ( org . reficio . ws . common . System . class , "org/reficio/ws/common/test//////" , "soapEncoding.xsd" ) ; "<AssertPlaceHolder>" ; } getResourceWithAbsolutePackagePath ( java . lang . Class , java . lang . String , java . lang . String ) { checkNotNull ( clazz , "clazz<sp>cannot<sp>be<sp>null" ) ; java . lang . String resourcePath = org . reficio . ws . common . ResourceUtils . getResourcePath ( absolutePackagePath , resourceName ) ; java . net . URL resource = null ; resource = clazz . getClass ( ) . getResource ( resourcePath ) ; if ( resource == null ) { if ( ( resourcePath . charAt ( 0 ) ) == '/' ) { java . lang . String resourcePathWithoutLeadingSlash = resourcePath . substring ( 1 ) ; resource = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( resourcePathWithoutLeadingSlash ) ; } } checkArgument ( ( resource != null ) , java . lang . String . format ( "Resource<sp>[%s]<sp>loading<sp>failed" , resourcePath ) ) ; return resource ; }
org . junit . Assert . assertNotNull ( url )
testToJdbcType ( ) { java . time . LocalDate today = java . time . LocalDate . now ( ) ; java . time . LocalDate firstMonthDay = today . withDayOfMonth ( 1 ) ; java . sql . Date date = java . sql . Date . valueOf ( firstMonthDay ) ; java . time . YearMonth yearMonth = type . toBeanType ( date ) ; java . lang . Object val1 = type . toJdbcType ( yearMonth ) ; "<AssertPlaceHolder>" ; } toJdbcType ( java . lang . Object ) { return beanDbMap . getDbValue ( beanValue ) ; }
org . junit . Assert . assertEquals ( date , val1 )
getClientAddressDefault ( ) { org . mockito . Mockito . when ( request . getRemoteAddr ( ) ) . thenReturn ( "127.0.0.1" ) ; "<AssertPlaceHolder>" ; } getClientAddress ( javax . servlet . http . HttpServletRequest ) { for ( final java . lang . String header : com . cloud . api . ApiServlet . s_clientAddressHeaders ) { final java . lang . String ip = com . cloud . api . ApiServlet . getCorrectIPAddress ( request . getHeader ( header ) ) ; if ( ip != null ) { return ip ; } } return request . getRemoteAddr ( ) ; }
org . junit . Assert . assertEquals ( "127.0.0.1" , com . cloud . api . ApiServlet . getClientAddress ( request ) )
whenAssertingEquality_thenEqual ( ) { java . lang . String expected = "Baeldung" ; java . lang . String actual = "Baeldung" ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , actual )
testReadNumaTopologyFromConfigurations ( ) { java . util . Collection < org . apache . hadoop . yarn . server . nodemanager . containermanager . linux . resources . numa . NumaNodeResource > nodesList = numaResourceAllocator . getNumaNodesList ( ) ; java . util . Collection < org . apache . hadoop . yarn . server . nodemanager . containermanager . linux . resources . numa . NumaNodeResource > expectedNodesList = getExpectedNumaNodesList ( ) ; "<AssertPlaceHolder>" ; } getExpectedNumaNodesList ( ) { java . util . Collection < org . apache . hadoop . yarn . server . nodemanager . containermanager . linux . resources . numa . NumaNodeResource > expectedNodesList = new java . util . ArrayList ( 2 ) ; expectedNodesList . add ( new org . apache . hadoop . yarn . server . nodemanager . containermanager . linux . resources . numa . NumaNodeResource ( "0" , 73717 , 4 ) ) ; expectedNodesList . add ( new org . apache . hadoop . yarn . server . nodemanager . containermanager . linux . resources . numa . NumaNodeResource ( "1" , 73727 , 4 ) ) ; return expectedNodesList ; }
org . junit . Assert . assertEquals ( expectedNodesList , nodesList )
testGetPathInfo ( ) { new mockit . Expectations ( ) { { vertxRequest . path ( ) ; result = "/path" ; } } ; "<AssertPlaceHolder>" ; } getPathInfo ( ) { return this . vertxRequest . path ( ) ; }
org . junit . Assert . assertEquals ( "/path" , request . getPathInfo ( ) )
testGetAssertion ( ) { gov . hhs . fha . nhinc . docretrieve . entity . OutboundDocRetrieveOrchestratable instance = new gov . hhs . fha . nhinc . docretrieve . entity . OutboundStandardDocRetrieveOrchestratable ( ) ; gov . hhs . fha . nhinc . common . nhinccommon . AssertionType expResult = null ; gov . hhs . fha . nhinc . common . nhinccommon . AssertionType result = instance . getAssertion ( ) ; "<AssertPlaceHolder>" ; } getAssertion ( ) { return assertion ; }
org . junit . Assert . assertEquals ( expResult , result )
testSerializationWithTransientFields ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream out = new java . io . ObjectOutputStream ( baos ) ; long now = org . apache . shindig . gadgets . http . HttpResponseTest . timeSource . currentTimeMillis ( ) ; org . apache . shindig . gadgets . http . HttpResponse response = new org . apache . shindig . gadgets . http . HttpResponseBuilder ( ) . addHeader ( "Foo" , "bar" ) . addHeader ( "Foo" , "baz" ) . addHeader ( "Blah" , "blah" ) . addHeader ( "Date" , org . apache . shindig . common . util . DateUtil . formatRfc1123Date ( now ) ) . setHttpStatusCode ( 204 ) . setResponseString ( "This<sp>is<sp>the<sp>response<sp>string" ) . setMetadata ( "foo" , "bar" ) . create ( ) ; out . writeObject ( response ) ; java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ; java . io . ObjectInputStream in = new java . io . ObjectInputStream ( bais ) ; org . apache . shindig . gadgets . http . HttpResponse deserialized = ( ( org . apache . shindig . gadgets . http . HttpResponse ) ( in . readObject ( ) ) ) ; org . apache . shindig . gadgets . http . HttpResponse expectedResponse = new org . apache . shindig . gadgets . http . HttpResponseBuilder ( ) . addHeader ( "Foo" , "bar" ) . addHeader ( "Foo" , "baz" ) . addHeader ( "Blah" , "blah" ) . addHeader ( "Date" , org . apache . shindig . common . util . DateUtil . formatRfc1123Date ( now ) ) . setHttpStatusCode ( 204 ) . setResponseString ( "This<sp>is<sp>the<sp>response<sp>string" ) . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { if ( ( ( getNumChanges ( ) ) != ( responseObjNumChanges ) ) || ( ( responseObj ) == null ) ) { responseObj = new org . apache . shindig . gadgets . http . HttpResponse ( this ) ; responseObjNumChanges = getNumChanges ( ) ; } return responseObj ; }
org . junit . Assert . assertEquals ( expectedResponse , deserialized )
testPingdomEntryDetailsDeserializationTest ( ) { com . streamreduce . core . model . messages . details . SobaMessageDetails details = new com . streamreduce . core . model . messages . details . pingdom . PingdomEntryDetails . Builder ( ) . checkCreated ( 1 ) . lastErrorTime ( 42 ) . lastResponseTime ( 69 ) . lastTestTime ( 311 ) . resolution ( ( - 1 ) ) . status ( "All<sp>Good,<sp>Y'all" ) . build ( ) ; com . streamreduce . core . model . messages . details . SobaMessageDetailsTest . Container expected = new com . streamreduce . core . model . messages . details . SobaMessageDetailsTest . Container ( details ) ; java . lang . String json = com . streamreduce . core . model . messages . details . SobaMessageDetailsTest . objectMapper . writeValueAsString ( expected ) ; com . streamreduce . core . model . messages . details . SobaMessageDetailsTest . Container actual = com . streamreduce . core . model . messages . details . SobaMessageDetailsTest . objectMapper . readValue ( json , com . streamreduce . core . model . messages . details . SobaMessageDetailsTest . Container . class ) ; "<AssertPlaceHolder>" ; } build ( ) { return details ; }
org . junit . Assert . assertEquals ( expected , actual )
testSerialization2 ( ) { org . jfree . chart . plot . ThermometerPlot p1 = new org . jfree . chart . plot . ThermometerPlot ( ) ; p1 . setSubrangePaint ( 1 , new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . RED , 3.0F , 4.0F , java . awt . Color . BLUE ) ) ; org . jfree . chart . plot . ThermometerPlot p2 = ( ( org . jfree . chart . plot . ThermometerPlot ) ( org . jfree . chart . TestUtils . serialised ( p1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . xy . YWithXInterval ) ) { return false ; } org . jfree . data . xy . YWithXInterval that = ( ( org . jfree . data . xy . YWithXInterval ) ( obj ) ) ; if ( ( this . y ) != ( that . y ) ) { return false ; } if ( ( this . xLow ) != ( that . xLow ) ) { return false ; } if ( ( this . xHigh ) != ( that . xHigh ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( p1 . equals ( p2 ) )
lockingAndUnlockingWorks ( ) { long start = java . lang . System . currentTimeMillis ( ) ; this . lockManager . lock ( this . docRef ) ; this . lockManager . unlock ( this . docRef ) ; this . lockManager . lock ( this . docRef ) ; this . lockManager . unlock ( this . docRef ) ; this . lockManager . lock ( this . docRef ) ; this . lockManager . unlock ( this . docRef ) ; long time = ( java . lang . System . currentTimeMillis ( ) ) - start ; "<AssertPlaceHolder>" ; } unlock ( org . xwiki . model . reference . DocumentReference ) { java . util . concurrent . locks . Lock lock = this . locks . get ( document ) ; if ( lock == null ) { return ; } try { lock . unlock ( ) ; } catch ( java . lang . IllegalMonitorStateException ex ) { this . logger . debug ( "Lock<sp>was<sp>unexpectedly<sp>unlocked<sp>already:<sp>{}" , ex . getMessage ( ) , ex ) ; } }
org . junit . Assert . assertTrue ( ( time < ( 5 * 1000 ) ) )
testGetFrom ( ) { org . apache . cayenne . reflect . TstJavaBean bean = new org . apache . cayenne . reflect . TstJavaBean ( ) ; bean . setIntField ( 7 ) ; org . apache . cayenne . exp . Property < java . lang . Integer > INT_FIELD = org . apache . cayenne . exp . Property . create ( "intField" , org . apache . cayenne . exp . Integer . class ) ; "<AssertPlaceHolder>" ; } getFrom ( java . lang . Object ) { return ( ( E ) ( org . apache . cayenne . reflect . PropertyUtils . getProperty ( bean , getName ( ) ) ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 7 ) , INT_FIELD . getFrom ( bean ) )
isDisabled ( ) { boolean b = m . isDisabled ( ) ; "<AssertPlaceHolder>" ; } isDisabled ( ) { boolean b = m . isDisabled ( ) ; org . junit . Assert . assertTrue ( b ) ; }
org . junit . Assert . assertTrue ( b )
zouGeenMeldingMoetenGevenOmdatGeslachtsNamemAndersZijn ( ) { betrokkenheden . add ( createOuderBetrokkenheidBericht ( "123" ) ) ; final nl . bzk . brp . model . objecttype . operationeel . PersoonModel eerderkindModel = mock ( nl . bzk . brp . model . objecttype . operationeel . PersoonModel . class ) ; createPathToEerderKindModel ( eerderkindModel ) ; final nl . bzk . brp . model . groep . bericht . PersoonGeboorteGroepBericht persoonGeboorteGroepBericht = new nl . bzk . brp . model . groep . bericht . PersoonGeboorteGroepBericht ( ) ; persoonGeboorteGroepBericht . setDatumGeboorte ( nl . bzk . brp . util . DatumUtil . vandaag ( ) ) ; kindBericht . setGeboorte ( persoonGeboorteGroepBericht ) ; final nl . bzk . brp . model . groep . operationeel . actueel . PersoonGeboorteGroepModel persoonGeboorteGroepModel = mock ( nl . bzk . brp . model . groep . operationeel . actueel . PersoonGeboorteGroepModel . class ) ; final nl . bzk . brp . model . groep . bericht . PersoonGeslachtsaanduidingGroepBericht persoonGeslachtsaanduidingGroepBericht = new nl . bzk . brp . model . groep . bericht . PersoonGeslachtsaanduidingGroepBericht ( ) ; persoonGeslachtsaanduidingGroepBericht . setGeslachtsaanduiding ( Geslachtsaanduiding . MAN ) ; kindBericht . setGeslachtsaanduiding ( persoonGeslachtsaanduidingGroepBericht ) ; final nl . bzk . brp . model . groep . operationeel . actueel . PersoonGeslachtsaanduidingGroepModel persoonGeslachtsaanduidingGroepModel = mock ( nl . bzk . brp . model . groep . operationeel . actueel . PersoonGeslachtsaanduidingGroepModel . class ) ; final nl . bzk . brp . model . groep . bericht . PersoonSamengesteldeNaamGroepBericht persoonSamengesteldeNaamGroepBericht = new nl . bzk . brp . model . groep . bericht . PersoonSamengesteldeNaamGroepBericht ( ) ; persoonSamengesteldeNaamGroepBericht . setGeslachtsnaam ( new nl . bzk . brp . model . attribuuttype . Geslachtsnaamcomponent ( "Janssen" ) ) ; persoonSamengesteldeNaamGroepBericht . setScheidingsteken ( new nl . bzk . brp . model . attribuuttype . Scheidingsteken ( "/" ) ) ; persoonSamengesteldeNaamGroepBericht . setVoornamen ( new nl . bzk . brp . model . attribuuttype . Voornaam ( "Jan" ) ) ; persoonSamengesteldeNaamGroepBericht . setVoorvoegsel ( new nl . bzk . brp . model . attribuuttype . Voorvoegsel ( "den" ) ) ; kindBericht . setSamengesteldeNaam ( persoonSamengesteldeNaamGroepBericht ) ; final nl . bzk . brp . model . groep . operationeel . actueel . PersoonSamengesteldeNaamGroepModel persoonSamengesteldeNaamGroepModel = mock ( nl . bzk . brp . model . groep . operationeel . actueel . PersoonSamengesteldeNaamGroepModel . class ) ; when ( eerderkindModel . getGeboorte ( ) ) . thenReturn ( persoonGeboorteGroepModel ) ; when ( persoonGeboorteGroepModel . getDatumGeboorte ( ) ) . thenReturn ( nl . bzk . brp . util . DatumUtil . vandaag ( ) ) ; when ( eerderkindModel . getGeslachtsaanduiding ( ) ) . thenReturn ( persoonGeslachtsaanduidingGroepModel ) ; when ( persoonGeslachtsaanduidingGroepModel . getGeslachtsaanduiding ( ) ) . thenReturn ( Geslachtsaanduiding . MAN ) ; when ( eerderkindModel . getSamengesteldeNaam ( ) ) . thenReturn ( persoonSamengesteldeNaamGroepModel ) ; when ( persoonSamengesteldeNaamGroepModel . getGeslachtsnaam ( ) ) . thenReturn ( new nl . bzk . brp . model . attribuuttype . Geslachtsnaamcomponent ( "Janssens" ) ) ; when ( persoonSamengesteldeNaamGroepModel . getScheidingsteken ( ) ) . thenReturn ( new nl . bzk . brp . model . attribuuttype . Scheidingsteken ( "/" ) ) ; when ( persoonSamengesteldeNaamGroepModel . getVoornamen ( ) ) . thenReturn ( new nl . bzk . brp . model . attribuuttype . Voornaam ( "Jan" ) ) ; when ( persoonSamengesteldeNaamGroepModel . getVoorvoegsel ( ) ) . thenReturn ( new nl . bzk . brp . model . attribuuttype . Voorvoegsel ( "den" ) ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = brby0126 . executeer ( relatieModel , relatieBericht , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertThat ( meldingen . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
testNullList ( ) { org . apache . commons . math4 . geometry . euclidean . twod . DiskGenerator generator = new org . apache . commons . math4 . geometry . euclidean . twod . DiskGenerator ( ) ; org . apache . commons . math4 . geometry . enclosing . WelzlEncloser < org . apache . commons . math4 . geometry . euclidean . twod . Euclidean2D , org . apache . commons . math4 . geometry . euclidean . twod . Cartesian2D > encloser = new org . apache . commons . math4 . geometry . enclosing . WelzlEncloser ( 1.0E-10 , generator ) ; org . apache . commons . math4 . geometry . enclosing . EnclosingBall < org . apache . commons . math4 . geometry . euclidean . twod . Euclidean2D , org . apache . commons . math4 . geometry . euclidean . twod . Cartesian2D > ball = encloser . enclose ( null ) ; "<AssertPlaceHolder>" ; } getRadius ( ) { return radius ; }
org . junit . Assert . assertTrue ( ( ( ball . getRadius ( ) ) < 0 ) )
testNorthEastNeighbour ( ) { this . constructPopulation ( ) ; org . evosuite . ga . Neighbourhood < org . evosuite . ga . Chromosome > neighbourhood = new org . evosuite . ga . Neighbourhood ( org . evosuite . Properties . POPULATION ) ; java . util . List < org . evosuite . ga . Chromosome > neighbors = new java . util . ArrayList ( ) ; neighbors = neighbourhood . compactNine ( population , 5 ) ; org . evosuite . ga . Chromosome exepcted_individual = population . get ( 2 ) ; org . evosuite . ga . Chromosome returned_individual = neighbors . get ( 6 ) ; "<AssertPlaceHolder>" ; } get ( int ) { return this . pathCondition . get ( index ) ; }
org . junit . Assert . assertEquals ( exepcted_individual , returned_individual )
testIsBlockingEqualsTrueProperty ( ) { org . camunda . bpm . engine . impl . cmmn . model . CmmnActivity activity = handler . handleElement ( planItem , context ) ; java . lang . Boolean isBlocking = ( ( java . lang . Boolean ) ( activity . getProperty ( org . camunda . bpm . engine . test . cmmn . handler . PROPERTY_IS_BLOCKING ) ) ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return map . get ( property ) ; }
org . junit . Assert . assertTrue ( isBlocking )
testJsonSerialization ( ) { org . batfish . datamodel . LocalRoute lr = new org . batfish . datamodel . LocalRoute ( new org . batfish . datamodel . InterfaceAddress ( "1.1.1.1/24" ) , "Ethernet0" ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . common . util . BatfishObjectMapper . WRITER . writeValueAsBytes ( o ) , clazz ) ; }
org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( lr , org . batfish . datamodel . LocalRoute . class ) , org . hamcrest . Matchers . equalTo ( lr ) )
AuthorityKeyIdentifierIsCorrect ( ) { java . lang . String authorityKeyIdentifier = "01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:10:11:12:13:14" ; "<AssertPlaceHolder>" ; } getAuthorityKeyIdentifier ( ) { byte [ ] e = certificate . getExtensionValue ( Extension . authorityKeyIdentifier . getId ( ) ) ; if ( e == null ) { return "" ; } org . bouncycastle . asn1 . ASN1Primitive ap ; byte [ ] k = new byte [ ] { } ; try { ap = org . bouncycastle . cert . jcajce . JcaX509ExtensionUtils . parseExtensionValue ( e ) ; k = org . bouncycastle . asn1 . ASN1Sequence . getInstance ( ap . getEncoded ( ) ) . getEncoded ( ) ; } catch ( java . io . IOException e1 ) { e1 . printStackTrace ( ) ; } return helpers . CertificateHelper . addHexColons ( helpers . CertificateHelper . byteArrayToHex ( k ) ) . substring ( 12 , ( ( ( k . length ) * 3 ) - 1 ) ) ; }
org . junit . Assert . assertEquals ( authorityKeyIdentifier , certificate . getAuthorityKeyIdentifier ( ) )
testOnException ( ) { java . util . concurrent . atomic . AtomicReference < org . slieb . throwables . java . lang . Throwable > reference = new java . util . concurrent . atomic . AtomicReference ( ) ; org . slieb . throwables . java . lang . Exception expected = new org . slieb . throwables . java . lang . Exception ( "expected" ) ; try { org . slieb . throwables . ToIntFunctionWithThrowable . castToIntFunctionWithThrowable ( ( v1 ) -> { throw expected ; } ) . onException ( reference :: set ) . applyAsInt ( null ) ; } catch ( java . lang . Throwable ignored ) { } "<AssertPlaceHolder>" ; } get ( ) { try { return getWithThrowable ( ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
org . junit . Assert . assertEquals ( expected , reference . get ( ) )
endToEndLegQuoteTest ( ) { this . quoteRequestsChannel . send ( org . springframework . integration . support . MessageBuilder . withPayload ( exampleLegQuote ) . build ( ) , 1000 ) ; org . springframework . integration . Message asXml = this . carQuotesChannel . receive ( 5000 ) ; "<AssertPlaceHolder>" ; System . out . println ( xmlDocToString ( ( ( org . w3c . dom . Document ) ( asXml . getPayload ( ) ) ) ) ) ; asXml = this . flightQuotesChannel . receive ( 5000 ) ; System . out . println ( asXml ) ; System . out . println ( xmlDocToString ( ( ( org . w3c . dom . Document ) ( asXml . getPayload ( ) ) ) ) ) ; asXml = this . hotelQuotesChannel . receive ( 5000 ) ; System . out . println ( asXml ) ; System . out . println ( xmlDocToString ( ( ( org . w3c . dom . Document ) ( asXml . getPayload ( ) ) ) ) ) ; } receive ( long ) { long millis = java . lang . System . currentTimeMillis ( ) ; try { return ( ( T ) ( wrapped . receive ( timeout ) ) ) ; } finally { com . manning . siia . kitchen . TimedPollableChannel . logger . info ( ( ( "Receive<sp>call<sp>took:<sp>" + ( ( java . lang . System . currentTimeMillis ( ) ) - millis ) ) + "<sp>millis." ) ) ; } }
org . junit . Assert . assertNotNull ( asXml )
getRejectedGenesReturnsEmptyCollectionWhenNoRejectedGenesStored ( ) { when ( this . patient . getFeatures ( ) ) . thenReturn ( null ) ; when ( this . patient . getData ( org . phenotips . panels . internal . PatientDataAdapterTest . GLOBAL_QUALIFIERS ) ) . thenReturn ( null ) ; when ( this . patient . getData ( org . phenotips . panels . internal . PatientDataAdapterTest . GENES ) ) . thenReturn ( null ) ; final org . phenotips . panels . internal . PatientDataAdapter dataAdapter = this . adapterBuilder . withRejectedGenes ( ) . build ( ) ; "<AssertPlaceHolder>" ; } getRejectedGenes ( ) { return this . rejectedGenes ; }
org . junit . Assert . assertTrue ( dataAdapter . getRejectedGenes ( ) . isEmpty ( ) )
testGetValueWhenValueIsFalse ( ) { final boolean expectedValue = false ; when ( view . getValue ( ) ) . thenReturn ( expectedValue ) ; final boolean actualValue = switchComponent . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return rootPath ; }
org . junit . Assert . assertEquals ( expectedValue , actualValue )
executesHttpPOSTRequest ( ) { setField ( postDelegate , "url" , new org . activiti . engine . impl . el . FixedValue ( "foo" ) ) ; final org . springframework . http . ResponseEntity < java . lang . Object > responseEntity = mock ( org . springframework . http . ResponseEntity . class ) ; given ( responseEntity . getBody ( ) ) . willReturn ( "bar" ) ; given ( restTemplate . exchange ( any ( java . lang . String . class ) , eq ( com . ge . digitaltwin . tutorial . workflow . activiti . POST ) , any ( org . springframework . http . HttpEntity . class ) , eq ( java . lang . Object . class ) ) ) . willReturn ( responseEntity ) ; doThrow ( com . ge . digitaltwin . tutorial . workflow . activiti . RuntimeException . class ) . when ( delegateExecution ) . setVariable ( eq ( com . ge . digitaltwin . tutorial . workflow . activiti . BaseRESTServiceJavaDelegate . DATA_KEY ) , eq ( "bar" ) ) ; try { postDelegate . execute ( delegateExecution ) ; org . junit . Assert . fail ( "Expected<sp>RuntimeException<sp>to<sp>be<sp>thrown<sp>by<sp>mock" ) ; } catch ( java . lang . IllegalArgumentException iae ) { org . junit . Assert . fail ( iae . getMessage ( ) ) ; } catch ( java . lang . RuntimeException re ) { "<AssertPlaceHolder>" ; } } execute ( org . activiti . engine . delegate . DelegateExecution ) { if ( delegateExecution != null ) { final org . springframework . http . ResponseEntity < java . lang . Object > serviceResponse = doGet ( getURLasString ( ) , new org . springframework . http . HttpEntity ( createHttpHeaders ( delegateExecution ) ) , getProcessVariable ( delegateExecution , com . ge . digitaltwin . tutorial . workflow . activiti . PARAMS_KEY ) ) ; updateDataKeyVariable ( delegateExecution , serviceResponse ) ; } }
org . junit . Assert . assertTrue ( true )
testSerialization ( ) { org . jfree . chart . renderer . category . WaterfallBarRenderer r1 = new org . jfree . chart . renderer . category . WaterfallBarRenderer ( ) ; org . jfree . chart . renderer . category . WaterfallBarRenderer r2 = ( ( org . jfree . chart . renderer . category . WaterfallBarRenderer ) ( org . jfree . chart . TestUtilities . serialised ( r1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( r1 , r2 )
testSecureSourceWhileChannelDisconnected ( ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "192.168.1.22" , 2727 ) ; final org . restcomm . media . core . network . deprecated . channel . NetworkChannel channel = org . mockito . Mockito . mock ( org . restcomm . media . core . network . deprecated . channel . NetworkChannel . class ) ; final org . restcomm . media . core . network . deprecated . channel . NetworkGuard guard = new org . restcomm . media . core . network . deprecated . channel . SbcNetworkGuard ( ) ; org . mockito . Mockito . when ( channel . isConnected ( ) ) . thenReturn ( false ) ; org . mockito . Mockito . when ( channel . getRemoteAddress ( ) ) . thenReturn ( null ) ; final boolean secure = guard . isSecure ( channel , remoteAddress ) ; "<AssertPlaceHolder>" ; } isSecure ( org . restcomm . media . core . network . deprecated . channel . NetworkChannel , java . net . InetSocketAddress ) { if ( channel . isConnected ( ) ) { return channel . getRemoteAddress ( ) . equals ( source ) ; } return false ; }
org . junit . Assert . assertTrue ( secure )
whenCountDownLatch_noReset ( ) { com . baeldung . concurrent . countdownlatch . CountdownLatchResetExample ex = new com . baeldung . concurrent . countdownlatch . CountdownLatchResetExample ( 7 , 20 ) ; int lineCount = ex . countWaits ( ) ; "<AssertPlaceHolder>" ; } countWaits ( ) { java . util . concurrent . CountDownLatch countDownLatch = new java . util . concurrent . CountDownLatch ( count ) ; java . util . concurrent . ExecutorService es = java . util . concurrent . Executors . newFixedThreadPool ( threadCount ) ; for ( int i = 0 ; i < ( threadCount ) ; i ++ ) { es . execute ( ( ) -> { long prevValue = countDownLatch . getCount ( ) ; countDownLatch . countDown ( ) ; if ( ( countDownLatch . getCount ( ) ) != prevValue ) { updateCount . incrementAndGet ( ) ; } } ) ; } es . shutdown ( ) ; return updateCount . get ( ) ; }
org . junit . Assert . assertTrue ( ( lineCount <= 7 ) )
testMockExists ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( mock )
testGetSetApplicationPlugins ( ) { org . codice . ddf . admin . application . service . impl . ApplicationServiceBean serviceBean = newApplicationServiceBean ( ) ; org . codice . ddf . admin . application . plugin . ApplicationPlugin testPlugin1 = mock ( org . codice . ddf . admin . application . plugin . ApplicationPlugin . class ) ; org . codice . ddf . admin . application . plugin . ApplicationPlugin testPlugin2 = mock ( org . codice . ddf . admin . application . plugin . ApplicationPlugin . class ) ; java . util . List < org . codice . ddf . admin . application . plugin . ApplicationPlugin > pluginList = new java . util . ArrayList ( ) ; pluginList . add ( testPlugin1 ) ; pluginList . add ( testPlugin2 ) ; serviceBean . setApplicationPlugins ( pluginList ) ; "<AssertPlaceHolder>" ; } getApplicationPlugins ( ) { return applicationPlugins ; }
org . junit . Assert . assertEquals ( pluginList , serviceBean . getApplicationPlugins ( ) )
numberOfColumns_two ( ) { model . addLandingpageData ( landingpageData ( newServiceList ( "s1" , "s2" ) , newCategories ( "cat1" , "cat2" ) ) ) ; int size = model . getNumberOfColumns ( ) ; "<AssertPlaceHolder>" ; } getNumberOfColumns ( ) { return result . numberOfColumns ( ) ; }
org . junit . Assert . assertEquals ( 2 , size )
testGetPropertyClass ( ) { java . lang . Class expectedPropertyClass = org . talend . components . marklogic . tmarklogicoutput . MarkLogicOutputProperties . class ; "<AssertPlaceHolder>" ; } getPropertyClass ( ) { return org . talend . components . processing . definition . limit . LimitProperties . class ; }
org . junit . Assert . assertEquals ( expectedPropertyClass , definition . getPropertyClass ( ) )
testSetEntity ( ) { entityVersion . setEntity ( ( ( entity ) + 1 ) ) ; "<AssertPlaceHolder>" ; } getEntity ( ) { return entity ; }
org . junit . Assert . assertTrue ( entityVersion . getEntity ( ) . equals ( ( ( entity ) + 1 ) ) )
addObjectLabel ( ) { final java . lang . String key = "objectLabelKey" ; final java . lang . String value = "objectLabelValue" ; template . addObjectLabel ( key , value ) ; java . util . Map < java . lang . String , java . lang . String > labels = template . getObjectLabels ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { T value = ( ( T ) ( context . get ( key ) ) ) ; return value ; }
org . junit . Assert . assertEquals ( value , labels . get ( key ) )
testClear ( ) { ch . cyberduck . core . Collection < java . lang . Object > c = new ch . cyberduck . core . Collection < java . lang . Object > ( ) ; c . add ( new java . lang . Object ( ) ) ; c . clear ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return delegate . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( c . isEmpty ( ) )
mergerPreservesBroadcastThatEndsWhenTheAssertionBegins ( ) { org . atlasapi . query . content . merge . BroadcastMerger merger = org . atlasapi . query . content . merge . BroadcastMerger . parse ( "\"channelUri\"|\"2016-01-05T00:00:00Z\"|\"2016-01-06T00:00:00Z\"" ) ; org . atlasapi . media . entity . Broadcast broadcast = new org . atlasapi . media . entity . Broadcast ( "channelUri" , new org . joda . time . DateTime ( 2016 , 1 , 4 , 0 , 0 , 0 , org . joda . time . DateTimeZone . UTC ) , new org . joda . time . DateTime ( 2016 , 1 , 5 , 0 , 0 , 0 , org . joda . time . DateTimeZone . UTC ) ) ; com . google . common . collect . ImmutableSet < org . atlasapi . media . entity . Broadcast > merge = merger . merge ( com . google . common . collect . ImmutableSet . of ( ) , com . google . common . collect . ImmutableSet . of ( broadcast ) , true ) ; "<AssertPlaceHolder>" ; } contains ( org . joda . time . Interval ) { return ( this . interval . contains ( interval ) ) || ( isZeroDurationAtEndOfThisInterval ( interval ) ) ; }
org . junit . Assert . assertThat ( merge . contains ( broadcast ) , org . hamcrest . core . Is . is ( true ) )
testClearGrid ( ) { cardGrid . innerHTML = "something" ; view . clearGrid ( ) ; final java . lang . String expected = "" ; final java . lang . String actual = cardGrid . innerHTML ; "<AssertPlaceHolder>" ; } clearGrid ( ) { cardGrid . innerHTML = "" ; }
org . junit . Assert . assertEquals ( expected , actual )
testAddEmails ( ) { store . addEmails ( org . codice . ddf . catalog . ui . query . monitor . impl . SubscriptionsPersistentStoreImplTest . IDSTRING , new java . util . HashSet ( java . util . Arrays . asList ( org . codice . ddf . catalog . ui . query . monitor . impl . SubscriptionsPersistentStoreImplTest . EMAIL1 , org . codice . ddf . catalog . ui . query . monitor . impl . SubscriptionsPersistentStoreImplTest . EMAIL2 ) ) ) ; java . util . Set < java . lang . String > results = store . getEmails ( org . codice . ddf . catalog . ui . query . monitor . impl . SubscriptionsPersistentStoreImplTest . IDSTRING ) ; "<AssertPlaceHolder>" ; } getEmails ( java . lang . String ) { return java . util . Collections . singleton ( emailAddress ) ; }
org . junit . Assert . assertThat ( results , org . hamcrest . Matchers . is ( new java . util . HashSet ( java . util . Arrays . asList ( org . codice . ddf . catalog . ui . query . monitor . impl . SubscriptionsPersistentStoreImplTest . EMAIL1 , org . codice . ddf . catalog . ui . query . monitor . impl . SubscriptionsPersistentStoreImplTest . EMAIL2 ) ) ) )
testConvertWithParametersAndDisabledDefaultConstraintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . benefit . BenefitType benefitType = new org . lnu . is . domain . benefit . BenefitType ( ) ; org . lnu . is . domain . benefit . Benefit parent = new org . lnu . is . domain . benefit . Benefit ( ) ; java . lang . String abbrName = "fsdsfds" ; java . lang . String name = "name" 0 ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; java . lang . String description = "dsafds" ; org . lnu . is . domain . benefit . Benefit context = new org . lnu . is . domain . benefit . Benefit ( ) ; context . setBenefitType ( benefitType ) ; context . setParent ( parent ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; context . setBegDate ( begDate ) ; context . setEndDate ( endDate ) ; context . setDescription ( description ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "benefitType" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "parent" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy4 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy5 = new org . lnu . is . pagination . OrderBy ( "begdate" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy6 = new org . lnu . is . pagination . OrderBy ( "enddate" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy7 = new org . lnu . is . pagination . OrderBy ( "description" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 , orderBy4 , orderBy5 , orderBy6 , orderBy7 ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>Benefit<sp>e<sp>WHERE<sp>(<sp>e.benefitType<sp>=<sp>:benefitType<sp>AND<sp>e.parent<sp>=<sp>:parent<sp>AND<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>AND<sp>e.description<sp>LIKE<sp>CONCAT('%',:description,'%')<sp>AND<sp>e.begDate<sp><=<sp>:begDate<sp>AND<sp>e.endDate<sp>>=<sp>:endDate<sp>)<sp>ORDER<sp>BY<sp>e.benefitType<sp>ASC,<sp>e.parent<sp>DESC,<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC,<sp>e.begdate<sp>ASC,<sp>e.enddate<sp>DESC,<sp>e.description<sp>ASC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . benefit . Benefit > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
test5 ( ) { com . creactiviti . piper . core . MapObject mo = new com . creactiviti . piper . core . MapObject ( java . util . Collections . singletonMap ( "number" , "5" ) ) { } ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , mo . size ( ) )
findsSingleMatrixParameter ( ) { com . eviware . soapui . impl . rest . panels . request . ParameterFinder finder = new com . eviware . soapui . impl . rest . panels . request . ParameterFinder ( ";name=Johan?query1=value1" ) ; "<AssertPlaceHolder>" ; } findParameterAt ( int ) { int tokenIndex = getTokenIndexForChar ( ( dot == 0 ? 1 : dot ) ) ; if ( tokenIndex == ( - 1 ) ) { return "" ; } java . lang . String token = tokens . get ( tokenIndex ) ; if ( isSeparator ( token ) ) { return tokenIndex < ( ( tokens . size ( ) ) - 1 ) ? tokens . get ( ( tokenIndex + 1 ) ) : "" ; } else if ( token . equals ( "=" ) ) { return tokenIndex > 1 ? tokens . get ( ( tokenIndex - 1 ) ) : "" ; } if ( ( tokenIndex > 1 ) && ( tokens . get ( ( tokenIndex - 1 ) ) . equals ( "=" ) ) ) { return tokens . get ( ( tokenIndex - 2 ) ) ; } return token ; }
org . junit . Assert . assertThat ( finder . findParameterAt ( 2 ) , org . hamcrest . core . Is . is ( "name" ) )
testar8DigitosComOperadora ( ) { java . lang . String numero = "3288112233" ; java . lang . String numeroFormatado = br . com . any . utils . FormatadorUtils . formatarCelular ( numero ) ; java . lang . String esperado = "(32)<sp>8811-2233" ; "<AssertPlaceHolder>" ; } formatarCelular ( java . lang . String ) { java . lang . String telefoneFormatado = str ; if ( ( org . apache . commons . lang3 . StringUtils . isNotBlank ( str ) ) && ( ( str . length ( ) ) > 7 ) ) { telefoneFormatado = br . com . any . utils . FormatadorUtils . inserirHifen ( str ) ; telefoneFormatado = br . com . any . utils . FormatadorUtils . inserirParentesesOperadora ( telefoneFormatado ) ; } return telefoneFormatado ; }
org . junit . Assert . assertEquals ( esperado , numeroFormatado )
testMultipleSessionsOneTxRollbackSend1PCOptimization ( ) { javax . jms . XAConnection conn = null ; javax . jms . Connection conn2 = null ; try { conn = xacf . createXAConnection ( ) ; conn . start ( ) ; tm . begin ( ) ; javax . jms . XASession sess1 = conn . createXASession ( ) ; javax . transaction . xa . XAResource res1 = sess1 . getXAResource ( ) ; javax . jms . XASession sess2 = conn . createXASession ( ) ; javax . transaction . xa . XAResource res2 = sess2 . getXAResource ( ) ; javax . transaction . Transaction tx = tm . getTransaction ( ) ; tx . enlistResource ( res1 ) ; tx . enlistResource ( res2 ) ; javax . jms . MessageProducer prod1 = sess1 . createProducer ( queue1 ) ; javax . jms . MessageProducer prod2 = sess2 . createProducer ( queue1 ) ; prod1 . send ( sess1 . createTextMessage ( "echidna1" ) ) ; prod2 . send ( sess2 . createTextMessage ( "echidna2" ) ) ; tx . delistResource ( res1 , XAResource . TMSUCCESS ) ; tx . delistResource ( res2 , XAResource . TMSUCCESS ) ; tm . rollback ( ) ; conn2 = cf . createConnection ( ) ; javax . jms . Session sess = conn2 . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; javax . jms . MessageConsumer cons = sess . createConsumer ( queue1 ) ; conn2 . start ( ) ; javax . jms . TextMessage r1 = ( ( javax . jms . TextMessage ) ( cons . receive ( 100 ) ) ) ; "<AssertPlaceHolder>" ; } finally { if ( conn != null ) { conn . close ( ) ; } if ( conn2 != null ) { conn2 . close ( ) ; } } } receive ( long ) { session . lock ( ) ; try { if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "receive<sp>" + ( this ) ) + "<sp>timeout=" ) + timeout ) ) ; } checkState ( ) ; javax . jms . Message message = consumer . receive ( timeout ) ; if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "received<sp>" + ( this ) ) + "<sp>result=" ) + message ) ) ; } if ( message == null ) { return null ; } else { return wrapMessage ( message ) ; } } finally { session . unlock ( ) ; } }
org . junit . Assert . assertNull ( r1 )
testAddUnitTypeRepeatedMeasure ( ) { loadRequiredData ( ) ; org . libreplan . ws . unittypes . api . UnitTypeDTO m1 = new org . libreplan . ws . unittypes . api . UnitTypeDTO ( "CodeA" , "measure1" ) ; org . libreplan . ws . unittypes . api . UnitTypeDTO m2 = new org . libreplan . ws . unittypes . api . UnitTypeDTO ( "CodeB" , "measure1" ) ; org . libreplan . ws . unittypes . api . UnitTypeDTO m3 = new org . libreplan . ws . unittypes . api . UnitTypeDTO ( "measure1" ) ; java . util . List < org . libreplan . ws . unittypes . api . UnitTypeDTO > unitTypeDTOs = new java . util . ArrayList ( ) ; unitTypeDTOs . add ( m1 ) ; unitTypeDTOs . add ( m2 ) ; unitTypeDTOs . add ( m3 ) ; org . libreplan . ws . unittypes . api . UnitTypeListDTO unitTypeListDTO = createUnitTypeListDTO ( m1 , m2 ) ; java . util . List < org . libreplan . ws . common . api . InstanceConstraintViolationsDTO > instanceConstraintViolationsList = unitTypeService . addUnitTypes ( unitTypeListDTO ) . instanceConstraintViolationsList ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( "Task:<sp>" + ( getDuration ( ) ) ) + "<sp>(" ) + ( earliestStart ) ) + "," ) + ( earliestFinish ) ) + ")<sp>(" ) + ( latestStart ) ) + "," ) + ( latestFinish ) ) + ")" ; }
org . junit . Assert . assertTrue ( instanceConstraintViolationsList . toString ( ) , ( ( instanceConstraintViolationsList . size ( ) ) == 1 ) )
shouldNotMatchIfFieldAndCodeAreNonNullAndGivenErrorsDoesNotContainSpecificErrorCode ( ) { matcher = org . openmrs . test . matchers . HasFieldErrors . hasFieldErrors ( "uuid" , "error.null" ) ; item . rejectValue ( "uuid" , "duplicate.uuid" ) ; item . rejectValue ( "uuid" , "invalid.uuid" ) ; "<AssertPlaceHolder>" ; } matchesSafely ( org . springframework . validation . Errors ) { if ( ( field ) == null ) { return item . hasFieldErrors ( ) ; } else if ( ( code ) == null ) { return item . hasFieldErrors ( field ) ; } else { return item . getFieldErrors ( field ) . stream ( ) . map ( DefaultMessageSourceResolvable :: getCode ) . anyMatch ( code :: equals ) ; } }
org . junit . Assert . assertFalse ( matcher . matchesSafely ( item ) )
testUsingMethodReturn ( ) { java . lang . String name = gateway . putNewObject ( entryPoint . getNewExample ( ) ) ; java . util . List < java . lang . Object > args = new java . util . ArrayList < java . lang . Object > ( ) ; args . add ( new java . lang . String ( "c" ) ) ; py4j . ReturnObject obj2 = gateway . invoke ( "method4" , name , args ) ; args = new java . util . ArrayList < java . lang . Object > ( ) ; args . add ( gateway . getObject ( obj2 . getName ( ) ) ) ; py4j . ReturnObject obj3 = gateway . invoke ( "method5" , name , args ) ; "<AssertPlaceHolder>" ; } getPrimitiveObject ( ) { return primitiveObject ; }
org . junit . Assert . assertEquals ( 2 , obj3 . getPrimitiveObject ( ) )
testAbsoluteSimilarity ( ) { net . ricecode . similarity . SimilarityStrategy s = new net . ricecode . similarity . JaroStrategy ( ) ; java . lang . String first = "Mississippi" ; java . lang . String second = "Mississippi" ; double expected = 1.0 ; double delta = 0.0 ; double actual = s . score ( first , second ) ; "<AssertPlaceHolder>" ; } score ( java . lang . String , java . lang . String ) { java . lang . String shorter ; java . lang . String longer ; if ( ( first . length ( ) ) > ( second . length ( ) ) ) { longer = first . toLowerCase ( ) ; shorter = second . toLowerCase ( ) ; } else { longer = second . toLowerCase ( ) ; shorter = first . toLowerCase ( ) ; } int halflength = ( ( shorter . length ( ) ) / 2 ) + 1 ; java . lang . String m1 = getSetOfMatchingCharacterWithin ( shorter , longer , halflength ) ; java . lang . String m2 = getSetOfMatchingCharacterWithin ( longer , shorter , halflength ) ; if ( ( ( m1 . length ( ) ) == 0 ) || ( ( m2 . length ( ) ) == 0 ) ) return 0.0 ; if ( ( m1 . length ( ) ) != ( m2 . length ( ) ) ) return 0.0 ; int transpositions = transpositions ( m1 , m2 ) ; double dist = ( ( ( ( m1 . length ( ) ) / ( ( double ) ( shorter . length ( ) ) ) ) + ( ( m2 . length ( ) ) / ( ( double ) ( longer . length ( ) ) ) ) ) + ( ( ( m1 . length ( ) ) - transpositions ) / ( ( double ) ( m1 . length ( ) ) ) ) ) / 3.0 ; return dist ; }
org . junit . Assert . assertEquals ( expected , actual , delta )
testGetParamCount ( ) { final int result = compositeIndex . getParamCount ( ) ; "<AssertPlaceHolder>" ; } getParamCount ( ) { return 1 ; }
org . junit . Assert . assertEquals ( result , 2 )
test_number_of_blocks_after_unblock_unspecified_order ( ) { final java . util . List < net . ripe . db . whois . common . domain . BlockEvent > events = java . util . Arrays . asList ( net . ripe . db . whois . common . domain . BlockEventsTest . createBlockEvent ( 4 , BlockEvent . Type . UNBLOCK ) , net . ripe . db . whois . common . domain . BlockEventsTest . createBlockEvent ( 5 , BlockEvent . Type . BLOCK_TEMPORARY ) , net . ripe . db . whois . common . domain . BlockEventsTest . createBlockEvent ( 3 , BlockEvent . Type . BLOCK_TEMPORARY ) , net . ripe . db . whois . common . domain . BlockEventsTest . createBlockEvent ( 2 , BlockEvent . Type . BLOCK_TEMPORARY ) , net . ripe . db . whois . common . domain . BlockEventsTest . createBlockEvent ( 1 , BlockEvent . Type . BLOCK_TEMPORARY ) ) ; final net . ripe . db . whois . common . domain . BlockEvents blockEvents = new net . ripe . db . whois . common . domain . BlockEvents ( prefix , events ) ; "<AssertPlaceHolder>" ; } getTemporaryBlockCount ( ) { int numberOfBlocks = 0 ; for ( final net . ripe . db . whois . common . domain . BlockEvent blockEvent : blockEvents ) { switch ( blockEvent . getType ( ) ) { case BLOCK_TEMPORARY : numberOfBlocks ++ ; break ; case UNBLOCK : case BLOCK_PERMANENTLY : return numberOfBlocks ; default : throw new java . lang . IllegalStateException ( ( "Unexpected<sp>block<sp>event<sp>type:<sp>" + ( blockEvent . getType ( ) ) ) ) ; } } return numberOfBlocks ; }
org . junit . Assert . assertThat ( blockEvents . getTemporaryBlockCount ( ) , org . hamcrest . Matchers . is ( 1 ) )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . PortletPreferences > portletPreferenceses = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( portletPreferenceses . isEmpty ( ) )
testTypeWithNullValue ( ) { java . util . List < com . salesforce . dva . argus . entity . MetricSchemaRecord > records = new java . util . ArrayList ( ) ; records . add ( new com . salesforce . dva . argus . entity . MetricSchemaRecord ( null , "scope1" , "metric0" , "source" , "unittest" ) ) ; records . add ( new com . salesforce . dva . argus . entity . MetricSchemaRecord ( null , "scope1" , "metric1" , "source" , "unittest" ) ) ; records . add ( new com . salesforce . dva . argus . entity . MetricSchemaRecord ( null , "scope2" , "metric2" , "source" , "unittest" ) ) ; records . add ( new com . salesforce . dva . argus . entity . MetricSchemaRecord ( null , "scope2" , "metric3" , "source" , "unittest" ) ) ; records . add ( new com . salesforce . dva . argus . entity . MetricSchemaRecord ( null , "scope2" , "metric4" , "source" , "unittest" ) ) ; java . util . SortedSet < java . lang . String > ns = com . salesforce . dva . argus . service . schema . MetricSchemaRecordTokenizer . GetUniqueTokens ( records , SchemaService . RecordType . NAMESPACE , 0 ) ; "<AssertPlaceHolder>" ; } GetUniqueTokens ( java . util . List , com . salesforce . dva . argus . service . SchemaService . RecordType , int ) { java . util . SortedSet < java . lang . String > tokens = new java . util . TreeSet ( ) ; java . lang . String _delimiterRegex = "\\." ; java . util . List < java . lang . String > entries = com . salesforce . dva . argus . service . schema . MetricSchemaRecordTokenizer . _getValueForType ( records , type ) ; for ( java . lang . String entry : entries ) { if ( entry == null ) { continue ; } java . lang . String [ ] allTokens = entry . split ( _delimiterRegex ) ; if ( ( allTokens . length ) > indexLevel ) { tokens . add ( allTokens [ indexLevel ] ) ; } } return tokens ; }
org . junit . Assert . assertTrue ( ( ( ns . size ( ) ) == 0 ) )
testFormatDate ( ) { java . lang . String tpl = "${d?string('yyyy-MM-dd<sp>HH:mm:ss')}" ; java . util . Map < java . lang . String , java . lang . Object > args = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; args . put ( "d" , cn . bc . core . util . DateUtils . getDate ( "2012-01-01<sp>12:10:05" ) ) ; "<AssertPlaceHolder>" ; } format ( java . lang . String , java . util . Map ) { return cn . bc . core . util . FreeMarkerUtils . format ( tpl , ( ( java . lang . Object ) ( args ) ) ) ; }
org . junit . Assert . assertEquals ( "2012-01-01<sp>12:10:05" , cn . bc . core . util . FreeMarkerUtils . format ( tpl , args ) )
testFinalName ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "pom-with-finalname" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion ( reactorProjects , "pom-with-finalname" ) ; builder . setGenerateReleasePoms ( true ) ; phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; "<AssertPlaceHolder>" ; } comparePomFiles ( java . util . List ) { return comparePomFiles ( reactorProjects , true ) ; }
org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) )
testSerialization ( ) { org . jfree . chart . renderer . xy . YIntervalRenderer r1 = new org . jfree . chart . renderer . xy . YIntervalRenderer ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( r1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . renderer . xy . YIntervalRenderer r2 = ( ( org . jfree . chart . renderer . xy . YIntervalRenderer ) ( 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 ( r1 , r2 )
parseServerIndexByStringComposition ( ) { final int namespaceIndex = 1 ; final int intValue = 0 ; final org . opcfoundation . ua . builtintypes . UnsignedInteger serverIndex = org . opcfoundation . ua . builtintypes . UnsignedInteger . valueOf ( 1 ) ; org . opcfoundation . ua . builtintypes . ExpandedNodeId serverNsIndex = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( serverIndex , namespaceIndex , intValue ) ; java . lang . String stringComposition = ( ( ( ( ( "svr=" + serverIndex ) + ";" ) + "ns=" ) + namespaceIndex ) + ";i=" ) + intValue ; org . opcfoundation . ua . builtintypes . ExpandedNodeId parsedComposition = org . opcfoundation . ua . builtintypes . ExpandedNodeId . parseExpandedNodeId ( stringComposition ) ; "<AssertPlaceHolder>" ; } parseExpandedNodeId ( java . lang . String ) { java . lang . String [ ] parts = s . split ( ";" ) ; org . opcfoundation . ua . builtintypes . ExpandedNodeId . assertExpandedNodeIdParts ( s , parts , 1 ) ; int svrIndex = 0 ; int nsIndex = 0 ; org . opcfoundation . ua . builtintypes . NodeId nodeIdValue = org . opcfoundation . ua . builtintypes . NodeId . parseNodeId ( parts [ ( ( parts . length ) - 1 ) ] ) ; org . opcfoundation . ua . builtintypes . ExpandedNodeId returnable = null ; for ( int i = 0 ; i < ( ( parts . length ) - 1 ) ; i ++ ) { java . lang . String [ ] subParts = parts [ i ] . split ( "=" ) ; org . opcfoundation . ua . builtintypes . ExpandedNodeId . assertExpandedNodeIdParts ( s , subParts , 2 ) ; if ( subParts [ 0 ] . equalsIgnoreCase ( "svr" ) ) svrIndex = java . lang . Integer . parseInt ( subParts [ 1 ] ) ; else if ( subParts [ 0 ] . equalsIgnoreCase ( "ns" ) ) { nsIndex = java . lang . Integer . parseInt ( subParts [ 1 ] ) ; returnable = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( org . opcfoundation . ua . builtintypes . UnsignedInteger . valueOf ( svrIndex ) , nsIndex , nodeIdValue . getValue ( ) ) ; } else if ( subParts [ 0 ] . equalsIgnoreCase ( "nsu" ) ) { java . lang . String ns = subParts [ 1 ] ; returnable = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( org . opcfoundation . ua . builtintypes . UnsignedInteger . valueOf ( svrIndex ) , ns , nodeIdValue . getValue ( ) ) ; } else org . opcfoundation . ua . builtintypes . ExpandedNodeId . throwExpandedNodeIdCastException ( s ) ; } if ( returnable == null ) { returnable = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( org . opcfoundation . ua . builtintypes . UnsignedInteger . valueOf ( svrIndex ) , nsIndex , nodeIdValue . getValue ( ) ) ; } return returnable ; }
org . junit . Assert . assertEquals ( serverNsIndex , parsedComposition )
testConfigureStaticNatRulesOnLogicalRouterRollback ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; final com . cloud . legacymodel . communication . command . ConfigureStaticNatRulesOnLogicalRouterCommand cmd = mock ( com . cloud . legacymodel . communication . command . ConfigureStaticNatRulesOnLogicalRouterCommand . class ) ; final com . cloud . legacymodel . to . StaticNatRuleTO rule = new com . cloud . legacymodel . to . StaticNatRuleTO ( 1 , "11.11.11.11" , null , null , "10.10.10.10" , null , null , null , false , false ) ; final java . util . List < com . cloud . legacymodel . to . StaticNatRuleTO > rules = new java . util . ArrayList ( ) ; rules . add ( rule ) ; when ( cmd . getRules ( ) ) . thenReturn ( rules ) ; when ( cmd . getLogicalRouterUuid ( ) ) . thenReturn ( "aaaaa" ) ; final com . cloud . network . nicira . NatRule [ ] rulepair = resource . generateStaticNatRulePair ( "10.10.10.10" , "11.11.11.11" ) ; rulepair [ 0 ] . setUuid ( java . util . UUID . randomUUID ( ) ) ; rulepair [ 1 ] . setUuid ( java . util . UUID . randomUUID ( ) ) ; when ( nvpApi . createLogicalRouterNatRule ( eq ( "aaaaa" ) , ( ( com . cloud . network . nicira . NatRule ) ( any ( ) ) ) ) ) . thenReturn ( rulepair [ 0 ] ) . thenThrow ( new com . cloud . network . nicira . NiciraNvpApiException ( ) ) ; final java . util . List < com . cloud . network . nicira . NatRule > storedRules = java . util . Collections . EMPTY_LIST ; when ( nvpApi . findNatRulesByLogicalRouterUuid ( "aaaaa" ) ) . thenReturn ( storedRules ) ; final com . cloud . legacymodel . communication . answer . ConfigureStaticNatRulesOnLogicalRouterAnswer a = ( ( com . cloud . legacymodel . communication . answer . ConfigureStaticNatRulesOnLogicalRouterAnswer ) ( resource . executeRequest ( cmd ) ) ) ; "<AssertPlaceHolder>" ; verify ( nvpApi , atLeastOnce ( ) ) . deleteLogicalRouterNatRule ( eq ( "aaaaa" ) , eq ( rulepair [ 0 ] . getUuid ( ) ) ) ; } getResult ( ) { return result ; }
org . junit . Assert . assertFalse ( a . getResult ( ) )
testName ( ) { org . apache . cayenne . map . DbKeyGenerator generator = new org . apache . cayenne . map . DbKeyGenerator ( ) ; generator . setGeneratorName ( "abc" ) ; "<AssertPlaceHolder>" ; } getGeneratorName ( ) { return generatorName ; }
org . junit . Assert . assertEquals ( "abc" , generator . getGeneratorName ( ) )
testEmptyBindingSet ( ) { tqr1 . append ( org . eclipse . rdf4j . query . impl . EmptyBindingSet . getInstance ( ) ) ; tqr2 . append ( org . eclipse . rdf4j . query . impl . EmptyBindingSet . getInstance ( ) ) ; "<AssertPlaceHolder>" ; } equals ( org . eclipse . rdf4j . query . TupleQueryResult , org . eclipse . rdf4j . query . TupleQueryResult ) { java . util . List < org . eclipse . rdf4j . query . BindingSet > list1 = org . eclipse . rdf4j . common . iteration . Iterations . asList ( tqr1 ) ; java . util . List < org . eclipse . rdf4j . query . BindingSet > list2 = org . eclipse . rdf4j . common . iteration . Iterations . asList ( tqr2 ) ; if ( ( list1 . size ( ) ) != ( list2 . size ( ) ) ) { return false ; } return org . eclipse . rdf4j . query . QueryResults . matchBindingSets ( list1 , list2 ) ; }
org . junit . Assert . assertTrue ( org . eclipse . rdf4j . query . QueryResults . equals ( tqr1 , tqr2 ) )
testRetrieveCustomers ( ) { data = manager . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { if ( ( ds ) == null ) throw new java . sql . SQLException ( "Can't<sp>get<sp>data<sp>source" ) ; java . util . ArrayList < g7w14 . data . ReviewBean > rows = new java . util . ArrayList < g7w14 . data . ReviewBean > ( ) ; try ( java . sql . Connection conn = ds . getConnection ( ) ; java . sql . Statement stmt = conn . createStatement ( ) ; java . sql . ResultSet resultSet = stmt . executeQuery ( "Select<sp>*<sp>From<sp>Customer_Review<sp>order<sp>by<sp>review_date" ) ) { while ( resultSet . next ( ) ) { g7w14 . data . ReviewBean rb = new g7w14 . data . ReviewBean ( ) ; rb . setBookId ( resultSet . getInt ( "BookId" ) ) ; rb . setCustomerId ( resultSet . getInt ( "CustomerId" ) ) ; rb . setRating ( resultSet . getInt ( "Rating" ) ) ; rb . setReview_Date ( resultSet . getTimestamp ( "Review_Date" ) ) ; rb . setReviewText ( resultSet . getString ( "Review_Text" ) ) ; rb . setReviewId ( resultSet . getInt ( "ReviewId" ) ) ; rb . setApproved ( resultSet . getBoolean ( "Approved" ) ) ; rows . add ( rb ) ; } } return rows ; }
org . junit . Assert . assertTrue ( ( ( data . size ( ) ) > 0 ) )
testGeenVerstrekkingsbeperkingen ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > meldingen ; meldingen = bedrijfsregel . voerRegelUit ( null , new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
connectionProviderInConfigWithValidConnection ( ) { org . mule . runtime . api . connection . ConnectionValidationResult connectionResult = testConnectivityWithConnectionProvider ( true ) ; "<AssertPlaceHolder>" ; } isValid ( ) { java . lang . String expression = "2*2" ; org . junit . Assert . assertThat ( expressionManager . isValid ( expression ) , org . hamcrest . Matchers . is ( true ) ) ; }
org . junit . Assert . assertThat ( connectionResult . isValid ( ) , org . hamcrest . core . Is . is ( true ) )
shouldRecursivelyWalkOverFilesAndFolders ( ) { _folder . newFile ( "a.txt" ) ; new java . io . File ( _folder . newFolder ( "b" ) , "b.txt" ) . createNewFile ( ) ; class CountingVisitor implements com . threerings . getdown . util . FileUtil . Visitor { int fileCount = 0 ; @ com . threerings . getdown . util . Override public void visit ( java . io . File file ) { ( fileCount ) ++ ; } } CountingVisitor visitor = new CountingVisitor ( ) ; com . threerings . getdown . util . FileUtil . walkTree ( _folder . getRoot ( ) , visitor ) ; "<AssertPlaceHolder>" ; } visit ( java . io . File ) { ( fileCount ) ++ ; }
org . junit . Assert . assertEquals ( 3 , visitor . fileCount )
validationOfUnknownPropertyDefaultNamespaceSuccess ( ) { java . lang . String roomWithValidNamespaces = "<?xml<sp>version='1.0'<sp>encoding='UTF-8'?>" + ( ( ( ( ( ( ( ( ( ( ( ( "Rooms" 0 http : org . apache . olingo . odata2 . api . edm . EdmEntitySet entitySet = org . apache . olingo . odata2 . testutil . mock . MockFacade . getMockEdm ( ) . getDefaultEntityContainer ( ) . getEntitySet ( "Rooms" ) ; java . io . InputStream reqContent = createContentAsStream ( roomWithValidNamespaces ) ; org . apache . olingo . odata2 . core . ep . consumer . XmlEntityConsumer xec = new org . apache . olingo . odata2 . core . ep . consumer . XmlEntityConsumer ( ) ; org . apache . olingo . odata2 . api . ep . entry . ODataEntry result = xec . readEntry ( entitySet , reqContent , org . apache . olingo . odata2 . api . ep . EntityProviderReadProperties . init ( ) . mergeSemantic ( true ) . build ( ) ) ; "<AssertPlaceHolder>" ; } build ( ) { org . apache . olingo . odata2 . jpa . processor . core . access . data . JPAFunctionContext functionContext = null ; try { if ( ( VARIANT ) == 0 ) { functionContext = ( ( org . apache . olingo . odata2 . jpa . processor . core . access . data . JPAFunctionContext ) ( org . apache . olingo . odata2 . jpa . processor . api . access . JPAMethodContext . createBuilder ( JPQLContextType . FUNCTION , getView ( ) ) . build ( ) ) ) ; } } catch ( org . apache . olingo . odata2 . jpa . processor . api . exception . ODataJPAModelException e ) { org . junit . Assert . fail ( ( ( ( org . apache . olingo . odata2 . jpa . processor . core . common . ODataJPATestConstants . EXCEPTION_MSG_PART_1 ) + ( e . getMessage ( ) ) ) + ( org . apache . olingo . odata2 . jpa . processor . core . common . ODataJPATestConstants . EXCEPTION_MSG_PART_2 ) ) ) ; } catch ( org . apache . olingo . odata2 . jpa . processor . api . exception . ODataJPARuntimeException e ) { org . junit . Assert . fail ( ( ( ( org . apache . olingo . odata2 . jpa . processor . core . common . ODataJPATestConstants . EXCEPTION_MSG_PART_1 ) + ( e . getMessage ( ) ) ) + ( org . apache . olingo . odata2 . jpa . processor . core . common . ODataJPATestConstants . EXCEPTION_MSG_PART_2 ) ) ) ; } return functionContext ; }
org . junit . Assert . assertNotNull ( result )
emotySuffix ( ) { javax . servlet . ServletContext servletContext = createMock ( javax . servlet . ServletContext . class ) ; expectGetResource ( servletContext , "src/test/resources/" ) ; replay ( servletContext ) ; com . github . jknack . handlebars . io . TemplateSource source = new com . github . jknack . handlebars . io . ServletContextTemplateLoader ( servletContext , "/" , "" ) . sourceAt ( "noextension" ) ; "<AssertPlaceHolder>" ; verify ( servletContext ) ; } sourceAt ( java . lang . String ) { try { return cache . get ( location , ( ) -> delegate . sourceAt ( location ) ) ; } catch ( java . util . concurrent . ExecutionException e ) { com . google . common . base . Throwables . propagateIfPossible ( e . getCause ( ) , java . io . IOException . class ) ; throw com . google . common . base . Throwables . propagate ( e . getCause ( ) ) ; } }
org . junit . Assert . assertNotNull ( source )
comperTwoDifferentlyOrderedConfigsThatHaveSameHashes ( ) { com . facebook . buck . util . config . RawConfig . Builder rawConfig1 = new com . facebook . buck . util . config . RawConfig . Builder ( ) ; rawConfig1 . putAll ( com . google . common . collect . ImmutableMap . of ( "Z" , com . google . common . collect . ImmutableMap . of ( "9" , "9" , "8" , "8" , "7" , "7" ) , "X" , com . google . common . collect . ImmutableMap . of ( "9" , "9" , "8" , "8" , "7" , "7" ) , "Y" , com . google . common . collect . ImmutableMap . of ( "9" , "9" , "8" , "8" , "7" , "7" ) ) ) ; com . facebook . buck . util . config . RawConfig . Builder rawConfig2 = new com . facebook . buck . util . config . RawConfig . Builder ( ) ; rawConfig2 . putAll ( com . google . common . collect . ImmutableMap . of ( "Z" , com . google . common . collect . ImmutableMap . of ( "9" , "9" , "7" , "7" , "8" , "8" ) , "X" , com . google . common . collect . ImmutableMap . of ( "9" , "9" , "7" , "7" , "8" , "8" ) , "Y" , com . google . common . collect . ImmutableMap . of ( "9" , "9" , "7" , "7" , "8" , "8" ) ) ) ; com . facebook . buck . util . config . Config config1 = new com . facebook . buck . util . config . Config ( rawConfig1 . build ( ) ) ; com . facebook . buck . util . config . Config config2 = new com . facebook . buck . util . config . Config ( rawConfig2 . build ( ) ) ; "<AssertPlaceHolder>" ; } getOrderIndependentHashCode ( ) { return orderIndependentHashCode . get ( ) ; }
org . junit . Assert . assertEquals ( config1 . getOrderIndependentHashCode ( ) , config2 . getOrderIndependentHashCode ( ) )
projectContributorCanBuildProjectTest ( ) { final org . guvnor . common . services . project . model . WorkspaceProject project = getProject ( ) ; final java . util . Collection < org . guvnor . structure . contributors . Contributor > projectContributors = project . getRepository ( ) . getContributors ( ) ; doReturn ( true ) . when ( libraryPermissions ) . userIsAtLeast ( eq ( ContributorType . ADMIN ) , same ( projectContributors ) ) ; "<AssertPlaceHolder>" ; } userCanBuildProject ( org . guvnor . common . services . project . model . WorkspaceProject ) { return ( ( ( userIsAtLeast ( ContributorType . ADMIN , project . getRepository ( ) . getContributors ( ) ) ) || ( userIsAtLeast ( ContributorType . CONTRIBUTOR , project . getOrganizationalUnit ( ) . getContributors ( ) ) ) ) || ( projectController . canBuildProject ( project ) ) ) && ( ( project . getMainModule ( ) ) != null ) ; }
org . junit . Assert . assertTrue ( libraryPermissions . userCanBuildProject ( project ) )
testReduce3_Small_1 ( ) { lombok . val arrayA = org . nd4j . linalg . factory . Nd4j . create ( DataType . SHORT , 100 , 100 ) . assign ( 1 ) ; lombok . val arrayB = org . nd4j . linalg . factory . Nd4j . create ( DataType . SHORT , 100 , 100 ) . assign ( 1 ) ; "<AssertPlaceHolder>" ; } assign ( org . nd4j . linalg . api . buffer . DataBuffer ) { org . nd4j . linalg . jcublas . buffer . BaseCudaDataBuffer . allocator . memcpy ( this , data ) ; }
org . junit . Assert . assertEquals ( arrayA , arrayB )
testHashcodeIsStableWithContentChanges ( ) { com . itextpdf . styledxmlparser . jsoup . nodes . Element root = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "root" ) , "" ) ; java . util . HashSet < com . itextpdf . styledxmlparser . jsoup . nodes . Element > set = new java . util . HashSet < com . itextpdf . styledxmlparser . jsoup . nodes . Element > ( ) ; set . add ( root ) ; root . appendChild ( new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "a" ) , "" ) ) ; "<AssertPlaceHolder>" ; } contains ( com . itextpdf . kernel . geom . Rectangle ) { float llx = this . getX ( ) ; float lly = this . getY ( ) ; float urx = llx + ( this . getWidth ( ) ) ; float ury = lly + ( this . getHeight ( ) ) ; float rllx = rect . getX ( ) ; float rlly = rect . getY ( ) ; float rurx = rllx + ( rect . getWidth ( ) ) ; float rury = rlly + ( rect . getHeight ( ) ) ; return ( ( ( ( llx - ( com . itextpdf . kernel . geom . Rectangle . EPS ) ) <= rllx ) && ( ( lly - ( com . itextpdf . kernel . geom . Rectangle . EPS ) ) <= rlly ) ) && ( rurx <= ( urx + ( com . itextpdf . kernel . geom . Rectangle . EPS ) ) ) ) && ( rury <= ( ury + ( com . itextpdf . kernel . geom . Rectangle . EPS ) ) ) ; }
org . junit . Assert . assertTrue ( set . contains ( root ) )
testMatchConditionAllDimensions3 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 1 , 2 , 3 , Double . NEGATIVE_INFINITY , 5 , 6 , 7 , 8 , 9 } ) ; int val = ( ( int ) ( org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . accum . MatchCondition ( array , org . nd4j . linalg . indexing . conditions . Conditions . isInfinite ( ) ) , Integer . MAX_VALUE ) . getDouble ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } getDouble ( long ) { org . nd4j . linalg . jcublas . buffer . BaseCudaDataBuffer . allocator . synchronizeHostData ( this ) ; return super . getDouble ( i ) ; }
org . junit . Assert . assertEquals ( 1 , val )
testFetchByPrimaryKeyExisting ( ) { com . liferay . mobile . device . rules . model . MDRAction newMDRAction = addMDRAction ( ) ; com . liferay . mobile . device . rules . model . MDRAction existingMDRAction = _persistence . fetchByPrimaryKey ( newMDRAction . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingMDRAction , newMDRAction )
getExpectedExceptionNotThrownMessage_A$ ( ) { org . junithelper . core . config . MessageValue target = new org . junithelper . core . config . MessageValue ( ) ; target . initialize ( null ) ; java . lang . String actual = target . getExpectedExceptionNotThrownMessage ( ) ; java . lang . String expected = "Expected<sp>exception<sp>was<sp>not<sp>thrown!" ; "<AssertPlaceHolder>" ; } getExpectedExceptionNotThrownMessage ( ) { return get ( MessageKey . ExpectedExceptionNotThrownMessage ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testFetchByPrimaryKeyExisting ( ) { com . liferay . mobile . device . rules . model . MDRRule newMDRRule = addMDRRule ( ) ; com . liferay . mobile . device . rules . model . MDRRule existingMDRRule = _persistence . fetchByPrimaryKey ( newMDRRule . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingMDRRule , newMDRRule )
testGraphQueryVertexHasWithSecurityComplexFormula ( ) { graph . prepareVertex ( "v1" , org . securegraph . test . GraphTestBase . VISIBILITY_MIXED_CASE_a ) . setProperty ( "age" , 25 , org . securegraph . test . GraphTestBase . VISIBILITY_MIXED_CASE_a ) . save ( AUTHORIZATIONS_A_AND_B ) ; graph . prepareVertex ( "v2" , org . securegraph . test . GraphTestBase . VISIBILITY_A ) . setProperty ( "age" , 25 , org . securegraph . test . GraphTestBase . VISIBILITY_B ) . save ( AUTHORIZATIONS_A_AND_B ) ; java . lang . Iterable < org . securegraph . test . Vertex > vertices = graph . query ( AUTHORIZATIONS_MIXED_CASE_a_AND_B ) . has ( "age" , Compare . EQUAL , 25 ) . vertices ( ) ; "<AssertPlaceHolder>" ; } count ( java . lang . Iterable ) { int count = 0 ; for ( T ignore : iterable ) { count ++ ; } org . securegraph . util . IterableUtils . close ( iterable ) ; return count ; }
org . junit . Assert . assertEquals ( 1 , count ( vertices ) )
textTrimTest ( ) { java . lang . String query = "<sp>test<sp>message<sp>in:#dev<sp>" ; java . lang . String retQuery = allbegray . slack . SlackSearchQueryBuilder . create ( ) . text ( query ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return ( buffer . length ( ) ) > 0 ? buffer . toString ( ) : null ; }
org . junit . Assert . assertTrue ( query . trim ( ) . equals ( retQuery ) )
testHappyflow ( ) { java . lang . String bsn = "111222333" ; java . lang . String zendendePartijCode = "000123" ; final nl . bzk . brp . service . synchronisatie . SynchronisatieVerzoek verzoek = new nl . bzk . brp . service . synchronisatie . SynchronisatieVerzoek ( ) ; verzoek . setSoortDienst ( SoortDienst . SYNCHRONISATIE_PERSOON ) ; verzoek . getZoekCriteriaPersoon ( ) . setBsn ( java . lang . String . valueOf ( bsn ) ) ; verzoek . getStuurgegevens ( ) . setZendendePartijCode ( java . lang . String . valueOf ( zendendePartijCode ) ) ; verzoek . getParameters ( ) . setLeveringsAutorisatieId ( "1" ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Partij partij = nl . bzk . brp . domain . algemeen . TestPartijBuilder . maakBuilder ( ) . metCode ( zendendePartijCode ) . build ( ) ; when ( partijService . vindPartijOpCode ( zendendePartijCode ) ) . thenReturn ( partij ) ; final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst t = nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . PERSOON_MET_HANDELINGEN ; when ( selecteerPersoonService . selecteerPersoonMetBsn ( anyString ( ) , any ( ) ) ) . thenReturn ( t ) ; final nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht persoonBericht = new nl . bzk . brp . domain . berichtmodel . VerwerkPersoonBericht ( null , null , java . util . Collections . singletonList ( new nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon . Builder ( null , null ) . build ( ) ) ) ; when ( synchronisatieBerichtFactory . apply ( any ( ) , any ( ) ) ) . thenReturn ( persoonBericht ) ; final nl . bzk . brp . service . synchronisatie . persoon . MaakSynchronisatieBerichtResultaat resultaat = service . verwerkVerzoek ( verzoek ) ; "<AssertPlaceHolder>" ; verify ( partijService ) . vindPartijOpCode ( zendendePartijCode ) ; verify ( synchroniseerPersoonAutorisatieService ) . controleerAutorisatie ( org . mockito . Mockito . any ( ) ) ; verify ( selecteerPersoonService ) . selecteerPersoonMetBsn ( anyString ( ) , any ( ) ) ; verify ( synchronisatieBerichtFactory ) . apply ( any ( ) , any ( ) ) ; verify ( zetPersoonberichtOpQueue ) . plaatsQueueberichtVoorVerzoek ( any ( ) , any ( ) , eq ( null ) ) ; } verwerkVerzoek ( nl . bzk . brp . service . synchronisatie . SynchronisatieVerzoek ) { final nl . bzk . brp . service . synchronisatie . persoon . MaakSynchronisatieBerichtResultaat resultaat = new nl . bzk . brp . service . synchronisatie . persoon . MaakSynchronisatieBerichtResultaat ( verzoek ) ; try { getMaakSynchronisatieBerichtServiceResultaat ( resultaat ) ; } catch ( final nl . bzk . brp . service . algemeen . StapMeldingException e ) { nl . bzk . brp . service . synchronisatie . persoon . MaakSynchronisatieBerichtServiceImpl . LOGGER . warn ( ( "Functionele<sp>fout<sp>bij<sp>synchroniseren<sp>persoon:<sp>" + e ) ) ; resultaat . getMeldingList ( ) . addAll ( e . getMeldingen ( ) ) ; } catch ( final nl . bzk . brp . service . algemeen . StapException e ) { nl . bzk . brp . service . synchronisatie . persoon . MaakSynchronisatieBerichtServiceImpl . LOGGER . error ( "Algemene<sp>fout<sp>bij<sp>synchroniseren<sp>persoon:<sp>" , e ) ; resultaat . getMeldingList ( ) . add ( e . maakFoutMelding ( ) ) ; } catch ( nl . bzk . brp . service . algemeen . autorisatie . AutorisatieException e ) { nl . bzk . brp . service . synchronisatie . persoon . MaakSynchronisatieBerichtServiceImpl . LOGGER . info ( ( "Autorisatiefout<sp>bij<sp>synchroniseren<sp>persoon:<sp>" + e ) ) ; resultaat . getMeldingList ( ) . add ( new nl . bzk . brp . domain . algemeen . Melding ( nl . bzk . algemeenbrp . dal . domein . brp . enums . Regel . R2343 ) ) ; } return resultaat ; }
org . junit . Assert . assertNotNull ( resultaat )
storeTo ( ) { java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( ( ( ProcessProfile . KEY_PREFIX ) + "testing" ) , com . asakusafw . windgate . core . process . BasicProcessProvider . class . getName ( ) ) ; java . util . Collection < ? extends com . asakusafw . windgate . core . process . ProcessProfile > profiles = com . asakusafw . windgate . core . process . ProcessProfile . loadFrom ( p , com . asakusafw . windgate . core . ProfileContext . system ( getClass ( ) . getClassLoader ( ) ) ) ; java . util . Properties restored = new java . util . Properties ( ) ; for ( com . asakusafw . windgate . core . process . ProcessProfile profile : profiles ) { profile . storeTo ( restored ) ; } "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
org . junit . Assert . assertThat ( restored , is ( p ) )
hashCodeReturnsHashCodeOfStringRepresentation ( ) { com . rackspacecloud . blueflood . types . Locator locator = com . rackspacecloud . blueflood . types . Locator . createLocatorFromDbKey ( fullyQualifiedName ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( ( timestamp ) + ( state . code ) ) . hashCode ( ) ; }
org . junit . Assert . assertEquals ( fullyQualifiedName . hashCode ( ) , locator . hashCode ( ) )
testBucketInfoVersionAndType ( ) { org . apache . hadoop . ozone . web . response . BucketInfo bucketInfo = new org . apache . hadoop . ozone . web . response . BucketInfo ( "volumeName" , "bucketName" ) ; bucketInfo . setVersioning ( OzoneConsts . Versioning . ENABLED ) ; bucketInfo . setStorageType ( StorageType . DISK ) ; java . lang . String bucketInfoString = bucketInfo . toDBString ( ) ; org . apache . hadoop . ozone . web . response . BucketInfo newBucketInfo = org . apache . hadoop . ozone . web . response . BucketInfo . parse ( bucketInfoString ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return org . apache . hadoop . ozone . web . response . BucketInfo . READER . readValue ( jsonString ) ; }
org . junit . Assert . assertEquals ( bucketInfo , newBucketInfo )
testGetSearchFieldOperators ( ) { org . talend . components . netsuite . NetSuiteDatasetRuntime dataSetRuntime = new org . talend . components . netsuite . NetSuiteDatasetRuntimeImpl ( clientService . getMetaDataSource ( ) ) ; java . util . List < java . lang . String > operators = dataSetRuntime . getSearchFieldOperators ( ) ; for ( java . lang . String operator : operators ) { "<AssertPlaceHolder>" ; } } getSearchFieldOperators ( ) { return org . talend . components . netsuite . NetSuiteComponentDefinition . withDatasetRuntime ( this , new org . talend . daikon . java8 . Function < org . talend . components . netsuite . NetSuiteDatasetRuntime , java . util . List < java . lang . String > > ( ) { @ org . talend . components . netsuite . Override public java . util . List < java . lang . String > apply ( org . talend . components . netsuite . NetSuiteDatasetRuntime dataSetRuntime ) { return dataSetRuntime . getSearchFieldOperators ( ) ; } } ) ; }
org . junit . Assert . assertNotNull ( operator )
testGetMessageListener ( ) { org . apache . qpid . jms . JmsSession session = org . mockito . Mockito . mock ( org . apache . qpid . jms . JmsSession . class ) ; org . apache . qpid . jms . JmsMessageConsumer messageConsumer = org . mockito . Mockito . mock ( org . apache . qpid . jms . JmsMessageConsumer . class ) ; org . apache . qpid . jms . JmsConsumer consumer = new org . apache . qpid . jms . JmsConsumer ( session , messageConsumer ) ; try { "<AssertPlaceHolder>" ; } finally { consumer . close ( ) ; } org . mockito . Mockito . verify ( messageConsumer , org . mockito . Mockito . times ( 1 ) ) . getMessageListener ( ) ; } getMessageListener ( ) { try { return consumer . getMessageListener ( ) ; } catch ( javax . jms . JMSException e ) { throw org . apache . qpid . jms . exceptions . JmsExceptionSupport . createRuntimeException ( e ) ; } }
org . junit . Assert . assertNull ( consumer . getMessageListener ( ) )
testGetConnectionWhenNoStrategy ( ) { this . flexyPoolDataSource = new com . vladmihalcea . flexypool . FlexyPoolDataSource < javax . sql . DataSource > ( configuration ) ; org . mockito . ArgumentCaptor < com . vladmihalcea . flexypool . connection . ConnectionRequestContext > connectionRequestContextArgumentCaptor = org . mockito . ArgumentCaptor . forClass ( com . vladmihalcea . flexypool . connection . ConnectionRequestContext . class ) ; when ( poolAdapter . getConnection ( connectionRequestContextArgumentCaptor . capture ( ) ) ) . thenReturn ( connection ) ; verify ( connection , never ( ) ) . getMetaData ( ) ; flexyPoolDataSource . getConnection ( ) . getMetaData ( ) ; verify ( connection , times ( 1 ) ) . getMetaData ( ) ; "<AssertPlaceHolder>" ; verify ( overallConnectionAcquireTimer , times ( 1 ) ) . update ( anyLong ( ) , eq ( TimeUnit . MILLISECONDS ) ) ; verify ( concurrentConnectionRequestCountHistogram , times ( 1 ) ) . update ( 1 ) ; verify ( concurrentConnectionRequestCountHistogram , times ( 1 ) ) . update ( 0 ) ; } getCredentials ( ) { return credentials ; }
org . junit . Assert . assertNull ( connectionRequestContextArgumentCaptor . getValue ( ) . getCredentials ( ) )
testSuccessfulCoreModelSimpleTypeMinMax ( ) { org . jboss . dmr . ModelNode description = createSubsystemSkeleton ( ModelType . INT , ( ( org . jboss . dmr . ModelNode ) ( null ) ) ) ; description . get ( org . jboss . as . subsystem . test . validation . ATTRIBUTES , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . ROOT_ATTR , org . jboss . as . subsystem . test . validation . MIN ) . set ( 5 ) ; description . get ( org . jboss . as . subsystem . test . validation . ATTRIBUTES , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . ROOT_ATTR , org . jboss . as . subsystem . test . validation . MAX ) . set ( 5 ) ; description . get ( org . jboss . as . subsystem . test . validation . OPERATIONS , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . ROOT_OP , org . jboss . as . subsystem . test . validation . REQUEST_PROPERTIES , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . PARAM , org . jboss . as . subsystem . test . validation . MIN ) . set ( 5 ) ; description . get ( org . jboss . as . subsystem . test . validation . OPERATIONS , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . ROOT_OP , org . jboss . as . subsystem . test . validation . REQUEST_PROPERTIES , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . PARAM , org . jboss . as . subsystem . test . validation . MAX ) . set ( 5 ) ; description . get ( org . jboss . as . subsystem . test . validation . OPERATIONS , org . jboss . as . subsystem . test . validation . ValidateDescriptionProvidersTestCase . ROOT_OP , org . jboss . as . subsystem . test . validation . REPLY_PROPERTIES , org . jboss . as . subsystem . test . validation . MAX ) . set ( 5 ) ; java . util . List < org . jboss . as . subsystem . test . ModelDescriptionValidator . ValidationFailure > errors = validate ( description , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { return xmlFile . getAbsolutePath ( ) ; }
org . junit . Assert . assertEquals ( errors . toString ( ) , 0 , errors . size ( ) )
testTagMustMatchWholeWord ( ) { html = "<<sp>notatd<sp>>cell<sp>content</<sp>notatd<sp>>" ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return new info . novatec . testit . livingdoc . samples . application . calculator . ExpectedElementInList ( val ) ; }
org . junit . Assert . assertNull ( parse ( html ) )
testCacheWorks ( ) { com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . Authenticator unit = new com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . Authenticator ( 5000 , 20 ) ; unit . authenticate ( com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . aCredentials ) ; unit . authenticate ( com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . aCredentials ) ; unit . authenticate ( com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . bCredentials ) ; unit . authenticate ( com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . bCredentials ) ; unit . authenticate ( com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . bCredentials ) ; unit . authenticate ( com . bazaarvoice . auth . hmac . server . AbstractCachingAuthenticatorTest . cCredentials ) ; "<AssertPlaceHolder>" ; } getNumLoads ( ) { return numLoads . get ( ) ; }
org . junit . Assert . assertEquals ( 3 , unit . getNumLoads ( ) )
testCreateTestElement ( ) { System . out . println ( "createTestElement" ) ; org . jmeterplugins . protocol . http . control . gui . HttpSimpleTableControlGui instance = new org . jmeterplugins . protocol . http . control . gui . HttpSimpleTableControlGui ( ) ; org . apache . jmeter . testelement . TestElement result = instance . createTestElement ( ) ; "<AssertPlaceHolder>" ; } createTestElement ( ) { org . apache . jmeter . reporters . ResultCollector modelNew = getModel ( ) ; if ( modelNew == null ) { modelNew = new kg . apc . jmeter . vizualizers . CompositeResultCollector ( ) ; ( ( kg . apc . jmeter . vizualizers . CompositeResultCollector ) ( modelNew ) ) . setCompositeModel ( compositeModel ) ; setModel ( modelNew ) ; } modifyTestElement ( modelNew ) ; modelNew . setComment ( kg . apc . jmeter . JMeterPluginsUtils . getWikiLinkText ( "CompositeGraph" ) ) ; return modelNew ; }
org . junit . Assert . assertNotNull ( result )
timeoutTest ( ) { clock . stop ( ) ; cloud . orbit . actors . Stage stage1 = createStage ( ) ; cloud . orbit . actors . Stage client = createClient ( ) ; cloud . orbit . actors . test . actors . SomeActor someActor = cloud . orbit . actors . Actor . getReference ( cloud . orbit . actors . test . actors . SomeActor . class , "1" ) ; java . util . UUID uuid = someActor . getUniqueActivationId ( 0 ) . get ( ) ; "<AssertPlaceHolder>" ; cloud . orbit . concurrent . Task < java . util . UUID > call = someActor . getUniqueActivationId ( TimeUnit . SECONDS . toNanos ( 200 ) ) ; clock . incrementTime ( 60 , TimeUnit . MINUTES ) ; client . cleanup ( ) ; expectException ( ( ) -> call . join ( ) ) ; } getUniqueActivationId ( ) { return cloud . orbit . concurrent . Task . fromValue ( uniqueActivationId ) ; }
org . junit . Assert . assertEquals ( uuid , someActor . getUniqueActivationId ( ) . get ( ) )
clipLeftTest ( ) { org . eclipse . swt . graphics . Rectangle bounds = new org . eclipse . swt . graphics . Rectangle ( 0 , 0 , 1000 , 1000 ) ; int x0 = - 100 ; int y0 = 100 ; int x1 = 100 ; int y1 = 100 ; org . eclipse . swt . graphics . Rectangle rect = org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . clip ( bounds , x0 , y0 , x1 , y1 ) ; "<AssertPlaceHolder>" ; } clip ( org . eclipse . swt . graphics . Rectangle , int , int , int , int ) { int maxLoops = 3 ; int quadrant0 = org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . computeQuadrant ( x0 , y0 , bounds ) ; int quadrant1 = org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . computeQuadrant ( x1 , y1 , bounds ) ; if ( ( quadrant0 == 0 ) && ( quadrant1 == 0 ) ) { return new org . eclipse . swt . graphics . Rectangle ( x0 , y0 , ( x1 - x0 ) , ( y1 - y0 ) ) ; } if ( ( ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . guaranteedOut ( quadrant0 , quadrant1 ) ) || ( ( bounds . width ) == 0 ) ) || ( ( bounds . height ) == 0 ) ) { return null ; } long deltaY = ( ( long ) ( y1 ) ) - ( ( long ) ( y0 ) ) ; long deltaX = ( ( long ) ( x1 ) ) - ( ( long ) ( x0 ) ) ; double slope = deltaY / ( ( double ) ( deltaX ) ) ; double antiSlope = deltaX / ( ( double ) ( deltaY ) ) ; int newX0 = x0 ; int newY0 = y0 ; int newX1 = x1 ; int newY1 = y1 ; for ( int i = 0 ; ( i < maxLoops ) && ( quadrant0 != 0 ) ; i ++ ) { if ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . guaranteedOut ( quadrant0 , quadrant1 ) ) { return null ; } if ( ( quadrant0 & ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . UP ) ) != 0 ) { newX0 = ( ( int ) ( newX0 + ( antiSlope * ( ( ( bounds . y ) + ( bounds . height ) ) - newY0 ) ) ) ) ; newY0 = ( bounds . height ) + ( bounds . y ) ; } else if ( ( quadrant0 & ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . DOWN ) ) != 0 ) { newX0 = ( ( int ) ( newX0 + ( antiSlope * ( ( bounds . y ) - newY0 ) ) ) ) ; newY0 = bounds . y ; } else if ( ( quadrant0 & ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . RIGHT ) ) != 0 ) { newY0 = ( ( int ) ( newY0 + ( slope * ( ( ( bounds . x ) + ( bounds . width ) ) - newX0 ) ) ) ) ; newX0 = ( bounds . x ) + ( bounds . width ) ; } else { newY0 = ( ( int ) ( newY0 + ( slope * ( ( bounds . x ) - newX0 ) ) ) ) ; newX0 = bounds . x ; } quadrant0 = org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . computeQuadrant ( newX0 , newY0 , bounds ) ; } for ( int i = 0 ; ( i < maxLoops ) && ( quadrant1 != 0 ) ; i ++ ) { if ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . guaranteedOut ( quadrant0 , quadrant1 ) ) { return null ; } if ( ( quadrant1 & ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . UP ) ) != 0 ) { newX1 = ( ( int ) ( newX1 + ( antiSlope * ( ( ( bounds . y ) + ( bounds . height ) ) - newY1 ) ) ) ) ; newY1 = ( bounds . height ) + ( bounds . y ) ; } else if ( ( quadrant1 & ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . DOWN ) ) != 0 ) { newX1 = ( ( int ) ( newX1 + ( antiSlope * ( ( bounds . y ) - newY1 ) ) ) ) ; newY1 = bounds . y ; } else if ( ( quadrant1 & ( org . eclipse . tracecompass . internal . tmf . ui . util . LineClipper . RIGHT ) ) != 0 ) { newY1 = ( ( int ) ( newY1 + ( slope * ( ( ( bounds . x ) + ( bounds . width ) ) - newX1 ) ) ) ) ; newX1 = ( bounds . x ) + ( bounds . width ) ; } else { newY1 = ( ( int ) ( newY1 + ( slope * ( ( bounds . x ) - newX1 ) ) ) ) ; newX1
org . junit . Assert . assertEquals ( new org . eclipse . swt . graphics . Rectangle ( 0 , 100 , 100 , 0 ) , rect )
testGetComplexMap ( ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . createDocumentModel ( "/" , "mydoc" , "MyDocType2" ) ; doc . setPropertyValue ( "cpx:complex" , ( ( java . io . Serializable ) ( org . nuxeo . ecm . core . TestSQLRepositoryProperties . map ( "foo" , "foo1" ) ) ) ) ; doc = session . createDocument ( doc ) ; session . save ( ) ; @ org . nuxeo . ecm . core . SuppressWarnings ( "unchecked" ) java . util . Map < java . lang . String , java . io . Serializable > updatedMap = ( ( java . util . Map < java . lang . String , java . io . Serializable > ) ( doc . getPropertyValue ( "cpx:complex" ) ) ) ; java . util . Map < java . lang . String , java . io . Serializable > expectedMap = org . nuxeo . ecm . core . TestSQLRepositoryProperties . map ( "foo" , "foo1" , "bar" , null ) ; "<AssertPlaceHolder>" ; } getPropertyValue ( java . lang . String ) { return getPropertyValue ( property , null ) ; }
org . junit . Assert . assertEquals ( expectedMap , updatedMap )
digits_in_string_guava ( ) { java . lang . String phrase = "Creating<sp>xml<sp>using<sp>java<sp>gives<sp>me<sp>heart<sp>burn,<sp>" + "hopefully<sp>java<sp>8,<sp>java<sp>9,<sp>java<sp>10<sp>address<sp>this" ; java . lang . String numberOfDigits = CharMatcher . DIGIT . retainFrom ( phrase ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 4 , numberOfDigits . length ( ) )
allAscii ( ) { java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; java . lang . StringBuilder encoded = new java . lang . StringBuilder ( ) ; for ( char c = 0 ; c < 128 ; c ++ ) { expected . append ( c ) ; encoded . append ( percentEncode ( c ) ) ; } "<AssertPlaceHolder>" ; } decodeAll ( java . lang . String ) { return org . urllib . internal . PercentDecoder . decode ( str , CodepointMatcher . ALL ) ; }
org . junit . Assert . assertEquals ( expected . toString ( ) , org . urllib . internal . PercentDecoder . decodeAll ( encoded . toString ( ) ) )