input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
shouldSupportZeroOffset ( ) { java . lang . String offset = "PT0S" ; java . time . ZonedDateTime time = java . time . ZonedDateTime . parse ( "2017-01-22T08:07:11.22Z" ) ; java . time . ZonedDateTime offsetTime = com . spotify . styx . util . TimeUtil . addOffset ( time , offset ) ; "<AssertPlaceHolder>" ; } is ( com . spotify . styx . api . Api$Version ) { return new org . hamcrest . TypeSafeMatcher < com . spotify . styx . api . Api . Version > ( ) { @ com . spotify . styx . api . Override protected boolean matchesSafely ( com . spotify . styx . api . Api . Version item ) { return ( item . ordinal ( ) ) == ( version . ordinal ( ) ) ; } @ com . spotify . styx . api . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( "Version<sp>can<sp>only<sp>be" ) ; description . appendValue ( version ) ; } } ; }
org . junit . Assert . assertThat ( offsetTime , org . hamcrest . Matchers . is ( time ) )
refererWithoutQueryParam ( ) { java . util . Map < java . lang . String , java . lang . String [ ] > parameters = new java . util . HashMap ( ) ; parameters . put ( "parameterWithoutValue" , new java . lang . String [ 0 ] ) ; when ( request . getParameterMap ( ) ) . thenReturn ( parameters ) ; state . setParameter ( QueryParameterActivationStrategy . PARAM_URL_PARAMS , "toggleFeatureX=handles<sp>space,toggleAll=yes,parameterWithoutValue" ) ; when ( request . getHeader ( "referer" ) ) . thenReturn ( "http://mysite.com/" ) ; boolean isActive = strategy . isActive ( state , user ) ; "<AssertPlaceHolder>" ; } isActive ( org . togglz . core . repository . FeatureState , org . togglz . core . user . FeatureUser ) { return true ; }
org . junit . Assert . assertTrue ( isActive )
whenCrossParameterValidationWithValidConstructorParameters_thenZeroVoilations ( ) { java . lang . reflect . Constructor < org . baeldung . javaxval . methodvalidation . model . Reservation > constructor = org . baeldung . javaxval . methodvalidation . model . Reservation . class . getConstructor ( java . time . LocalDate . class , java . time . LocalDate . class , org . baeldung . javaxval . methodvalidation . model . Customer . class , int . class ) ; java . lang . Object [ ] parameterValues = new java . lang . Object [ ] { java . time . LocalDate . now ( ) . plusDays ( 1 ) , java . time . LocalDate . now ( ) . plusDays ( 2 ) , new org . baeldung . javaxval . methodvalidation . model . Customer ( "William" , "Smith" ) , 1 } ; java . util . Set < javax . validation . ConstraintViolation < org . baeldung . javaxval . methodvalidation . model . Reservation > > violations = executableValidator . validateConstructorParameters ( constructor , parameterValues ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , violations . size ( ) )
testErrorMessageWhenNoReportsConfigured ( ) { final java . lang . String expected = "[LINT]<sp>Violations<sp>found.<sp>No<sp>output<sp>reports<sp>have<sp>been<sp>configured.<sp>Please<sp>see<sp>documentation<sp>regarding<sp>the<sp>outputReports<sp>configuration<sp>parameter." ; final java . lang . String actual = checkMojo . generateErrorMessage ( new java . util . ArrayList < java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; } generateErrorMessage ( java . util . List ) { final java . lang . StringBuffer message = new java . lang . StringBuffer ( "[LINT]<sp>Violations<sp>found.<sp>" ) ; if ( outputReportList . isEmpty ( ) ) { message . append ( "No<sp>output<sp>reports<sp>have<sp>been<sp>configured.<sp>Please<sp>see<sp>documentation<sp>regarding<sp>the<sp>outputReports<sp>configuration<sp>parameter." ) ; } else { final boolean wroteSummaryToConsole ; final java . util . ArrayList < java . lang . String > remainingReports = new java . util . ArrayList < java . lang . String > ( outputReportList ) ; if ( ( outputReportList . contains ( "summary" ) ) && ( com . lewisd . maven . lint . report . summary . SummaryReportWriter . isConsole ( summaryOutputFile ) ) ) { wroteSummaryToConsole = true ; message . append ( "For<sp>more<sp>details,<sp>see<sp>error<sp>messages<sp>above" ) ; remainingReports . remove ( "summary" ) ; } else { wroteSummaryToConsole = false ; message . append ( "For<sp>more<sp>details" ) ; } if ( remainingReports . isEmpty ( ) ) { message . append ( "." ) ; } else { if ( wroteSummaryToConsole ) { message . append ( ",<sp>or<sp>" ) ; } else { message . append ( "<sp>see<sp>" ) ; } message . append ( "For<sp>more<sp>details" 0 ) ; if ( ( remainingReports . size ( ) ) == 1 ) { final java . io . File outputFile = getOutputFileForReport ( remainingReports . get ( 0 ) ) ; message . append ( outputFile . getAbsolutePath ( ) ) ; } else { message . append ( "one<sp>of<sp>the<sp>following<sp>files:<sp>" ) ; boolean first = true ; for ( final java . lang . String report : remainingReports ) { if ( ! first ) { message . append ( ",<sp>" ) ; } final java . io . File outputFile = getOutputFileForReport ( report ) ; message . append ( outputFile . getAbsolutePath ( ) ) ; first = false ; } } } } return message . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
FindListeners_NoListeners_EmptyList ( ) { java . util . List < net . mostlyoriginal . api . event . common . EventListener > listeners = new net . mostlyoriginal . api . event . common . SubscribeAnnotationFinder ( ) . resolve ( new java . lang . Object ( ) ) ; "<AssertPlaceHolder>" ; } resolve ( java . lang . Object ) { final java . util . ArrayList < net . mostlyoriginal . api . event . common . EventListener > listeners = new java . util . ArrayList ( ) ; for ( com . artemis . utils . reflect . Method method : com . artemis . utils . reflect . ClassReflection . getDeclaredMethods ( o . getClass ( ) ) ) { if ( method . isAnnotationPresent ( net . mostlyoriginal . api . event . common . Subscribe . class ) ) { final com . artemis . utils . reflect . Annotation declaredAnnotation = method . getDeclaredAnnotation ( net . mostlyoriginal . api . event . common . Subscribe . class ) ; if ( declaredAnnotation != null ) { final net . mostlyoriginal . api . event . common . Subscribe subscribe = declaredAnnotation . getAnnotation ( net . mostlyoriginal . api . event . common . Subscribe . class ) ; listeners . add ( new net . mostlyoriginal . api . event . common . EventListener ( o , method , subscribe . priority ( ) , subscribe . ignoreCancelledEvents ( ) ) ) ; } } } return listeners ; }
org . junit . Assert . assertTrue ( listeners . isEmpty ( ) )
testEmbeddingForwardPass ( ) { int nClassesIn = 10 ; org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . activation ( Activation . TANH ) . list ( ) . layer ( 0 , new org . deeplearning4j . nn . conf . layers . EmbeddingLayer . Builder ( ) . hasBias ( true ) . nIn ( nClassesIn ) . nOut ( 5 ) . build ( ) ) . layer ( 1 , new org . deeplearning4j . nn . layers . feedforward . embedding . OutputLayer . Builder ( ) . nIn ( 5 ) . nOut ( 4 ) . activation ( Activation . SOFTMAX ) . build ( ) ) . build ( ) ; org . deeplearning4j . nn . conf . MultiLayerConfiguration conf2 = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . activation ( Activation . TANH ) . list ( ) . layer ( 0 , new org . deeplearning4j . nn . layers . feedforward . embedding . DenseLayer . Builder ( ) . nIn ( nClassesIn ) . nOut ( 5 ) . build ( ) ) . layer ( 1 , new org . deeplearning4j . nn . layers . feedforward . embedding . OutputLayer . Builder ( ) . nIn ( 5 ) . nOut ( 4 ) . activation ( Activation . SOFTMAX ) . build ( ) ) . build ( ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork net = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork net2 = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf2 ) ; net . init ( ) ; net2 . init ( ) ; net2 . setParams ( net . params ( ) . dup ( ) ) ; int batchSize = 3 ; org . nd4j . linalg . api . ndarray . INDArray inEmbedding = org . nd4j . linalg . factory . Nd4j . create ( batchSize , 1 ) ; org . nd4j . linalg . api . ndarray . INDArray inOneHot = org . nd4j . linalg . factory . Nd4j . create ( batchSize , nClassesIn ) ; java . util . Random r = new java . util . Random ( 12345 ) ; for ( int i = 0 ; i < batchSize ; i ++ ) { int classIdx = r . nextInt ( nClassesIn ) ; inEmbedding . putScalar ( i , classIdx ) ; inOneHot . putScalar ( new int [ ] { i , classIdx } , 1.0 ) ; } java . util . List < org . nd4j . linalg . api . ndarray . INDArray > activationsEmbedding = net . feedForward ( inEmbedding , false ) ; java . util . List < org . nd4j . linalg . api . ndarray . INDArray > activationsDense = net2 . feedForward ( inOneHot , false ) ; for ( int i = 1 ; i < 3 ; i ++ ) { org . nd4j . linalg . api . ndarray . INDArray actE = activationsEmbedding . get ( i ) ; org . nd4j . linalg . api . ndarray . INDArray actD = activationsDense . get ( i ) ; "<AssertPlaceHolder>" ; } } get ( int ) { return objects . get ( i ) ; }
org . junit . Assert . assertEquals ( actE , actD )
testInvalidHmac ( ) { java . util . List < com . google . firebase . auth . hash . Hmac . Builder > builders = com . google . common . collect . ImmutableList . < com . google . firebase . auth . hash . Hmac . Builder > of ( com . google . firebase . auth . hash . HmacSha512 . builder ( ) , com . google . firebase . auth . hash . HmacSha256 . builder ( ) , com . google . firebase . auth . hash . HmacSha1 . builder ( ) , com . google . firebase . auth . hash . HmacMd5 . builder ( ) ) ; for ( com . google . firebase . auth . hash . Hmac . Builder builder : builders ) { try { builder . build ( ) ; org . junit . Assert . fail ( "No<sp>error<sp>thrown<sp>for<sp>missing<sp>key" ) ; } catch ( java . lang . Exception expected ) { "<AssertPlaceHolder>" ; } } } build ( ) { return new com . google . firebase . messaging . MulticastMessage ( this ) ; }
org . junit . Assert . assertTrue ( ( expected instanceof java . lang . IllegalArgumentException ) )
processReportWithoutOptions ( ) { org . apache . cxf . jaxrs . client . WebClient client = org . apache . cxf . jaxrs . client . WebClient . create ( fr . opensagres . xdocreport . service . rest . RESTXDocReportServiceTest . BASE_ADDRESS ) ; client . path ( "processReport" ) ; client . accept ( MediaType . APPLICATION_JSON ) ; client . type ( MediaType . APPLICATION_JSON_TYPE ) ; fr . opensagres . xdocreport . document . domain . ReportAndDataRepresentation report = new fr . opensagres . xdocreport . document . domain . ReportAndDataRepresentation ( ) ; java . io . InputStream in = fr . opensagres . xdocreport . service . rest . RESTXDocReportServiceTest . class . getClassLoader ( ) . getResourceAsStream ( "bo.docx" ) ; report . setReportID ( "reportID1" ) ; report . setDocument ( fr . opensagres . xdocreport . core . io . IOUtils . toByteArray ( in ) ) ; report . setTemplateEngine ( "Velocity" ) ; report . getFieldsMetaData ( ) . add ( "test" ) ; report . setTemplateEngine ( "Velocity" ) ; report . setDataContext ( new java . util . ArrayList < fr . opensagres . xdocreport . document . domain . DataContext > ( ) ) ; report . setOptions ( null ) ; byte [ ] flux = client . post ( report , byte [ ] . class ) ; "<AssertPlaceHolder>" ; createFile ( flux , "result.docx" ) ; } setOptions ( fr . opensagres . xdocreport . document . domain . WSOptions ) { this . options = options ; }
org . junit . Assert . assertNotNull ( flux )
overrideOrderCalculatorInOrder ( ) { hudson . EnvVars env = new hudson . EnvVars ( ) ; hudson . EnvVars overrides = new hudson . EnvVars ( ) ; overrides . put ( "A" , "NoReference" ) ; overrides . put ( "B" , "${A}" ) ; overrides . put ( "C" , "${B}" ) ; overrides . put ( "D" , "${E}" ) ; overrides . put ( "E" , "${C}" ) ; hudson . EnvVars . OverrideOrderCalculator calc = new hudson . EnvVars . OverrideOrderCalculator ( env , overrides ) ; java . util . List < java . lang . String > order = calc . getOrderedVariableNames ( ) ; "<AssertPlaceHolder>" ; } getOrderedVariableNames ( ) { return orderedVariableNames ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "A" , "B" , "C" , "E" , "D" ) , order )
withStartAfter ( ) { doAnswer ( com . google . cloud . firestore . LocalFirestoreHelper . queryResponse ( ) ) . when ( firestoreMock ) . streamRequest ( runQuery . capture ( ) , streamObserverCapture . capture ( ) , org . mockito . Matchers . < com . google . api . gax . rpc . ServerStreamingCallable > any ( ) ) ; query . orderBy ( "foo" ) . startAfter ( "bar" ) . get ( ) . get ( ) ; com . google . firestore . v1 . RunQueryRequest queryRequest = com . google . cloud . firestore . LocalFirestoreHelper . query ( com . google . cloud . firestore . LocalFirestoreHelper . order ( "foo" , StructuredQuery . Direction . ASCENDING ) , com . google . cloud . firestore . LocalFirestoreHelper . startAt ( false ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( queryRequest , runQuery . getValue ( ) )
testRangeNotIn10Min ( ) { int range10min = 10 ; java . util . Date date100MinInFuture = org . apache . commons . lang3 . time . DateUtils . addMinutes ( new java . util . Date ( ) , 100 ) ; "<AssertPlaceHolder>" ; } isInRangeMinutes ( java . util . Date , java . util . Date , int ) { int rangeInSeconds = rangeInMinutes * 60 ; return org . digidoc4j . utils . DateUtils . isInRangeSeconds ( date1 , date2 , rangeInSeconds ) ; }
org . junit . Assert . assertFalse ( org . digidoc4j . utils . DateUtils . isInRangeMinutes ( new java . util . Date ( ) , date100MinInFuture , range10min ) )
testGetTasksAssignedByGroupsWithGroupsLangOneTask ( ) { java . lang . String str = "(with<sp>(new<sp>Task())<sp>{<sp>priority<sp>=<sp>55,<sp>taskData<sp>=<sp>(with(<sp>new<sp>TaskData())<sp>{<sp>}<sp>),<sp>" ; str += "peopleAssignments<sp>=<sp>(with<sp>(<sp>new<sp>PeopleAssignments()<sp>)<sp>{<sp>potentialOwners<sp>=<sp>[new<sp>Group('Crusaders')<sp>],businessAdministrators<sp>=<sp>[<sp>new<sp>User('Administrator')<sp>],<sp>})," ; str += "name<sp>=<sp>'This<sp>is<sp>my<sp>task<sp>name'<sp>})" ; org . kie . api . task . model . Task task = org . jbpm . services . task . impl . factories . TaskFactory . evalTask ( new java . io . StringReader ( str ) ) ; taskService . addTask ( task , new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; java . util . List < java . lang . String > groupIds = new java . util . ArrayList < java . lang . String > ( ) ; groupIds . add ( "Crusaders" ) ; java . util . List < org . kie . api . task . model . TaskSummary > tasks = taskService . getTasksAssignedByGroups ( groupIds ) ; "<AssertPlaceHolder>" ; } size ( ) { return data . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , tasks . size ( ) )
firstTest ( ) { com . microsoft . azure . management . mysql . v2017_12_01 . MySQLTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . mysql . v2017_12_01 . MySQLTest . resourceManager . resourceGroups ( ) . define ( com . microsoft . azure . management . mysql . v2017_12_01 . MySQLTest . rgName ) . withRegion ( Region . US_WEST . toString ( ) ) . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { return this . create ( null , null , null , null ) ; }
org . junit . Assert . assertNotNull ( group )
runTest ( ) { boolean result = checkNoError ( "Social_Forums_Get_Recommendations" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
testMultiple ( ) { java . util . List < com . google . gwt . core . ext . typeinfo . JClassType > annotedClasses = new java . util . ArrayList < com . google . gwt . core . ext . typeinfo . JClassType > ( ) ; com . google . gwt . core . ext . typeinfo . JClassType type = oracle . addClass ( getMultipleClass ( ) ) ; annotedClasses . add ( type ) ; loader . load ( annotedClasses , configuration ) ; E element = loader . getConfigList ( configuration ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } isMultiple ( ) { return Boolean . TRUE . toString ( ) . equalsIgnoreCase ( getMultiple ( ) ) ; }
org . junit . Assert . assertTrue ( element . isMultiple ( ) )
testWriteDataHandler ( ) { org . apache . cxf . jaxrs . provider . DataSourceProvider < javax . activation . DataHandler > p = new org . apache . cxf . jaxrs . provider . DataSourceProvider ( ) ; javax . activation . DataHandler ds = new javax . activation . DataHandler ( new org . apache . cxf . jaxrs . ext . multipart . InputStreamDataSource ( new java . io . ByteArrayInputStream ( "image" . getBytes ( ) ) , "image/png" ) ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ; p . writeTo ( ds , javax . activation . DataHandler . class , javax . activation . DataHandler . class , new java . lang . annotation . Annotation [ ] { } , javax . ws . rs . core . MediaType . valueOf ( "image/png" ) , new org . apache . cxf . jaxrs . impl . MetadataMap < java . lang . String , java . lang . Object > ( ) , os ) ; "<AssertPlaceHolder>" ; } toString ( ) { return value ; }
org . junit . Assert . assertEquals ( "image" , os . toString ( ) )
ShouldRejectConnectionPutWithNoConnectionAttributes ( ) { hm = org . openstack . atlas . api . validation . validators . HealthMonitorValidatorTest . whenValidatingPut . initHealthMonitor ( null , org . openstack . atlas . api . validation . validators . CONNECT , null , null , null , null , null , null ) ; result = hmv . validate ( hm , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . validation . validators . PUT ) , result . passedValidation ( ) )
testBroadcastAMax ( ) { org . nd4j . linalg . api . ndarray . INDArray matrix = org . nd4j . linalg . factory . Nd4j . create ( 5 , 5 ) ; for ( int r = 0 ; r < ( matrix . rows ( ) ) ; r ++ ) { matrix . getRow ( r ) . assign ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 2 , 1 } ) ) ; } org . nd4j . linalg . api . ndarray . INDArray row = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , - 4 , - 5 } ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . BroadcastAMax ( matrix , row , matrix , 1 ) ) ; for ( int r = 0 ; r < ( matrix . rows ( ) ) ; r ++ ) { "<AssertPlaceHolder>" ; } } create ( int [ ] , long [ ] , long [ ] , char , org . nd4j . linalg . api . buffer . DataType ) { lombok . val ret = org . nd4j . linalg . factory . Nd4j . INSTANCE . create ( data , shape , strides , order , type , org . nd4j . linalg . factory . Nd4j . getMemoryManager ( ) . getCurrentWorkspace ( ) ) ; org . nd4j . linalg . factory . Nd4j . logCreationIfNecessary ( ret ) ; return ret ; }
org . junit . Assert . assertEquals ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , - 4 , - 5 } ) , matrix . getRow ( r ) )
testValidate ( ) { org . apache . directory . ldap . client . api . LdapConnection connection = org . mockito . Mockito . mock ( org . apache . directory . ldap . client . api . LdapConnection . class ) ; when ( connection . isConnected ( ) ) . thenReturn ( true ) ; when ( connection . lookup ( Dn . ROOT_DSE , SchemaConstants . NO_ATTRIBUTE ) ) . thenReturn ( org . mockito . Mockito . mock ( org . apache . directory . api . ldap . model . entry . Entry . class ) ) ; "<AssertPlaceHolder>" ; } validate ( java . lang . String ) { if ( ( path . isEmpty ( ) ) || ( org . apache . jackrabbit . oak . commons . PathUtils . denotesRootPath ( path ) ) ) { return ; } else if ( ( path . charAt ( ( ( path . length ( ) ) - 1 ) ) ) == '/' ) { throw new java . lang . IllegalArgumentException ( ( "Path<sp>may<sp>not<sp>end<sp>with<sp>'/':<sp>" + path ) ) ; } char last = 0 ; for ( int index = 0 , len = path . length ( ) ; index < len ; index ++ ) { char c = path . charAt ( index ) ; if ( c == '/' ) { if ( last == '/' ) { throw new java . lang . IllegalArgumentException ( ( "Path<sp>may<sp>not<sp>contains<sp>'//':<sp>" + path ) ) ; } } last = c ; } }
org . junit . Assert . assertTrue ( validator . validate ( connection ) )
testIsEmptyWhenNoItems ( ) { presenter . setupItems ( new java . util . ArrayList ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return dayTimeValues ( ) . allMatch ( this :: isNone ) ; }
org . junit . Assert . assertTrue ( presenter . isEmpty ( ) )
testSerialization ( ) { org . eclipse . swt . graphics . RGB rgb = new org . eclipse . swt . graphics . RGB ( 1 , 2 , 3 ) ; org . eclipse . swt . graphics . RGB deserializedRGB = serializeAndDeserialize ( rgb ) ; "<AssertPlaceHolder>" ; } serializeAndDeserialize ( org . eclipse . swt . widgets . Display ) { org . eclipse . swt . widgets . Display result = org . eclipse . rap . rwt . testfixture . internal . SerializationTestUtil . serializeAndDeserialize ( display ) ; org . eclipse . swt . widgets . DisplaySerialization_Test . getDisplayAdapter ( result ) . attachThread ( ) ; return result ; }
org . junit . Assert . assertEquals ( rgb , deserializedRGB )
testEncryptAndSaveImage ( ) { java . lang . String fileName = "random" ; com . rapidftr . task . EncryptImageAsyncTask asyncTask = new com . rapidftr . task . EncryptImageAsyncTask ( context , photoCaptureHelper , bitmap , fileName , photoUploadBox , 90 ) ; android . os . AsyncTask < java . lang . Void , java . lang . Integer , java . lang . Boolean > task = asyncTask . execute ( ) ; "<AssertPlaceHolder>" ; verify ( photoCaptureHelper ) . saveThumbnail ( bitmap , 90 , fileName ) ; verify ( photoCaptureHelper ) . savePhoto ( bitmap , 90 , fileName ) ; verify ( bitmap ) . recycle ( ) ; verify ( photoUploadBox ) . repaint ( ) ; } get ( ) { return executeUnenclosed ( new com . rapidftr . utils . http . HttpGet ( uri . build ( ) . toString ( ) ) ) ; }
org . junit . Assert . assertTrue ( task . get ( ) )
testGetNull ( ) { cern . c2mon . server . common . device . Device d = deviceCache . get ( 2000L ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { if ( ( name == null ) || ( name . equalsIgnoreCase ( "" ) ) ) { throw new java . lang . IllegalArgumentException ( "Attempting<sp>to<sp>retrieve<sp>a<sp>Tag<sp>from<sp>the<sp>cache<sp>with<sp>a<sp>NULL<sp>or<sp>empty<sp>name<sp>parameter." ) ; } if ( name . contains ( "*" ) ) { name = name . replace ( "*" , "\\*" ) ; } if ( name . contains ( "?" ) ) { name = name . replace ( "?" , "\\?" ) ; } java . util . Collection < T > results = findByNameWildcard ( name , 1 ) ; for ( T tag : results ) { return tag ; } return null ; }
org . junit . Assert . assertNull ( d )
testVraagOpKandidaatVaderMetOverledenVaderNLBuitenPeriode ( ) { java . util . List < nl . bzk . brp . model . operationeel . kern . BetrokkenheidModel > echtgenoten = java . util . Arrays . asList ( maakBetrokkenheden ( 20110228 , BrpConstanten . NL_NATIONALITEIT_CODE . getWaarde ( ) ) ) ; org . mockito . Mockito . when ( relatieRepository . haalOpBetrokkenhedenVanPersoon ( org . mockito . Matchers . any ( nl . bzk . brp . model . operationeel . kern . PersoonModel . class ) , org . mockito . Matchers . any ( nl . bzk . brp . dataaccess . selectie . RelatieSelectieFilter . class ) ) ) . thenReturn ( echtgenoten ) ; org . mockito . Mockito . when ( persoonRepository . haalPersoonOpMetAdresViaBetrokkenheid ( echtgenoten . get ( 0 ) ) ) . thenReturn ( echtgenoten . get ( 0 ) . getPersoon ( ) ) ; java . util . List < nl . bzk . brp . model . operationeel . kern . PersoonModel > kandidaten = kandidaatVader . bepaalKandidatenVader ( new nl . bzk . brp . model . operationeel . kern . PersoonModel ( new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ) , new nl . bzk . brp . model . algemeen . attribuuttype . kern . Datum ( 20120101 ) ) ; org . mockito . Mockito . verify ( persoonRepository , org . mockito . Mockito . times ( 0 ) ) . haalPersoonOpMetAdresViaBetrokkenheid ( ( ( nl . bzk . brp . model . operationeel . kern . BetrokkenheidModel ) ( org . mockito . Matchers . any ( ) ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , kandidaten . size ( ) )
testGetParametersWithDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long personPaperId = 1L ; org . lnu . is . domain . person . paper . PersonPaper personPaper = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; personPaper . setId ( personPaperId ) ; java . lang . Long benefitId = 2L ; org . lnu . is . domain . benefit . Benefit benefit = new org . lnu . is . domain . benefit . Benefit ( ) ; benefit . setId ( benefitId ) ; java . lang . Long enrolmentId = 3L ; org . lnu . is . domain . enrolment . Enrolment enrolment = new org . lnu . is . domain . enrolment . Enrolment ( ) ; enrolment . setId ( enrolmentId ) ; org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit entity = new org . lnu . is . domain . enrolment . benefit . EnrolmentBenefit ( ) ; entity . setPersonPaper ( personPaper ) ; entity . setBenefit ( benefit ) ; entity . setEnrolment ( enrolment ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "enrolment" , enrolment ) ; expected . put ( "benefit" , benefit ) ; expected . put ( "personPaper" , personPaper ) ; when ( personPaperDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( personPaper ) ; when ( enrolmentDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( enrolment ) ; when ( benefitDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( benefit ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( personPaperDao ) . getEntityById ( personPaperId ) ; verify ( enrolmentDao ) . getEntityById ( enrolmentId ) ; verify ( benefitDao ) . getEntityById ( benefitId ) ; "<AssertPlaceHolder>" ; } getEntityById ( KEY ) { org . lnu . is . dao . dao . DefaultDao . LOG . info ( "Getting<sp>{}.entity<sp>wit<sp>id" , getEntityClass ( ) . getSimpleName ( ) , id ) ; return persistenceManager . findById ( getEntityClass ( ) , id ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testPriorityOrder_descendingInsert ( ) { org . jacorb . notification . queue . MessageQueue _queue = new org . jacorb . notification . queue . BoundedPriorityEventQueue ( 20 , org . jacorb . notification . queue . EventQueueOverflowStrategy . FIFO ) ; for ( int x = 0 ; x < 10 ; ++ x ) { int prio = 10 - x ; org . jacorb . notification . interfaces . Message mockMessage = newMessage ( prio ) ; _queue . put ( mockMessage ) ; } for ( int x = 0 ; x < 10 ; ++ x ) { org . jacorb . notification . interfaces . Message _event = _queue . getMessage ( false ) ; "<AssertPlaceHolder>" ; } } getPriority ( ) { return org . jacorb . notification . AnyMessage . DEFAULT_PRIORITY ; }
org . junit . Assert . assertEquals ( ( 10 - x ) , _event . getPriority ( ) )
isLesserThanTest ( ) { java . util . List < javax . measure . Quantity < javax . measure . quantity . Time > > times = new java . util . ArrayList ( getTimes ( ) ) ; times . add ( timeFactory . create ( 30 , Units . HOUR ) ) ; java . util . List < javax . measure . Quantity < javax . measure . quantity . Time > > list = times . stream ( ) . filter ( tec . uom . se . function . QuantityFunctions . isLesserThan ( 15 ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } isLesserThan ( java . lang . Number ) { return ( q ) -> ( q . getValue ( ) . doubleValue ( ) ) < ( value . doubleValue ( ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , java . lang . Integer . valueOf ( list . size ( ) ) )
hasNotElapsedIfNotStarted ( ) { expect ( mockClock . getGranularity ( ) ) . andReturn ( 1000L ) . anyTimes ( ) ; expect ( mockClock . getNanoTime ( ) ) . andReturn ( new org . fishwife . jrugged . interval . DiscreteInterval ( 3L , 4L ) ) . anyTimes ( ) ; replay ( mockClock ) ; impl . set ( 1000L , 1000L ) ; "<AssertPlaceHolder>" ; } hasElapsed ( ) { if ( ( startTime ) == null ) return false ; return ( clock . getNanoTime ( ) . getMin ( ) ) >= ( targetEndTime . getMin ( ) ) ; }
org . junit . Assert . assertFalse ( impl . hasElapsed ( ) )
testGetSingleElectron_int ( ) { org . openscience . cdk . interfaces . IAtomContainer mol = ( ( org . openscience . cdk . interfaces . IAtomContainer ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtom c = mol . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; org . openscience . cdk . interfaces . IAtom c1 = mol . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; mol . addAtom ( c ) ; mol . addAtom ( c1 ) ; mol . addSingleElectron ( 1 ) ; org . openscience . cdk . interfaces . ISingleElectron se = mol . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . ISingleElectron . class , c ) ; mol . addSingleElectron ( se ) ; "<AssertPlaceHolder>" ; } getSingleElectron ( int ) { if ( ( idx < 0 ) || ( idx >= ( singleElectronCount ) ) ) throw new java . lang . IndexOutOfBoundsException ( ( ( ( "Single<sp>Electrong<sp>index<sp>out<sp>of<sp>bounds:<sp>0<sp><=<sp>" + idx ) + "<sp><<sp>" ) + ( singleElectronCount ) ) ) ; return singleElectrons [ idx ] ; }
org . junit . Assert . assertEquals ( se , mol . getSingleElectron ( 1 ) )
delete ( ) { java . util . Set < java . lang . String > ids = createArtifacts ( ) ; store . deleteChunks ( com . google . common . collect . Lists . newArrayList ( ids ) , 0 ) ; java . util . Iterator < java . lang . String > iter = store . getAllChunkIds ( 0 ) ; java . util . Set < java . lang . String > ret = com . google . common . collect . Sets . newHashSet ( ) ; while ( iter . hasNext ( ) ) { ret . add ( iter . next ( ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "ExternalIdentityRef{" + "id='" ) + ( id ) ) + '\'' ) + ",<sp>providerName='" ) + ( providerName ) ) + '\'' ) + '}' ; }
org . junit . Assert . assertTrue ( ret . toString ( ) , ret . isEmpty ( ) )
shouldRetrunTrueWhenCheckIfProductIsNotUsedIfIsntUsed ( ) { java . lang . String belongsToProductName = "product" ; java . lang . String belongsToCompanyName = "company" ; java . lang . String hasManyName = "products" ; given ( companyProduct . getId ( ) ) . willReturn ( null ) ; given ( companyProduct . getBelongsToField ( belongsToProductName ) ) . willReturn ( product ) ; given ( companyProduct . getBelongsToField ( belongsToCompanyName ) ) . willReturn ( company ) ; given ( company . getHasManyField ( hasManyName ) ) . willReturn ( hasMany ) ; given ( hasMany . find ( ) ) . willReturn ( searchCriteriaBuilder ) ; given ( searchCriteriaBuilder . add ( com . qcadoo . model . api . search . SearchRestrictions . belongsTo ( belongsToProductName , product ) ) ) . willReturn ( searchCriteriaBuilder ) ; given ( searchCriteriaBuilder . list ( ) ) . willReturn ( searchResult ) ; given ( searchResult . getEntities ( ) ) . willReturn ( entities ) ; given ( entities . isEmpty ( ) ) . willReturn ( true ) ; boolean result = companyProductService . checkIfProductIsNotUsed ( companyProduct , belongsToProductName , belongsToCompanyName , hasManyName ) ; "<AssertPlaceHolder>" ; } checkIfProductIsNotUsed ( com . qcadoo . model . api . Entity , java . lang . String , java . lang . String , java . lang . String ) { if ( ( companyProduct . getId ( ) ) == null ) { com . qcadoo . model . api . Entity product = companyProduct . getBelongsToField ( belongsToProductName ) ; if ( product == null ) { return true ; } else { com . qcadoo . model . api . Entity company = companyProduct . getBelongsToField ( belongsToCompanyName ) ; if ( company == null ) { return true ; } else { com . qcadoo . model . api . search . SearchResult searchResult = company . getHasManyField ( hasManyName ) . find ( ) . add ( com . qcadoo . model . api . search . SearchRestrictions . belongsTo ( belongsToProductName , product ) ) . list ( ) ; return searchResult . getEntities ( ) . isEmpty ( ) ; } } } return true ; }
org . junit . Assert . assertTrue ( result )
testPutNotExistKey ( ) { memory . put ( "type" , "key" , "value" ) ; java . lang . Object value = memory . get ( "type" , "key" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . Object ) { vn . com . vndirect . exchangesimulator . datastorage . memory . InMemoryKey objKey = new vn . com . vndirect . exchangesimulator . datastorage . memory . InMemoryKey ( type , key ) ; return memory . get ( objKey ) ; }
org . junit . Assert . assertEquals ( "value" , value )
testExecuteEntityQuery_Embedded ( ) { com . jmethods . catatumbo . EntityManagerTest . em . deleteAll ( com . jmethods . catatumbo . entities . Customer . class ) ; java . util . List < com . jmethods . catatumbo . entities . Customer > customers = new java . util . ArrayList ( ) ; customers . add ( com . jmethods . catatumbo . entities . Customer . createSampleCustomer1 ( ) ) ; customers . add ( com . jmethods . catatumbo . entities . Customer . createSampleCustomer2 ( ) ) ; customers . add ( com . jmethods . catatumbo . entities . Customer . createSampleCustomer3 ( ) ) ; com . jmethods . catatumbo . EntityManagerTest . em . insert ( customers ) ; try { java . lang . Thread . sleep ( 5000 ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } com . jmethods . catatumbo . EntityQueryRequest request = com . jmethods . catatumbo . EntityManagerTest . em . createEntityQueryRequest ( "SELECT<sp>*<sp>FROM<sp>Customer" ) ; com . jmethods . catatumbo . QueryResponse < com . jmethods . catatumbo . entities . Customer > response = com . jmethods . catatumbo . EntityManagerTest . em . executeEntityQueryRequest ( com . jmethods . catatumbo . entities . Customer . class , request ) ; java . util . List < com . jmethods . catatumbo . entities . Customer > output = response . getResults ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( output . size ( ) ) == 3 ) )
getBillingRunOffsetInMs_default ( ) { long expectedDays = 4 * ( org . oscm . configurationservice . bean . BillingOffsetTest . DAY_IN_MS ) ; doReturn ( java . lang . Long . valueOf ( expectedDays ) ) . when ( configServiceBean ) . getLongConfigurationSetting ( ConfigurationKey . TIMER_INTERVAL_BILLING_OFFSET , Configuration . GLOBAL_CONTEXT ) ; long result = configServiceBean . getBillingRunOffsetInMs ( ) ; "<AssertPlaceHolder>" ; } getBillingRunOffsetInMs ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( expectedDays , result )
shouldCalculateCAndUpdateCVectorNoCVectorUpdateController ( ) { eu . smartenit . sbox . ntm . dtm . receiver . DTMTrafficManager manager = new eu . smartenit . sbox . ntm . dtm . receiver . DTMTrafficManager ( ) ; manager . setSBoxContainer ( container ) ; manager . initialize ( ) ; eu . smartenit . sbox . ntm . dtm . receiver . CVectorUpdateController . deactivate ( ) ; manager . updateRVector ( rVector ) ; manager . updateXVector ( xVector ) ; manager . updateXVector ( xVector ) ; manager . updateXVector ( xVector ) ; java . lang . Thread . sleep ( 1200 ) ; verify ( client , times ( 6 ) ) . send ( any ( java . lang . String . class ) , anyInt ( ) , any ( eu . smartenit . sbox . db . dto . CVector . class ) ) ; reset ( client ) ; System . out . println ( eu . smartenit . sbox . ntm . dtm . receiver . CVectorHistory . toText ( ) ) ; "<AssertPlaceHolder>" ; eu . smartenit . sbox . ntm . dtm . receiver . CVectorHistory . clear ( ) ; } entries ( ) { return eu . smartenit . sbox . ntm . dtm . receiver . CVectorHistory . history ; }
org . junit . Assert . assertEquals ( 3 , eu . smartenit . sbox . ntm . dtm . receiver . CVectorHistory . entries ( ) . size ( ) )
multipartTest ( ) { byte [ ] sixMegBuf = com . urbanairship . hbackup . TestUtil . getRandomBuf ( ( ( 6 * 1024 ) * 1024 ) ) ; java . lang . String filename = "mptest.txt" ; java . lang . String sourceDir = "from" ; java . lang . String sinkDir = "to" ; java . lang . String sourceKey = ( sourceDir + "/" ) + filename ; java . lang . String sinkKey = ( sinkDir + "/" ) + filename ; deleteLater ( sourceService , sourceBucket , sourceKey ) ; deleteLater ( sinkService , sinkBucket , sinkKey ) ; sourceService . putObject ( sourceBucket , new org . jets3t . service . model . S3Object ( sourceKey , sixMegBuf ) ) ; com . urbanairship . hbackup . TestUtil . verifyS3Obj ( sourceService , sourceBucket , sourceKey , sixMegBuf ) ; java . lang . String sourceUri = ( ( "s3://" + ( sourceBucket ) ) + "/" ) + sourceDir ; java . lang . String sinkUri = ( ( "s3://" + ( sinkBucket ) ) + "/" ) + sinkDir ; org . apache . commons . configuration . SystemConfiguration sysProps = new org . apache . commons . configuration . SystemConfiguration ( ) ; com . urbanairship . hbackup . HBackupConfig conf = com . urbanairship . hbackup . HBackupConfig . forTests ( sourceUri , sinkUri , null , dfsClusterConfig , sysProps . getString ( HBackupConfig . CONF_SINKS3ACCESSKEY ) , sysProps . getString ( HBackupConfig . CONF_SINKS3SECRET ) ) ; new com . urbanairship . hbackup . HBackup ( conf ) . runWithCheckedExceptions ( ) ; com . urbanairship . hbackup . TestUtil . verifyS3Obj ( sinkService , sinkBucket , sinkKey , sixMegBuf ) ; long sourceMtime = sourceService . getObjectDetails ( sourceBucket , sourceKey ) . getLastModifiedDate ( ) . getTime ( ) ; long sinkMtimeSource = java . lang . Long . valueOf ( ( ( java . lang . String ) ( sinkService . getObjectDetails ( sinkBucket , sinkKey ) . getMetadata ( Constant . S3_SOURCE_MTIME ) ) ) ) ; "<AssertPlaceHolder>" ; } verifyS3Obj ( org . jets3t . service . S3Service , java . lang . String , java . lang . String , byte [ ] ) { @ com . urbanairship . hbackup . SuppressWarnings ( "unused" ) org . jets3t . service . model . S3Object [ ] listing = service . listObjects ( bucket ) ; org . jets3t . service . model . S3Object s3Obj = null ; try { s3Obj = service . getObject ( bucket , key ) ; java . io . InputStream is = s3Obj . getDataInputStream ( ) ; int objSize = ( ( int ) ( s3Obj . getContentLength ( ) ) ) ; if ( objSize < 0 ) { org . junit . Assert . fail ( "S3<sp>input<sp>stream<sp>had<sp>no<sp>bytes<sp>available<sp>to<sp>verify" ) ; } org . junit . Assert . assertEquals ( contents . length , objSize ) ; com . urbanairship . hbackup . TestUtil . assertStreamEquals ( contents , is ) ; } finally { if ( s3Obj != null ) { s3Obj . closeDataInputStream ( ) ; } } }
org . junit . Assert . assertEquals ( sourceMtime , sinkMtimeSource )
testBasicDefaultHostnameVerifier ( ) { this . server = org . apache . hc . core5 . http . impl . bootstrap . ServerBootstrap . bootstrap ( ) . setSslContext ( org . apache . hc . client5 . testing . SSLTestContexts . createServerSSLContext ( ) ) . create ( ) ; this . server . start ( ) ; final org . apache . hc . core5 . http . protocol . HttpContext context = new org . apache . hc . core5 . http . protocol . BasicHttpContext ( ) ; final org . apache . hc . client5 . http . ssl . SSLConnectionSocketFactory socketFactory = org . apache . hc . client5 . http . ssl . SSLConnectionSocketFactoryBuilder . create ( ) . setSslContext ( org . apache . hc . client5 . testing . SSLTestContexts . createClientSSLContext ( ) ) . build ( ) ; try ( final java . net . Socket socket = socketFactory . createSocket ( context ) ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "localhost" , this . server . getLocalPort ( ) ) ; final org . apache . hc . core5 . http . HttpHost target = new org . apache . hc . core5 . http . HttpHost ( "https" , "localhost" , this . server . getLocalPort ( ) ) ; try ( final javax . net . ssl . SSLSocket sslSocket = ( ( javax . net . ssl . SSLSocket ) ( socketFactory . connectSocket ( TimeValue . ZERO_MILLISECONDS , socket , target , remoteAddress , null , context ) ) ) ) { final javax . net . ssl . SSLSession sslsession = sslSocket . getSession ( ) ; "<AssertPlaceHolder>" ; } } } connectSocket ( org . apache . hc . core5 . util . TimeValue , java . net . Socket , org . apache . hc . core5 . http . HttpHost , java . net . InetSocketAddress , java . net . InetSocketAddress , org . apache . hc . core5 . http . protocol . HttpContext ) { final java . net . Socket sock = ( socket != null ) ? socket : createSocket ( context ) ; if ( localAddress != null ) { sock . bind ( localAddress ) ; } try { sock . connect ( remoteAddress , ( org . apache . hc . core5 . util . TimeValue . isPositive ( connectTimeout ) ? connectTimeout . toMillisIntBound ( ) : 0 ) ) ; } catch ( final java . io . IOException ex ) { org . apache . hc . core5 . io . Closer . closeQuietly ( sock ) ; throw ex ; } return sock ; }
org . junit . Assert . assertNotNull ( sslsession )
testCrowdingDistanceMaximize ( ) { org . evosuite . ga . metaheuristics . NSGAII < org . evosuite . ga . NSGAChromosome > ga = new org . evosuite . ga . metaheuristics . NSGAII < org . evosuite . ga . NSGAChromosome > ( null ) ; org . evosuite . ga . operators . selection . BinaryTournamentSelectionCrowdedComparison ts = new org . evosuite . ga . operators . selection . BinaryTournamentSelectionCrowdedComparison ( true ) ; ts . setMaximize ( true ) ; ga . setSelectionFunction ( ts ) ; org . evosuite . ga . NSGAChromosome c1 = new org . evosuite . ga . NSGAChromosome ( ) ; org . evosuite . ga . NSGAChromosome c2 = new org . evosuite . ga . NSGAChromosome ( ) ; c1 . setRank ( 0 ) ; c2 . setRank ( 0 ) ; c1 . setDistance ( 0.1 ) ; c2 . setDistance ( 0.5 ) ; java . util . List < org . evosuite . ga . NSGAChromosome > population = new java . util . ArrayList < org . evosuite . ga . NSGAChromosome > ( ) ; population . add ( c1 ) ; population . add ( c2 ) ; "<AssertPlaceHolder>" ; } getIndex ( org . evosuite . utils . List ) { double r = org . evosuite . utils . Randomness . nextDouble ( ) ; double d = ( java . util . Properties . RANK_BIAS ) - ( java . lang . Math . sqrt ( ( ( ( java . util . Properties . RANK_BIAS ) * ( java . util . Properties . RANK_BIAS ) ) - ( ( 4.0 * ( ( java . util . Properties . RANK_BIAS ) - 1.0 ) ) * r ) ) ) ) ; int length = population . size ( ) ; d = ( d / 2.0 ) / ( ( java . util . Properties . RANK_BIAS ) - 1.0 ) ; int index = ( ( int ) ( length * d ) ) ; return index ; }
org . junit . Assert . assertTrue ( ( ( ts . getIndex ( population ) ) == 1 ) )
testSetName ( ) { org . opengis . util . InternationalString result = calendarEra1 . getName ( ) ; ( ( org . geotools . temporal . reference . DefaultCalendarEra ) ( calendarEra1 ) ) . setName ( new org . geotools . util . SimpleInternationalString ( "new<sp>Era" ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertFalse ( calendarEra1 . getName ( ) . equals ( result ) )
testHandleError ( ) { final nl . bzk . brp . protocollering . verwerking . service . ProtocolleringFoutAfhandeling protocolleringFoutAfhandeling = new nl . bzk . brp . protocollering . verwerking . service . ProtocolleringFoutAfhandeling ( ) ; protocolleringFoutAfhandeling . handleError ( new java . lang . IllegalArgumentException ( ) ) ; "<AssertPlaceHolder>" ; } handleError ( java . lang . Throwable ) { nl . bzk . brp . protocollering . verwerking . service . ProtocolleringFoutAfhandeling . LOGGER . error ( "Fout<sp>bij<sp>het<sp>afhandelen<sp>van<sp>een<sp>protocollering<sp>bericht." , t ) ; }
org . junit . Assert . assertNotNull ( protocolleringFoutAfhandeling )
testStatistics ( ) { int fileSchemeCount = 0 ; for ( org . apache . hadoop . fs . FileSystem . Statistics stats : org . apache . hadoop . fs . FileSystem . getAllStatistics ( ) ) { if ( stats . getScheme ( ) . equals ( "file" ) ) { fileSchemeCount ++ ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; org . apache . hadoop . yarn . service . component . instance . ComponentInstanceId that = ( ( org . apache . hadoop . yarn . service . component . instance . ComponentInstanceId ) ( o ) ) ; if ( ( getId ( ) ) != ( that . getId ( ) ) ) return false ; return ( getCompName ( ) ) != null ? getCompName ( ) . equals ( that . getCompName ( ) ) : ( that . getCompName ( ) ) == null ; }
org . junit . Assert . assertEquals ( 1 , fileSchemeCount )
testNotExistingRecord ( ) { final java . lang . String recordClassName = "record.that.does.not.exist" ; @ kieker . test . common . junit . record . factory . SuppressWarnings ( "unused" ) final kieker . common . record . factory . IRecordFactory < ? extends kieker . common . record . IMonitoringRecord > recordFactory = this . recordFactoryResolver . get ( recordClassName ) ; "<AssertPlaceHolder>" ; } get ( java . io . File ) { return this . repository . get ( directory . getAbsolutePath ( ) ) ; }
org . junit . Assert . assertNull ( recordFactory )
shouldGetSameKeyAsPeekNext ( ) { final org . apache . kafka . streams . state . internals . ThreadCache cache = new org . apache . kafka . streams . state . internals . ThreadCache ( logContext , 10000L , new org . apache . kafka . streams . processor . internals . MockStreamsMetrics ( new org . apache . kafka . common . metrics . Metrics ( ) ) ) ; final org . apache . kafka . common . utils . Bytes theByte = org . apache . kafka . common . utils . Bytes . wrap ( new byte [ ] { 0 } ) ; cache . put ( namespace , theByte , dirtyEntry ( theByte . get ( ) ) ) ; final org . apache . kafka . streams . state . internals . ThreadCache . MemoryLRUCacheBytesIterator iterator = cache . range ( namespace , theByte , org . apache . kafka . common . utils . Bytes . wrap ( new byte [ ] { 1 } ) ) ; "<AssertPlaceHolder>" ; } peekNextKey ( ) { return innerIterator . peekNextKey ( ) ; }
org . junit . Assert . assertEquals ( iterator . peekNextKey ( ) , iterator . next ( ) . key )
test_Equality_Of_USD_with_Fraction ( ) { com . ripple . core . coretypes . Amount a = com . ripple . core . AmountTest . amt ( "123.4567/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL" ) ; com . ripple . core . coretypes . Amount b = com . ripple . core . AmountTest . amt ( "123.4567/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( o instanceof org . ripple . bouncycastle . asn1 . eac . PackedDate ) ) { return false ; } org . ripple . bouncycastle . asn1 . eac . PackedDate other = ( ( org . ripple . bouncycastle . asn1 . eac . PackedDate ) ( o ) ) ; return org . ripple . bouncycastle . util . Arrays . areEqual ( time , other . time ) ; }
org . junit . Assert . assertTrue ( a . equals ( b ) )
testMultipleChoicePickerNonExistingElement ( ) { org . richfaces . fragment . common . picker . ChoicePickerHelper . ByVisibleTextChoicePicker picker = org . richfaces . fragment . common . picker . ChoicePickerHelper . byVisibleText ( ) . match ( "non<sp>existing" ) ; java . util . List < org . openqa . selenium . WebElement > elements = picker . pickMultiple ( myFragment . getDivs ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; }
org . junit . Assert . assertTrue ( elements . isEmpty ( ) )
testAddListUriHeadEmptyNoContext ( ) { this . testRdfListUtilDefaults . addList ( this . testListHeadUri1 , this . testValuesEmpty , this . testGraph ) ; "<AssertPlaceHolder>" ; } size ( ) { try { return ( ( int ) ( rc . size ( ) ) ) ; } catch ( org . eclipse . rdf4j . repository . RepositoryException e ) { throw new net . fortytwo . sesametools . RepositoryGraph . RepositoryGraphRuntimeException ( e ) ; } }
org . junit . Assert . assertEquals ( 0 , this . testGraph . size ( ) )
testGetHidden ( ) { com . flickr4java . flickr . prefs . PrefsInterface iface = flickr . getPrefsInterface ( ) ; java . lang . Boolean hidden = iface . getHidden ( ) ; "<AssertPlaceHolder>" ; } getHidden ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "method" , com . flickr4java . flickr . prefs . PrefsInterface . METHOD_GET_HIDDEN ) ; com . flickr4java . flickr . Response response = transportAPI . get ( transportAPI . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new com . flickr4java . flickr . FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } org . w3c . dom . Element personElement = response . getPayload ( ) ; return personElement . getAttribute ( "hidden" ) . equals ( "1" ) ? true : false ; }
org . junit . Assert . assertNotNull ( hidden )
test_TestObject_pickStructFromArgs ( ) { org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct arg1 = new org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct ( ) ; org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct arg2 = new org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct ( ) ; org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct arg3 = new org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct ( ) ; org . apache . tuscany . sca . binding . corba . testing . generated . SimpleStruct inner = new org . apache . tuscany . sca . binding . corba . testing . generated . SimpleStruct ( ) ; inner . field1 = TestConstants . STR_1 ; inner . field2 = TestConstants . INT_1 ; arg1 . innerStruct = inner ; arg2 . innerStruct = inner ; arg3 . innerStruct = inner ; arg1 . str = TestConstants . STR_1 ; arg2 . str = TestConstants . STR_2 ; arg3 . str = TestConstants . STR_3 ; arg1 . str_list = TestConstants . STR_ARR_1 ; arg2 . str_list = TestConstants . STR_ARR_2 ; arg3 . str_list = TestConstants . STR_ARR_2 ; arg1 . threeDimSeq = TestConstants . INT_ARRAY_3_DIM ; arg2 . threeDimSeq = TestConstants . INT_ARRAY_3_DIM ; arg3 . threeDimSeq = TestConstants . INT_ARRAY_3_DIM ; arg1 . twoDimSeq = TestConstants . INT_ARRAY_2_DIM ; arg2 . twoDimSeq = TestConstants . INT_ARRAY_2_DIM ; arg3 . twoDimSeq = TestConstants . INT_ARRAY_2_DIM ; org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaRequest request = new org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaRequest ( org . apache . tuscany . sca . binding . corba . testing . CorbaTypesTestCase . refTestObject , "pickStructFromArgs" ) ; try { request . setOutputType ( org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct . class ) ; request . addArgument ( arg1 ) ; request . addArgument ( arg2 ) ; request . addArgument ( arg3 ) ; request . addArgument ( 1 ) ; org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaResponse response = request . invoke ( ) ; org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct result = ( ( org . apache . tuscany . sca . binding . corba . testing . generated . SomeStruct ) ( response . getContent ( ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Exception<sp>occured<sp>during<sp>tests<sp>" + e ) ) ; e . printStackTrace ( ) ; } } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ! ( obj instanceof org . apache . tuscany . sca . implementation . spring . SpringImplementation ) ) { return false ; } org . apache . tuscany . sca . implementation . spring . SpringImplementation other = ( ( org . apache . tuscany . sca . implementation . spring . SpringImplementation ) ( obj ) ) ; if ( ( location ) == null ) { if ( ( other . location ) != null ) { return false ; } } else if ( ! ( location . equals ( other . location ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( result . str . equals ( TestConstants . STR_1 ) )
testBadCopy ( ) { org . easymock . EasyMock . replay ( s3Client , s3Transfer ) ; org . opencastproject . assetmanager . impl . storage . StoragePath path = new org . opencastproject . assetmanager . impl . storage . StoragePath ( org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ORG_ID , org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . MP_ID , new org . opencastproject . assetmanager . impl . VersionImpl ( 1L ) , org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ASSET_ID ) ; org . opencastproject . assetmanager . impl . storage . StoragePath path2 = new org . opencastproject . assetmanager . impl . storage . StoragePath ( org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ORG_ID , org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . MP_ID , new org . opencastproject . assetmanager . impl . VersionImpl ( 1L ) , org . opencastproject . assetmanager . aws . s3 . AwsS3AssetStoreTest . ASSET_ID2 ) ; "<AssertPlaceHolder>" ; } copy ( org . opencastproject . assetmanager . impl . storage . StoragePath , org . opencastproject . assetmanager . impl . storage . StoragePath ) { java . io . File file = new java . io . File ( baseDir , org . opencastproject . util . UrlSupport . concat ( from . getMediaPackageId ( ) , from . getMediaPackageElementId ( ) , from . getVersion ( ) . toString ( ) ) ) ; java . io . File destFile = new java . io . File ( baseDir , org . opencastproject . util . UrlSupport . concat ( to . getMediaPackageId ( ) , to . getMediaPackageElementId ( ) , to . getVersion ( ) . toString ( ) ) ) ; try { org . apache . commons . io . FileUtils . copyFile ( file , destFile ) ; return true ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertFalse ( store . copy ( path , path2 ) )
testMapKeys ( ) { one . util . streamex . Map < java . lang . Integer , java . lang . Integer > expected = new one . util . streamex . HashMap ( ) ; expected . put ( 1 , 1 ) ; expected . put ( 2 , 22 ) ; expected . put ( 3 , 33 ) ; one . util . streamex . Map < java . lang . Integer , java . lang . Integer > result = one . util . streamex . EntryStream . of ( one . util . streamex . EntryStreamTest . createMap ( ) ) . mapKeys ( String :: length ) . toMap ( ) ; "<AssertPlaceHolder>" ; } toMap ( ) { one . util . streamex . Map < K , V > map = ( one . util . streamex . EntryStream . isParallel ( ) ) ? new java . util . concurrent . ConcurrentHashMap ( ) : new one . util . streamex . HashMap ( ) ; forEach ( one . util . streamex . EntryStream . toMapConsumer ( map ) ) ; return map ; }
org . junit . Assert . assertEquals ( expected , result )
testCreateMessageDurable ( ) { cf = createSessionFactory ( locator ) ; org . apache . activemq . artemis . api . core . client . ClientSession clientSession = cf . createSession ( false , true , true ) ; org . apache . activemq . artemis . api . core . client . ClientMessage clientMessage = clientSession . createMessage ( true ) ; "<AssertPlaceHolder>" ; clientSession . close ( ) ; } isDurable ( ) { if ( ( durable ) == ( org . apache . activemq . artemis . core . paging . cursor . PagedReferenceImpl . UNDEFINED_IS_DURABLE ) ) { durable = ( getMessage ( ) . isDurable ( ) ) ? org . apache . activemq . artemis . core . paging . cursor . PagedReferenceImpl . IS_DURABLE : org . apache . activemq . artemis . core . paging . cursor . PagedReferenceImpl . IS_NOT_DURABLE ; } return ( durable ) == ( org . apache . activemq . artemis . core . paging . cursor . PagedReferenceImpl . IS_DURABLE ) ; }
org . junit . Assert . assertTrue ( clientMessage . isDurable ( ) )
testGetCustomFieldById ( ) { java . util . concurrent . Future < de . micromata . jira . rest . core . domain . field . FieldBean > future = jiraRestClient . getSystemClient ( ) . getCustomFieldById ( "10000" ) ; de . micromata . jira . rest . core . domain . field . FieldBean fieldBean = future . get ( ) ; "<AssertPlaceHolder>" ; } getCustomFieldById ( java . lang . String ) { return executorService . submit ( ( ) -> { Future < List < de . micromata . jira . rest . core . domain . field . FieldBean > > allFields = getAllFields ( ) ; List < de . micromata . jira . rest . core . domain . field . FieldBean > fieldBeen = allFields . get ( ) ; for ( de . micromata . jira . rest . core . domain . field . FieldBean fieldBean : fieldBeen ) { if ( ( fieldBean . getCustom ( ) ) == false ) { continue ; } if ( ( fieldBean . getId ( ) . contains ( id ) ) == true ) { return fieldBean ; } } return null ; } ) ; }
org . junit . Assert . assertNotNull ( fieldBean )
testNoNamespace ( ) { runDefaultETL ( smallInputUri , getVariantStorageEngine ( ) , newStudyConfiguration ( ) , new org . opencb . commons . datastore . core . ObjectMap ( ) . append ( HadoopVariantStorageEngine . HBASE_NAMESPACE , "" ) . append ( VariantStorageEngine . Options . ANNOTATE . key ( ) , true ) . append ( VariantStorageEngine . Options . CALCULATE_STATS . key ( ) , true ) ) ; org . opencb . opencga . storage . hadoop . variant . HadoopVariantStorageEngine variantStorageManager = getVariantStorageEngine ( ) ; org . apache . hadoop . hbase . client . Admin admin = variantStorageManager . getDBAdaptor ( ) . getConnection ( ) . getAdmin ( ) ; for ( org . apache . hadoop . hbase . NamespaceDescriptor namespaceDescriptor : admin . listNamespaceDescriptors ( ) ) { System . out . println ( ( "namespaceDescriptor<sp>=<sp>" + namespaceDescriptor ) ) ; for ( org . apache . hadoop . hbase . TableName tableName : admin . listTableNamesByNamespace ( namespaceDescriptor . getName ( ) ) ) { System . out . println ( ( "\ttableName<sp>=<sp>" + tableName ) ) ; } } "<AssertPlaceHolder>" ; } getDBAdaptor ( ) { return dbAdaptor ; }
org . junit . Assert . assertTrue ( ( ( variantStorageManager . getDBAdaptor ( ) . count ( null ) . first ( ) ) > 0 ) )
testErrorHandling ( ) { java . sql . ResultSetMetaData mock = mock ( java . sql . ResultSetMetaData . class ) ; doReturn ( java . lang . String . class . getName ( ) ) . when ( mock ) . getColumnClassName ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getSchemaName ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getCatalogName ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getTableName ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getColumnLabel ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getColumnDisplaySize ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getPrecision ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . getScale ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . isCurrency ( 0 ) ; doThrow ( new java . sql . SQLException ( ) ) . when ( mock ) . isSigned ( 0 ) ; org . pentaho . reporting . libraries . xmlns . common . AttributeMap < java . lang . Object > name = org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . collectData ( mock , 0 , "name" ) ; "<AssertPlaceHolder>" ; } collectData ( java . sql . ResultSetMetaData , int , java . lang . String ) { org . pentaho . reporting . libraries . xmlns . common . AttributeMap < java . lang . Object > metaData = new org . pentaho . reporting . libraries . xmlns . common . AttributeMap < java . lang . Object > ( ) ; metaData . setAttribute ( MetaAttributeNames . Core . NAMESPACE , MetaAttributeNames . Core . TYPE , org . pentaho . reporting . engine . classic . core . modules . misc . tablemodel . TypeMapper . mapForColumn ( rsmd , column ) ) ; metaData . setAttribute ( MetaAttributeNames . Core . NAMESPACE , MetaAttributeNames . Core . NAME , name ) ; try { if ( rsmd . isCurrency ( ( column + 1 ) ) ) { metaData . setAttribute ( MetaAttributeNames . Numeric . NAMESPACE , MetaAttributeNames . Numeric . CURRENCY , Boolean . TRUE ) ; } else { metaData . setAttribute ( MetaAttributeNames . Numeric . NAMESPACE , MetaAttributeNames . Numeric . CURRENCY , Boolean . FALSE ) ; } } catch ( java . sql . SQLException e ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . logger . debug ( "Error<sp>on<sp>ResultSetMetaData#isCurrency.<sp>Driver<sp>does<sp>not<sp>implement<sp>the<sp>JDBC<sp>specs<sp>correctly.<sp>" , e ) ; } try { if ( rsmd . isSigned ( ( column + 1 ) ) ) { metaData . setAttribute ( MetaAttributeNames . Numeric . NAMESPACE , MetaAttributeNames . Numeric . SIGNED , Boolean . TRUE ) ; } else { metaData . setAttribute ( MetaAttributeNames . Numeric . NAMESPACE , MetaAttributeNames . Numeric . SIGNED , Boolean . FALSE ) ; } } catch ( java . sql . SQLException e ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . logger . debug ( "Error<sp>on<sp>ResultSetMetaData#isSigned.<sp>Driver<sp>does<sp>not<sp>implement<sp>the<sp>JDBC<sp>specs<sp>correctly.<sp>" , e ) ; } try { final java . lang . String tableName = rsmd . getTableName ( ( column + 1 ) ) ; if ( tableName != null ) { metaData . setAttribute ( MetaAttributeNames . Database . NAMESPACE , MetaAttributeNames . Database . TABLE , tableName ) ; } } catch ( java . sql . SQLException e ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . logger . debug ( "Error<sp>on<sp>ResultSetMetaData#getTableName.<sp>Driver<sp>does<sp>not<sp>implement<sp>the<sp>JDBC<sp>specs<sp>correctly.<sp>" , e ) ; } try { final java . lang . String schemaName = rsmd . getSchemaName ( ( column + 1 ) ) ; if ( schemaName != null ) { metaData . setAttribute ( MetaAttributeNames . Database . NAMESPACE , MetaAttributeNames . Database . SCHEMA , schemaName ) ; } } catch ( java . sql . SQLException e ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . logger . debug ( "Error<sp>on<sp>ResultSetMetaData#getSchemaName.<sp>Driver<sp>does<sp>not<sp>implement<sp>the<sp>JDBC<sp>specs<sp>correctly.<sp>" , e ) ; } try { final java . lang . String catalogName = rsmd . getCatalogName ( ( column + 1 ) ) ; if ( catalogName != null ) { metaData . setAttribute ( MetaAttributeNames . Database . NAMESPACE , MetaAttributeNames . Database . CATALOG , catalogName ) ; } } catch ( java . sql . SQLException e ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . logger . debug ( "Error<sp>on<sp>ResultSetMetaData#getTableName.<sp>Driver<sp>does<sp>not<sp>implement<sp>the<sp>JDBC<sp>specs<sp>correctly.<sp>" , e ) ; } try { final java . lang . String label = rsmd . getColumnLabel ( ( column + 1 ) ) ; if ( label != null ) { metaData . setAttribute ( MetaAttributeNames . Formatting . NAMESPACE , MetaAttributeNames . Formatting . LABEL , label ) ; } } catch ( java . sql . SQLException e ) { org . pentaho . reporting . engine . classic . core . modules . misc . datafactory . sql . ResultSetTableModelFactory . logger . debug ( "Error<sp>on<sp>ResultSetMetaData#getTableName.<sp>Driver<sp>does<sp>not<sp>implement<sp>the<sp>JDBC<sp>specs<sp>correctly.<sp>" , e ) ;
org . junit . Assert . assertNotNull ( name )
test ( ) { final java . lang . String inputString = cfml . parsing . utils . TestUtils . loadFile ( sourceFile ) ; final java . io . File expectedFile = new java . io . File ( sourceFile . getPath ( ) . replaceAll ( "\\.cfc" , ".expected.txt" ) . replaceAll ( "\\.cfm" , ".expected.txt" ) ) ; final java . lang . String expectedFileText = ( expectedFile . exists ( ) ) ? cfml . parsing . utils . TestUtils . loadFile ( expectedFile ) : null ; final cfml . parsing . CFMLSource cfmlSource = new cfml . parsing . CFMLSource ( inputString ) ; final java . util . List < net . htmlparser . jericho . Element > elements = cfmlSource . getChildElements ( ) ; java . lang . StringBuilder actual = new java . lang . StringBuilder ( ) ; if ( elements . isEmpty ( ) ) { } else { cfml . parsing . CFMLParser p = new cfml . parsing . CFMLParser ( ) ; cfml . parsing . TestTagFiles . TestTagVisitor visitor = new cfml . parsing . TestTagFiles . TestTagVisitor ( ) ; for ( net . htmlparser . jericho . Element child : elements ) { p . visit ( child , 0 , visitor ) ; } actual . append ( visitor . toString ( ) ) ; } for ( net . htmlparser . jericho . Element elem1 : cfmlSource . getAllElements ( ) ) { elem1 . getAttributes ( ) ; elem1 . getAllElements ( ) ; elem1 . getAllStartTags ( ) ; } if ( expectedFileText == null ) { writeExpectFile ( expectedFile , actual . toString ( ) . replace ( "\r" , "" ) ) ; } else { "<AssertPlaceHolder>" ; } toString ( ) { return "" ; }
org . junit . Assert . assertEquals ( expectedFileText . replace ( "\r" , "" ) , actual . toString ( ) . replace ( "\r" , "" ) )
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS10 icms10 = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS10 ( ) ; icms10 . setModalidadeBCICMS ( NFNotaInfoItemModalidadeBCICMS . PAUTA ) ; icms10 . setModalidadeBCICMSST ( NFNotaInfoItemModalidadeBCICMSST . PAUTA ) ; icms10 . setOrigem ( NFOrigem . NACIONAL ) ; icms10 . setPercentualAliquota ( new java . math . BigDecimal ( "99.99" ) ) ; icms10 . setPercentualAliquotaImpostoICMSST ( new java . math . BigDecimal ( "99.99" ) ) ; icms10 . setPercentualMargemValorICMSST ( new java . math . BigDecimal ( "99.99" ) ) ; icms10 . setPercentualReducaoBCICMSST ( new java . math . BigDecimal ( "99.99" ) ) ; icms10 . setSituacaoTributaria ( NFNotaInfoImpostoTributacaoICMS . ISENTA_OU_NAO_TRIBUTADA_COM_COBRANCA_ICMS_POR_SUBSTITUICAO_TRIBUTARIA ) ; icms10 . setValorBaseCalculo ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setValorBCICMSST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setValorICMSST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setValorTributo ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setValorBaseCalculoFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setPercentualFundoCombatePobreza ( new java . math . BigDecimal ( "99.99" ) ) ; icms10 . setValorFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setValorBCFundoCombatePobrezaST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms10 . setPercentualFundoCombatePobrezaST ( new java . math . BigDecimal ( "99.99" ) ) ; icms10 . setValorFundoCombatePobrezaST ( new java . math . BigDecimal ( "999999999999.99" ) ) ; final java . lang . String xmlEsperado = "<NFNotaInfoItemImpostoICMS10><orig>0</orig><CST>30</CST><modBC>1</modBC><vBC>999999999999.99</vBC><pICMS>99.99</pICMS><vICMS>999999999999.99</vICMS><vBCFCP>999999999999.99</vBCFCP><pFCP>99.99</pFCP><vFCP>999999999999.99</vFCP><modBCST>5</modBCST><pMVAST>99.99</pMVAST><pRedBCST>99.99</pRedBCST><vBCST>999999999999.99</vBCST><pICMSST>99.99</pICMSST><vICMSST>999999999999.99</vICMSST><vBCFCPST>999999999999.99</vBCFCPST><pFCPST>99.99</pFCPST><vFCPST>999999999999.99</vFCPST></NFNotaInfoItemImpostoICMS10>" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . getDescricao ( ) ; }
org . junit . Assert . assertEquals ( xmlEsperado , icms10 . toString ( ) )
getTakenGeplandVoorVandaagDatumPlanningMorgen ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst dienst = em . getReference ( nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst . class , 4 ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie toegangLeveringsAutorisatie = em . getReference ( nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie . class , 1 ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Selectietaak selectietaak = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Selectietaak ( dienst , toegangLeveringsAutorisatie , 1 ) ; selectietaak . setStatus ( ( ( short ) ( SelectietaakStatus . UITVOERBAAR . getId ( ) ) ) ) ; selectietaak . setDatumPlanning ( nl . bzk . algemeenbrp . util . common . DatumUtil . morgen ( ) ) ; em . persist ( selectietaak ) ; final java . util . List < nl . bzk . algemeenbrp . dal . domein . brp . entity . Selectietaak > takenGeplandVoorVandaag = selectieRepository . getTakenGeplandVoorVandaag ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( takenGeplandVoorVandaag . isEmpty ( ) )
testGetIsOpenF ( ) { "<AssertPlaceHolder>" ; } isOpen ( ) { return isOpen ; }
org . junit . Assert . assertFalse ( close . isOpen ( ) )
test_validateUpdateWBUri_invalidHttpOperation ( ) { errorsContainer . put ( "httpOperation" , WPBErrors . ERROR_INVALID_VALUE ) ; wburi . setHttpOperation ( "ABC" ) ; java . lang . String uri = "/test" ; wburi . setUri ( uri ) ; wburi . setResourceType ( WPBUri . RESOURCE_TYPE_FILE ) ; wburi . setResourceExternalKey ( "abc" ) ; wburi . setEnabled ( 1 ) ; wburi . setExternalKey ( "xyz" ) ; java . util . Map < java . lang . String , java . lang . String > errors = uriValidator . validateUpdate ( wburi ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { boolean result = false ; if ( other instanceof com . webpagebytes . cms . template . FreeMarkerTemplateObject ) { com . webpagebytes . cms . template . FreeMarkerTemplateObject that = ( ( com . webpagebytes . cms . template . FreeMarkerTemplateObject ) ( other ) ) ; result = ( ( ( this . lastModified ) == ( that . lastModified ) ) && ( this . externalKey . equals ( that . externalKey ) ) ) && ( this . type . equals ( that . type ) ) ; } return result ; }
org . junit . Assert . assertTrue ( errorsContainer . equals ( errors ) )
cacheTreeShouldBeLessThanTree ( ) { org . eclipse . jface . viewers . Viewer viewer = mock ( org . eclipse . jface . viewers . Viewer . class ) ; org . eclipse . egit . ui . internal . synchronize . mapping . GitChangeSetSorter sorter = new org . eclipse . egit . ui . internal . synchronize . mapping . GitChangeSetSorter ( ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelCache cache = mock ( org . eclipse . egit . ui . internal . synchronize . model . GitModelCache . class ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelTree tree = mock ( org . eclipse . egit . ui . internal . synchronize . model . GitModelTree . class ) ; int actual = sorter . compare ( viewer , cache , tree ) ; "<AssertPlaceHolder>" ; } compare ( org . eclipse . compare . ITypedElement , org . eclipse . compare . ITypedElement , org . eclipse . compare . ITypedElement ) { if ( actLeft . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . structuremergeviewer . DiffNode diffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( null , org . eclipse . compare . structuremergeviewer . Differencer . CHANGE , actAncestor , actLeft , actRight ) ; org . eclipse . compare . ITypedElement [ ] lc = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( actLeft ) ) . getChildren ( ) ) ) ; org . eclipse . compare . ITypedElement [ ] rc = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( actRight ) ) . getChildren ( ) ) ) ; org . eclipse . compare . ITypedElement [ ] ac = null ; if ( actAncestor != null ) ac = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( actAncestor ) ) . getChildren ( ) ) ) ; int li = 0 ; int ri = 0 ; while ( ( li < ( lc . length ) ) && ( ri < ( rc . length ) ) ) { org . eclipse . compare . ITypedElement ln = lc [ li ] ; org . eclipse . compare . ITypedElement rn = rc [ ri ] ; org . eclipse . compare . ITypedElement an = null ; if ( ac != null ) an = ac [ ri ] ; int compareTo = ln . getName ( ) . compareTo ( rn . getName ( ) ) ; if ( compareTo == 0 ) { if ( ! ( ln . equals ( rn ) ) ) diffNode . add ( compare ( ln , rn , an ) ) ; ++ li ; ++ ri ; } else if ( compareTo < 0 ) { org . eclipse . compare . structuremergeviewer . DiffNode childDiffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( org . eclipse . compare . structuremergeviewer . Differencer . ADDITION , an , ln , null ) ; diffNode . add ( childDiffNode ) ; if ( ln . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . ITypedElement [ ] children = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( ln ) ) . getChildren ( ) ) ) ; if ( ( children != null ) && ( ( children . length ) > 0 ) ) { for ( org . eclipse . compare . ITypedElement child : children ) { childDiffNode . add ( addDirectoryFiles ( child , Differencer . ADDITION ) ) ; } } } ++ li ; } else { org . eclipse . compare . structuremergeviewer . DiffNode childDiffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( org . eclipse . compare . structuremergeviewer . Differencer . DELETION , an , null , rn ) ; diffNode . add ( childDiffNode ) ; if ( rn . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . ITypedElement [ ] children = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( rn ) ) . getChildren ( ) ) ) ; if ( ( children != null ) && ( ( children . length ) > 0 ) ) { for ( org . eclipse . compare . ITypedElement child : children ) { childDiffNode . add ( addDirectoryFiles ( child , Differencer . DELETION ) ) ; } } } ++ ri ; } } while ( li < ( lc . length ) ) { org . eclipse . compare . ITypedElement ln = lc [ li ] ; org . eclipse . compare . ITypedElement an = null ; if ( ac != null ) an = ac [ li ] ; org . eclipse . compare . structuremergeviewer . DiffNode childDiffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( org . eclipse . compare . structuremergeviewer . Differencer . ADDITION , an , ln , null ) ; diffNode . add ( childDiffNode ) ; if ( ln . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . ITypedElement
org . junit . Assert . assertTrue ( ( actual < 0 ) )
testWithRemoteMepIdList ( ) { java . util . Collection < org . onosproject . incubator . net . l2monitoring . cfm . identifier . MepId > remoteMepIdList2 = new java . util . ArrayList ( ) ; remoteMepIdList2 . add ( org . onosproject . incubator . net . l2monitoring . cfm . identifier . MepId . valueOf ( ( ( short ) ( 450 ) ) ) ) ; remoteMepIdList2 . add ( org . onosproject . incubator . net . l2monitoring . cfm . identifier . MepId . valueOf ( ( ( short ) ( 451 ) ) ) ) ; remoteMepIdList2 . add ( org . onosproject . incubator . net . l2monitoring . cfm . identifier . MepId . valueOf ( ( ( short ) ( 452 ) ) ) ) ; org . onosproject . incubator . net . l2monitoring . cfm . MaintenanceAssociation ma2 = ma1 . withRemoteMepIdList ( remoteMepIdList2 ) ; "<AssertPlaceHolder>" ; } remoteMepIdList ( ) { if ( ( remoteMepIdList ) != null ) { return com . google . common . collect . Lists . newArrayList ( remoteMepIdList ) ; } return com . google . common . collect . Lists . newArrayList ( ) ; }
org . junit . Assert . assertEquals ( 3 , ma2 . remoteMepIdList ( ) . size ( ) )
setBasePath ( ) { com . github . jknack . handlebars . io . TemplateLoader loader = new com . github . jknack . handlebars . io . FileTemplateLoader ( new java . io . File ( "src/test/resources/mustache/specs" ) , ".yml" ) ; com . github . jknack . handlebars . io . TemplateSource source = loader . sourceAt ( "comments" ) ; "<AssertPlaceHolder>" ; } sourceAt ( java . lang . String ) { for ( com . github . jknack . handlebars . io . TemplateLoader delegate : delegates ) { try { return delegate . sourceAt ( location ) ; } catch ( java . io . IOException ex ) { com . github . jknack . handlebars . io . CompositeTemplateLoader . logger . trace ( "Unable<sp>to<sp>resolve:<sp>{},<sp>trying<sp>next<sp>loader<sp>in<sp>the<sp>chain." , location ) ; } } throw new java . io . FileNotFoundException ( location ) ; }
org . junit . Assert . assertNotNull ( source )
testCanConcludeOneTrustService ( ) { eu . europa . esig . dss . validation . reports . wrapper . CertificateWrapper emptyCert = new eu . europa . esig . dss . validation . process . qualification . trust . filter . UniqueServiceFilterTest . MockCertificateWrapper ( eu . europa . esig . dss . validation . process . qualification . trust . filter . UniqueServiceFilterTest . AFTER_EIDAS_DATE , java . util . Collections . < java . lang . String > emptyList ( ) , java . util . Collections . < java . lang . String > emptyList ( ) , java . util . Collections . < java . lang . String > emptyList ( ) ) ; eu . europa . esig . dss . validation . process . qualification . trust . filter . UniqueServiceFilter filter = new eu . europa . esig . dss . validation . process . qualification . trust . filter . UniqueServiceFilter ( emptyCert ) ; java . util . List < eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper > trustServices = new java . util . ArrayList < eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper > ( ) ; eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper ts0 = new eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper ( ) ; ts0 . setCapturedQualifiers ( java . util . Arrays . asList ( ServiceQualification . QC_STATEMENT , ServiceQualification . QC_WITH_QSCD , ServiceQualification . QC_FOR_ESIG ) ) ; trustServices . add ( ts0 ) ; java . util . List < eu . europa . esig . dss . validation . reports . wrapper . TrustedServiceWrapper > filtered = filter . filter ( trustServices ) ; "<AssertPlaceHolder>" ; } isCollectionNotEmpty ( java . util . Collection ) { return eu . europa . esig . dss . utils . Utils . impl . isCollectionNotEmpty ( collection ) ; }
org . junit . Assert . assertTrue ( eu . europa . esig . dss . utils . Utils . isCollectionNotEmpty ( filtered ) )
testPropertyFilterForProperty ( ) { org . wikidata . wdtk . datamodel . helpers . PropertyIdValue s = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataPropertyIdValue ( "P42" ) ; org . wikidata . wdtk . datamodel . helpers . PropertyIdValue p1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataPropertyIdValue ( "P1" ) ; org . wikidata . wdtk . datamodel . helpers . PropertyIdValue p2 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataPropertyIdValue ( "P2" ) ; org . wikidata . wdtk . datamodel . helpers . PropertyIdValue p3 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataPropertyIdValue ( "P3" ) ; org . wikidata . wdtk . datamodel . helpers . PropertyIdValue p4 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataPropertyIdValue ( "P4" ) ; org . wikidata . wdtk . datamodel . helpers . Set < org . wikidata . wdtk . datamodel . helpers . PropertyIdValue > propertyFilter = new org . wikidata . wdtk . datamodel . helpers . HashSet ( ) ; propertyFilter . add ( p1 ) ; propertyFilter . add ( p3 ) ; org . wikidata . wdtk . datamodel . helpers . DocumentDataFilter documentDataFilter = new org . wikidata . wdtk . datamodel . helpers . DocumentDataFilter ( ) ; documentDataFilter . setPropertyFilter ( propertyFilter ) ; org . wikidata . wdtk . datamodel . helpers . DatamodelFilter filter = new org . wikidata . wdtk . datamodel . helpers . DatamodelFilter ( new org . wikidata . wdtk . datamodel . implementation . DataObjectFactoryImpl ( ) , documentDataFilter ) ; org . wikidata . wdtk . datamodel . helpers . PropertyDocument propertyDocument = org . wikidata . wdtk . datamodel . helpers . Datamodel . makePropertyDocument ( s , org . wikidata . wdtk . datamodel . helpers . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Arrays . asList ( makeTestStatementGroup ( p1 , s ) , makeTestStatementGroup ( p2 , s ) , makeTestStatementGroup ( p3 , s ) , makeTestStatementGroup ( p4 , s ) ) , org . wikidata . wdtk . datamodel . helpers . Datamodel . makeDatatypeIdValue ( DatatypeIdValue . DT_STRING ) ) ; org . wikidata . wdtk . datamodel . helpers . PropertyDocument propertyDocumentFiltered = org . wikidata . wdtk . datamodel . helpers . Datamodel . makePropertyDocument ( s , org . wikidata . wdtk . datamodel . helpers . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Arrays . asList ( makeTestStatementGroup ( p1 , s ) , makeTestStatementGroup ( p3 , s ) ) , org . wikidata . wdtk . datamodel . helpers . Datamodel . makeDatatypeIdValue ( DatatypeIdValue . DT_STRING ) ) ; "<AssertPlaceHolder>" ; } filter ( org . wikidata . wdtk . datamodel . helpers . SenseDocument ) { return dataObjectFactory . getSenseDocument ( sense . getEntityId ( ) , filterMonoLingualTextValues ( sense . getGlosses ( ) . values ( ) ) , filterStatementGroups ( sense . getStatementGroups ( ) ) , sense . getRevisionId ( ) ) ; }
org . junit . Assert . assertEquals ( propertyDocumentFiltered , filter . filter ( propertyDocument ) )
verifyValidateClusterStartupDoNotSuggestUpdateToDynamicClusterIfEnoughMachines ( ) { oracle . kubernetes . operator . wlsconfig . WlsDynamicServersConfig wlsDynamicServersConfig = oracle . kubernetes . operator . wlsconfig . WlsClusterConfigTest . createDynamicServersConfig ( 1 , 1 , "ms-" , "cluster1" ) ; oracle . kubernetes . operator . wlsconfig . WlsClusterConfig wlsClusterConfig = new oracle . kubernetes . operator . wlsconfig . WlsClusterConfig ( "cluster1" , wlsDynamicServersConfig ) ; java . util . Map < java . lang . String , oracle . kubernetes . operator . wlsconfig . WlsClusterConfig > clusters = new java . util . HashMap ( ) ; clusters . put ( wlsClusterConfig . getClusterName ( ) , wlsClusterConfig ) ; oracle . kubernetes . operator . wlsconfig . WlsMachineConfig machine1 = new oracle . kubernetes . operator . wlsconfig . WlsMachineConfig ( "domain1-cluster1-machine1" , 5556 , "localhost" , "SSL" ) ; java . util . Map < java . lang . String , oracle . kubernetes . operator . wlsconfig . WlsMachineConfig > machines = new java . util . HashMap ( ) ; machines . put ( machine1 . getName ( ) , machine1 ) ; oracle . kubernetes . operator . wlsconfig . WlsDomainConfig wlsDomainConfig = new oracle . kubernetes . operator . wlsconfig . WlsDomainConfig ( "base_domain" , oracle . kubernetes . operator . wlsconfig . WlsClusterConfigTest . ADMIN_SERVER , clusters , null , null , machines ) ; wlsClusterConfig . setWlsDomainConfig ( wlsDomainConfig ) ; java . util . ArrayList < oracle . kubernetes . operator . wlsconfig . ConfigUpdate > suggestedConfigUpdates = new java . util . ArrayList ( ) ; wlsClusterConfig . validateCluster ( 1 , suggestedConfigUpdates ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . String [ ] list = mountPointDir . list ( ) ; return list == null ? null : list . length ; }
org . junit . Assert . assertEquals ( 0 , suggestedConfigUpdates . size ( ) )
testOSGi ( ) { "<AssertPlaceHolder>" ; org . osgi . framework . Bundle bundle = bundleContext . getBundle ( ) ; System . out . println ( ( "symbolic<sp>name<sp>" + ( bundle . getSymbolicName ( ) ) ) ) ; System . out . println ( ( "vendor<sp>" + ( bundleContext . getProperty ( org . osgi . framework . Constants . FRAMEWORK_VENDOR ) ) ) ) ; for ( org . osgi . framework . Bundle b : bundleContext . getBundles ( ) ) { System . out . println ( ( ( ( b . getSymbolicName ( ) ) + "<sp>" ) + ( b . getBundleId ( ) ) ) ) ; } }
org . junit . Assert . assertNotNull ( bundleContext )
testUpdateNotificationWrongSeverityLevel ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/AlertServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . AlertService alertService = argusService . getAlertService ( ) ; com . salesforce . dva . argus . sdk . entity . Notification notification = alertService . getNotification ( BigInteger . ONE , BigInteger . ONE ) ; notification . setName ( "UpdatedNotification" ) ; notification . setSeverityLevel ( 6 ) ; com . salesforce . dva . argus . sdk . entity . Notification result = alertService . updateNotification ( BigInteger . ONE , BigInteger . ONE , notification ) ; com . salesforce . dva . argus . sdk . entity . Notification expected = _constructUpdatedNotification ( ) ; "<AssertPlaceHolder>" ; } } _constructUpdatedNotification ( ) { com . salesforce . dva . argus . sdk . entity . Notification notification = _constructPersistedNotification ( ) ; notification . setName ( "UpdatedNotification" ) ; return notification ; }
org . junit . Assert . assertEquals ( expected , result )
testMakeNoChanges_shouldLeaveMapUnchanged ( ) { java . util . Map < java . lang . String , java . lang . String > original = com . google . common . collect . ImmutableMap . of ( "foo" , "bar" ) ; java . util . Map < java . lang . String , java . lang . String > oldMap = com . google . common . collect . ImmutableMap . copyOf ( original ) ; java . util . Map < java . lang . String , java . lang . String > newMap = com . google . common . collect . ImmutableMap . copyOf ( oldMap ) ; com . google . common . collect . MapDifference < java . lang . String , java . lang . String > difference = com . google . common . collect . Maps . difference ( oldMap , newMap ) ; java . util . Map < java . lang . String , java . lang . String > result = org . openengsb . core . util . ConfigUtils . updateMap ( original , difference ) ; "<AssertPlaceHolder>" ; } updateMap ( java . util . Map , com . google . common . collect . MapDifference ) { java . util . Map < K , V > result = new java . util . HashMap < K , V > ( original ) ; if ( diff . areEqual ( ) ) { return result ; } for ( java . util . Map . Entry < K , V > entry : diff . entriesOnlyOnLeft ( ) . entrySet ( ) ) { V originalValue = original . get ( entry . getKey ( ) ) ; if ( org . apache . commons . lang . ObjectUtils . equals ( originalValue , entry . getValue ( ) ) ) { result . remove ( entry . getKey ( ) ) ; } } for ( java . util . Map . Entry < K , V > entry : diff . entriesOnlyOnRight ( ) . entrySet ( ) ) { K key = entry . getKey ( ) ; if ( original . containsKey ( key ) ) { if ( org . apache . commons . lang . ObjectUtils . notEqual ( original . get ( key ) , entry . getValue ( ) ) ) { throw new org . openengsb . core . util . MergeException ( java . lang . String . format ( "tried<sp>to<sp>introduce<sp>a<sp>new<sp>value,<sp>but<sp>it<sp>was<sp>already<sp>there:<sp>%s<sp>(%s,%s)" , key , original . get ( key ) , entry . getValue ( ) ) ) ; } } result . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } for ( java . util . Map . Entry < K , com . google . common . collect . MapDifference . ValueDifference < V > > entry : diff . entriesDiffering ( ) . entrySet ( ) ) { K key = entry . getKey ( ) ; V originalValue = original . get ( entry . getKey ( ) ) ; if ( org . apache . commons . lang . ObjectUtils . equals ( originalValue , entry . getValue ( ) . leftValue ( ) ) ) { result . put ( key , entry . getValue ( ) . rightValue ( ) ) ; } else if ( org . apache . commons . lang . ObjectUtils . equals ( originalValue , entry . getValue ( ) . rightValue ( ) ) ) { result . put ( key , originalValue ) ; } else { java . lang . String errorMessage = java . lang . String . format ( ( "Changes<sp>could<sp>not<sp>be<sp>applied,<sp>because<sp>original<sp>value<sp>differes<sp>from<sp>left-side<sp>of<sp>the" + "MapDifference:<sp>%s<sp>(%s,%s)" ) , entry . getKey ( ) , original . get ( entry . getKey ( ) ) , entry . getValue ( ) ) ; throw new org . openengsb . core . util . MergeException ( errorMessage ) ; } } return result ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( original ) )
testSerialization ( ) { org . jfree . chart . renderer . category . AreaRenderer r1 = new org . jfree . chart . renderer . category . AreaRenderer ( ) ; 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 . category . AreaRenderer r2 = ( ( org . jfree . chart . renderer . category . AreaRenderer ) ( 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 )
testExecuteForPersonCoordinatingPublicGroup ( ) { final java . lang . Long personId = 42L ; java . util . List < java . lang . Long > groupIds = sut . execute ( personId ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( org . eurekastreams . server . service . utility . PropertyExposingServletContextPropertyPlaceholderConfigurer . PropertyAccessor . POOR_CORRESPONDENCE_MSG ) ; }
org . junit . Assert . assertEquals ( 0 , groupIds . size ( ) )
testGetContentSupplier ( ) { final java . lang . String content = "" ; doReturn ( content ) . when ( view ) . getContent ( ) ; final java . util . function . Supplier < java . lang . String > contentSupplier = dslEditor . getContentSupplier ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return null ; }
org . junit . Assert . assertEquals ( content , contentSupplier . get ( ) )
newSourceWithValidStaticResolverSimpleClassName ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; config . setProperty ( Key . SOURCE_STATIC , edu . illinois . library . cantaloupe . source . HttpSource . class . getSimpleName ( ) ) ; edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "cats" ) ; edu . illinois . library . cantaloupe . source . Source source = instance . newSource ( identifier , null ) ; "<AssertPlaceHolder>" ; } newSource ( edu . illinois . library . cantaloupe . image . Identifier , edu . illinois . library . cantaloupe . script . DelegateProxy ) { switch ( getSelectionStrategy ( ) ) { case DELEGATE_SCRIPT : if ( proxy == null ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( "The<sp>" + ( edu . illinois . library . cantaloupe . script . DelegateProxy . class . getSimpleName ( ) ) ) + "<sp>argument<sp>must<sp>be<sp>non-null<sp>when<sp>using<sp>" ) + ( getSelectionStrategy ( ) ) ) + "." ) ) ; } edu . illinois . library . cantaloupe . source . Source source = newDynamicSource ( identifier , proxy ) ; edu . illinois . library . cantaloupe . source . SourceFactory . LOGGER . info ( "{}()<sp>returned<sp>a<sp>{}<sp>for<sp>{}" , DelegateMethod . SOURCE , source . getClass ( ) . getSimpleName ( ) , identifier ) ; return source ; default : final edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; final java . lang . String sourceName = config . getString ( Key . SOURCE_STATIC ) ; if ( sourceName != null ) { return newSource ( sourceName , identifier , proxy ) ; } else { throw new edu . illinois . library . cantaloupe . config . ConfigurationException ( ( ( edu . illinois . library . cantaloupe . config . Key . SOURCE_STATIC ) + "<sp>is<sp>not<sp>set<sp>to<sp>a<sp>valid<sp>source." ) ) ; } } }
org . junit . Assert . assertTrue ( ( source instanceof edu . illinois . library . cantaloupe . source . HttpSource ) )
testdebugAsUTF8 ( ) { com . ociweb . pronghorn . util . TrieParserReader reader = new com . ociweb . pronghorn . util . TrieParserReader ( ) ; com . ociweb . pronghorn . util . TrieParser map = new com . ociweb . pronghorn . util . TrieParser ( 16 ) ; map . setUTF8Value ( "12%b12" , 33 ) ; java . lang . CharSequence test = "12abcd12" ; com . ociweb . pronghorn . util . TrieParserReader . parseSetup ( reader , "12abcd12" . getBytes ( ) , 0 , 8 , 7 ) ; java . lang . StringBuilder target = new java . lang . StringBuilder ( ) ; int result = com . ociweb . pronghorn . util . TrieParserReader . debugAsUTF8 ( reader , target ) ; long val = reader . query ( map , test ) ; "<AssertPlaceHolder>" ; } toString ( ) { return asSource ( new java . lang . StringBuilder ( ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( "12abcd12" , target . toString ( ) )
testIgniteConfigFilter ( ) { java . util . List < java . lang . Class < ? > > classes = org . apache . ignite . testframework . test . ConfigVariationsTestSuiteBuilderTest . basicBuild ( org . apache . ignite . testframework . test . ConfigVariationsTestSuiteBuilderTest . NoopTest . class ) ; final java . util . concurrent . atomic . AtomicInteger cnt = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . List < java . lang . Class < ? > > filteredClasses = new org . apache . ignite . testframework . configvariations . ConfigVariationsTestSuiteBuilder ( org . apache . ignite . testframework . test . ConfigVariationsTestSuiteBuilderTest . NoopTest . class ) . withIgniteConfigFilters ( new org . apache . ignite . lang . IgnitePredicate < org . apache . ignite . configuration . IgniteConfiguration > ( ) { @ org . apache . ignite . testframework . test . Override public boolean apply ( org . apache . ignite . configuration . IgniteConfiguration configuration ) { return ( ( cnt . getAndIncrement ( ) ) % 2 ) == 0 ; } } ) . classes ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return file . length ( ) ; }
org . junit . Assert . assertEquals ( ( ( classes . size ( ) ) / 2 ) , filteredClasses . size ( ) )
shouldFindFromUsernameInlineWithSpelParsing ( ) { org . springframework . data . couchbase . repository . ReactiveUser user = repository . findByUsernameWithSpelAndPlaceholder ( ) . take ( 1 ) . blockLast ( ) ; "<AssertPlaceHolder>" ; assert user . getUsername ( ) . startsWith ( "reactive" ) ; assert user . getUsername ( ) . startsWith ( "reactive" ) ; }
org . junit . Assert . assertNotNull ( user )
runTestUnreachableCode ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "GeneralJava/UnreachableCode.apk" ) ; if ( res != null ) "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , res . size ( ) )
testNoNewSegmentIfNotEnoughWinnerCells ( ) { org . numenta . nupic . algorithms . TemporalMemory tm = new org . numenta . nupic . algorithms . TemporalMemory ( ) ; org . numenta . nupic . model . Connections cn = new org . numenta . nupic . model . Connections ( ) ; org . numenta . nupic . Parameters p = getDefaultParameters ( null , KEY . MAX_NEW_SYNAPSE_COUNT , 3 ) ; p . apply ( cn ) ; org . numenta . nupic . algorithms . TemporalMemory . init ( cn ) ; int [ ] zeroColumns = new int [ ] { } ; int [ ] activeColumns = new int [ ] { 0 } ; tm . compute ( cn , zeroColumns , true ) ; tm . compute ( cn , activeColumns , true ) ; "<AssertPlaceHolder>" ; } numSegments ( ) { return numSegments ( null ) ; }
org . junit . Assert . assertEquals ( 0 , cn . numSegments ( ) , 0 )
nullValueStandardizeAndValidate ( ) { java . lang . String fieldName = "field1" ; java . util . List < com . thinkbiganalytics . policy . BaseFieldPolicy > policies = new java . util . ArrayList ( ) ; policies . add ( new com . thinkbiganalytics . policy . standardization . SimpleRegexReplacer ( "(?i)foo" , "bar" ) ) ; policies . add ( new com . thinkbiganalytics . policy . validation . LookupValidator ( "blah" ) ) ; policies . add ( new com . thinkbiganalytics . policy . standardization . SimpleRegexReplacer ( "(?i)bar" , "test" ) ) ; policies . add ( new com . thinkbiganalytics . policy . validation . LookupValidator ( "aatestaa" ) ) ; com . thinkbiganalytics . policy . FieldPolicy fieldPolicy = com . thinkbiganalytics . policy . FieldPolicyBuilder . newBuilder ( ) . addPolicies ( policies ) . tableName ( "emp" ) . fieldName ( fieldName ) . feedFieldName ( fieldName ) . build ( ) ; com . thinkbiganalytics . spark . validation . HCatDataType fieldDataType = com . thinkbiganalytics . spark . validation . HCatDataType . createFromDataType ( fieldName , "string" ) ; com . thinkbiganalytics . spark . datavalidator . StandardizationAndValidationResult result = validator . standardizeAndValidateField ( fieldPolicy , null , fieldDataType , new java . util . HashMap < java . lang . Class , java . lang . Class > ( ) ) ; "<AssertPlaceHolder>" ; } getFinalValidationResult ( ) { com . thinkbiganalytics . policy . validation . ValidationResult finalResult = StandardDataValidator . VALID_RESULT ; if ( ( ( validationResults ) == null ) || ( validationResults . isEmpty ( ) ) ) { finalResult = StandardDataValidator . VALID_RESULT ; } else { for ( com . thinkbiganalytics . policy . validation . ValidationResult r : validationResults ) { if ( r != ( StandardDataValidator . VALID_RESULT ) ) { finalResult = r ; break ; } } } return finalResult ; }
org . junit . Assert . assertEquals ( StandardDataValidator . VALID_RESULT , result . getFinalValidationResult ( ) )
testFileNamesLoadingService ( ) { java . util . concurrent . Executor executor = java . util . concurrent . Executors . newSingleThreadExecutor ( ) ; io . datakernel . loader . FileNamesLoadingService fileService = io . datakernel . loader . FileNamesLoadingService . create ( io . datakernel . eventloop . Eventloop . getCurrentEventloop ( ) , executor , io . datakernel . http . StaticServletsTest . resourcesPath ) ; fileService . start ( ) ; io . datakernel . eventloop . Eventloop . getCurrentEventloop ( ) . run ( ) ; io . datakernel . loader . StaticLoader testLoader = ( name ) -> name . equals ( "index.html" ) ? io . datakernel . async . Promise . of ( io . datakernel . bytebuf . ByteBufStrings . wrapAscii ( io . datakernel . http . StaticServletsTest . EXPECTED_CONTENT ) ) : io . datakernel . async . Promise . ofException ( new java . nio . file . NoSuchFileException ( name ) ) ; io . datakernel . http . StaticServlet staticServlet = io . datakernel . http . StaticServlet . create ( io . datakernel . eventloop . Eventloop . getCurrentEventloop ( ) , testLoader . filter ( fileService :: contains ) ) ; io . datakernel . http . HttpResponse response = await ( staticServlet . serve ( io . datakernel . http . HttpRequest . get ( "http://test.com:8080/index.html" ) ) ) ; io . datakernel . bytebuf . ByteBuf body = await ( response . getBody ( ) ) ; "<AssertPlaceHolder>" ; } asString ( java . nio . charset . Charset ) { java . lang . String string = getString ( charset ) ; recycle ( ) ; return string ; }
org . junit . Assert . assertEquals ( io . datakernel . http . StaticServletsTest . EXPECTED_CONTENT , body . asString ( io . datakernel . http . UTF_8 ) )
createCommandResolver_WithTimeout ( ) { when ( request . getInputStream ( ) ) . thenReturn ( new com . betfair . cougar . transport . impl . protocol . http . soap . TestServletInputStream ( buildSoapMessage ( null , com . betfair . cougar . transport . impl . protocol . http . soap . SoapTransportCommandProcessorTest . firstOpIn , null , null ) ) ) ; when ( request . getScheme ( ) ) . thenReturn ( "http" ) ; when ( request . getHeader ( "X-RequestTimeout" ) ) . thenReturn ( "10000" ) ; when ( context . getRequestTime ( ) ) . thenReturn ( new java . util . Date ( ) ) ; com . betfair . cougar . transport . api . CommandResolver < com . betfair . cougar . transport . api . protocol . http . HttpCommand > cr = soapCommandProcessor . createCommandResolver ( command , tracer ) ; java . lang . Iterable < com . betfair . cougar . transport . api . ExecutionCommand > executionCommands = cr . resolveExecutionCommands ( ) ; com . betfair . cougar . transport . api . ExecutionCommand executionCommand = executionCommands . iterator ( ) . next ( ) ; com . betfair . cougar . core . api . ev . TimeConstraints constraints = executionCommand . getTimeConstraints ( ) ; "<AssertPlaceHolder>" ; } getExpiryTime ( ) { return expiryTime ; }
org . junit . Assert . assertNotNull ( constraints . getExpiryTime ( ) )
testDoOCR_File ( ) { net . sourceforge . tess4j . Tesseract1Test . logger . info ( "doOCR<sp>on<sp>a<sp>PNG<sp>image" ) ; java . io . File imageFile = new java . io . File ( this . testResourcesDataPath , "eurotext.png" ) ; java . lang . String expResult = "The<sp>(quick)<sp>[brown]<sp>{fox}<sp>jumps!\nOver<sp>the<sp>$43,456.78<sp><lazy><sp>#90<sp>dog" ; java . lang . String result = instance . doOCR ( imageFile ) ; net . sourceforge . tess4j . Tesseract1Test . logger . info ( result ) ; "<AssertPlaceHolder>" ; } doOCR ( net . sourceforge . tess4j . BufferedImage ) { return doOCR ( bi , null ) ; }
org . junit . Assert . assertEquals ( expResult , result . substring ( 0 , expResult . length ( ) ) )
testCDSDeletionSpanningIntoCDSFromTheRightForward ( ) { de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( new de . charite . compbio . jannovar . reference . GenomePosition ( de . charite . compbio . jannovar . reference . TranscriptSequenceChangeHelperTest . refDict , Strand . FWD , 1 , 6649271 , PositionType . ZERO_BASED ) , "TAGC" , "" ) ; java . lang . String resultTranscript = helperForward . getCDSWithGenomeVariant ( change ) ; java . lang . StringBuilder expectedBuilder = new java . lang . StringBuilder ( projectorForward . getTranscriptStartingAtCDS ( ) ) ; expectedBuilder . delete ( ( ( infoForward . cdsTranscriptLength ( ) ) - 1 ) , ( ( infoForward . cdsTranscriptLength ( ) ) + 3 ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "LegacyDeletion<sp>[deletedSeq=" + ( deletedSeq . toHGVSString ( ) ) ) + ",<sp>location=" ) + ( location ) ) + "]" ; }
org . junit . Assert . assertEquals ( expectedBuilder . toString ( ) , resultTranscript )
test_constructor ( ) { com . examples . with . different . packagename . testcarver . joda . ScaledDurationField sdf = new com . examples . with . different . packagename . testcarver . joda . ScaledDurationField ( new com . examples . with . different . packagename . testcarver . joda . TestScaledDurationField . DummyDurationField ( ) , 10 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( sdf )
testRemoveServerGroupScopedRole ( ) { testAddServerGroupScopedRole ( ) ; org . jboss . dmr . ModelNode operation = org . jboss . as . controller . operations . common . Util . createOperation ( org . jboss . as . core . model . test . access . REMOVE , pathAddress ( pathElement ( org . jboss . as . core . model . test . access . CORE_SERVICE , org . jboss . as . core . model . test . access . MANAGEMENT ) , pathElement ( org . jboss . as . core . model . test . access . ACCESS , org . jboss . as . core . model . test . access . AUTHORIZATION ) , pathElement ( org . jboss . as . core . model . test . access . SERVER_GROUP_SCOPED_ROLE , org . jboss . as . core . model . test . access . ServerGroupScopedRolesTestCase . FOO ) ) ) ; org . jboss . dmr . ModelNode result = execute ( operation ) ; checkOutcome ( result ) ; operation = org . jboss . as . controller . operations . common . Util . createOperation ( org . jboss . as . core . model . test . access . READ_RESOURCE_OPERATION , pathAddress ( pathElement ( org . jboss . as . core . model . test . access . CORE_SERVICE , org . jboss . as . core . model . test . access . MANAGEMENT ) , pathElement ( org . jboss . as . core . model . test . access . ACCESS , org . jboss . as . core . model . test . access . AUTHORIZATION ) , pathElement ( org . jboss . as . core . model . test . access . SERVER_GROUP_SCOPED_ROLE ) ) ) ; operation . get ( org . jboss . as . core . model . test . access . RECURSIVE ) . set ( true ) ; result = execute ( operation ) ; checkOutcome ( result ) ; result = result . get ( org . jboss . as . core . model . test . access . RESULT ) ; "<AssertPlaceHolder>" ; } asList ( ) { final java . util . List < java . lang . String > result = new java . util . ArrayList ( ) ; for ( java . util . Collection < org . wildfly . core . launcher . Arguments . Argument > args : map . values ( ) ) { for ( org . wildfly . core . launcher . Arguments . Argument arg : args ) { result . add ( arg . asCommandLineArgument ( ) ) ; } } return result ; }
org . junit . Assert . assertEquals ( 2 , result . asList ( ) . size ( ) )
testGetText_1 ( ) { net . certware . argument . eur . navigator . LabelProvider fixture = new net . certware . argument . eur . navigator . LabelProvider ( ) ; fixture . closedImage = new org . eclipse . swt . graphics . Image ( new org . eclipse . swt . widgets . Display ( ) , 1 , 1 ) ; fixture . openImage = new org . eclipse . swt . graphics . Image ( new org . eclipse . swt . widgets . Display ( ) , 1 , 1 ) ; fixture . errorImage = new org . eclipse . swt . graphics . Image ( new org . eclipse . swt . widgets . Display ( ) , 1 , 1 ) ; java . lang . Object element = new net . certware . argument . eur . navigator . TreeData ( org . easymock . EasyMock . createNiceMock ( org . eclipse . core . resources . IFile . class ) , "" , ( - 1 ) , 1 ) ; java . lang . String result = fixture . getText ( element ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( result )
testGetIS ( ) { java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( CommonConstantsTest . CONTACTYAMLFILE . getBytes ( ) ) ; mloader = new org . jumbune . common . utils . MessageLoader ( inputStream ) ; java . io . InputStream is = mloader . getIS ( ) ; "<AssertPlaceHolder>" ; } getIS ( ) { return is ; }
org . junit . Assert . assertTrue ( ( is != null ) )
testRemove ( ) { com . liferay . blade . samples . servicebuilder . adq . model . Bar newBar = addBar ( ) ; _persistence . remove ( newBar ) ; com . liferay . blade . samples . servicebuilder . adq . model . Bar existingBar = _persistence . fetchByPrimaryKey ( newBar . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } addBar ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . blade . samples . servicebuilder . model . Bar bar = _persistence . create ( pk ) ; bar . setUuid ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; bar . setGroupId ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ; bar . setCompanyId ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ; bar . setUserId ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ; bar . setUserName ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; bar . setCreateDate ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextDate ( ) ) ; bar . setModifiedDate ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextDate ( ) ) ; bar . setField1 ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; bar . setField2 ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomBoolean ( ) ) ; bar . setField3 ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextInt ( ) ) ; bar . setField4 ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextDate ( ) ) ; bar . setField5 ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; _bars . add ( _persistence . update ( bar ) ) ; return bar ; }
org . junit . Assert . assertNull ( existingBar )
isConsumer_yes ( ) { org . apache . servicecomb . core . Invocation invocation = new org . apache . servicecomb . core . Invocation ( endpoint , operationMeta , swaggerArguments ) ; "<AssertPlaceHolder>" ; } isConsumer ( ) { return consumer ; }
org . junit . Assert . assertFalse ( invocation . isConsumer ( ) )
testGetParameterValuesNull ( ) { "<AssertPlaceHolder>" ; } getParameterValues ( java . lang . String ) { if ( ( parameterMap ) != null ) { return parameterMap . get ( name ) ; } java . util . List < java . lang . String > paramList = this . vertxRequest . params ( ) . getAll ( name ) ; return paramList . toArray ( new java . lang . String [ paramList . size ( ) ] ) ; }
org . junit . Assert . assertEquals ( 0 , request . getParameterValues ( "name" ) . length )
testRemove ( ) { org . dayatang . security . domain . User user = org . dayatang . security . domain . User . getByName ( "user2" ) ; int permissionCount1 = org . dayatang . security . domain . Authorization . findAll ( org . dayatang . security . domain . Authorization . class ) . size ( ) ; user . remove ( ) ; int permissionCount2 = org . dayatang . security . domain . Authorization . findAll ( org . dayatang . security . domain . Authorization . class ) . size ( ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( springCache . getNativeCache ( ) ) instanceof net . sf . ehcache . Ehcache ) { net . sf . ehcache . Ehcache ehcache = ( ( net . sf . ehcache . Ehcache ) ( springCache . getNativeCache ( ) ) ) ; return ehcache . getSize ( ) ; } throw new java . lang . UnsupportedOperationException ( "invoke<sp>spring<sp>cache<sp>abstract<sp>size<sp>method<sp>not<sp>supported" ) ; }
org . junit . Assert . assertThat ( ( permissionCount1 - permissionCount2 ) , org . hamcrest . CoreMatchers . is ( 1 ) )
testWhitespacesAroundSeparatorsOfFiles ( ) { java . util . Properties properties = org . eclipse . tycho . p2 . impl . publisher . rootfiles . FeatureRootAdviceTest . createBuildPropertiesWithDefaultRootFiles ( ) ; properties . put ( "root" , "rootfiles/file1.txt<sp>,\n\trootfiles/file2.txt" ) ; org . eclipse . tycho . p2 . impl . publisher . rootfiles . FileToPathMap filesMap = org . eclipse . tycho . p2 . impl . publisher . rootfiles . FeatureRootAdviceFilesTest . createAdviceAndGetFilesMap ( properties , org . eclipse . tycho . p2 . impl . publisher . rootfiles . FeatureRootAdviceTest . GLOBAL_SPEC ) ; "<AssertPlaceHolder>" ; } keySet ( ) { return map . keySet ( ) ; }
org . junit . Assert . assertEquals ( 2 , filesMap . keySet ( ) . size ( ) )
timeout ( ) { alluxio . SessionInfo tSessionInfo = new alluxio . SessionInfo ( 1 , alluxio . SessionInfoTest . SESSION_TIMEOUT_MS ) ; "<AssertPlaceHolder>" ; } timeout ( ) { final long timeoutMs = 500 ; final long slackMs = 200 ; alluxio . refresh . TimeoutRefresh timeoutRefresh = new alluxio . refresh . TimeoutRefresh ( timeoutMs ) ; org . junit . Assert . assertTrue ( timeoutRefresh . attempt ( ) ) ; org . junit . Assert . assertFalse ( timeoutRefresh . attempt ( ) ) ; alluxio . util . CommonUtils . sleepMs ( timeoutMs ) ; alluxio . util . CommonUtils . sleepMs ( slackMs ) ; org . junit . Assert . assertTrue ( timeoutRefresh . attempt ( ) ) ; org . junit . Assert . assertFalse ( timeoutRefresh . attempt ( ) ) ; }
org . junit . Assert . assertFalse ( tSessionInfo . timeout ( ) )
testOrderAccepted ( ) { org . switchyard . quickstarts . demos . orders . Order testOrder = new org . switchyard . quickstarts . demos . orders . Order ( ) ; testOrder . setOrderId ( "ORDER01" ) ; testOrder . setItemId ( "BUTTER" ) ; testOrder . setQuantity ( 100 ) ; org . switchyard . quickstarts . demos . orders . OrderAck testAck = submitOrder . sendInOut ( testOrder ) . getContent ( org . switchyard . quickstarts . demos . orders . OrderAck . class ) ; "<AssertPlaceHolder>" ; } isAccepted ( ) { return accepted ; }
org . junit . Assert . assertTrue ( testAck . isAccepted ( ) )
insertEmployee ( ) { jpaworkshop . BeanValidationJPAIntegrationTest . logger . info ( "insertEmployee" ) ; jpaworkshop . BeanValidationJPAIntegrationTest . em . getTransaction ( ) . begin ( ) ; jpaworkshop . model . Employee emp = new jpaworkshop . model . Employee ( ) ; jpaworkshop . BeanValidationJPAIntegrationTest . em . persist ( emp ) ; jpaworkshop . BeanValidationJPAIntegrationTest . em . getTransaction ( ) . commit ( ) ; emp = jpaworkshop . BeanValidationJPAIntegrationTest . em . find ( jpaworkshop . model . Employee . class , emp . getId ( ) ) ; "<AssertPlaceHolder>" ; jpaworkshop . BeanValidationJPAIntegrationTest . em . getTransaction ( ) . begin ( ) ; jpaworkshop . BeanValidationJPAIntegrationTest . em . remove ( emp ) ; jpaworkshop . BeanValidationJPAIntegrationTest . em . getTransaction ( ) . commit ( ) ; }
org . junit . Assert . assertNotNull ( emp )
UmlLinkType_Inherits ( ) { java . lang . String fromClass = "Domain.Direct.Violating.InheritanceExtends" ; java . lang . String toClass = "Technology.Direct.Dao.HistoryDAO" ; java . lang . String fromAttribute = "" ; boolean isComposite = false ; java . lang . String typeToFind = "Inherits" ; "<AssertPlaceHolder>" ; } isUmlLinkDetected ( java . lang . String , java . lang . String , java . lang . String , boolean , java . lang . String ) { boolean umlLinkDetected = false ; husaccttest . analyse . CSharp_AccuracyTestDependencyDetection . analyseService = husacct . ServiceProvider . getInstance ( ) . getAnalyseService ( ) ; husacct . common . dto . UmlLinkDTO [ ] umlLinkDTOs = husaccttest . analyse . CSharp_AccuracyTestDependencyDetection . analyseService . getUmlLinksFromClassToToClass ( classFrom , classTo ) ; for ( husacct . common . dto . UmlLinkDTO linkDTO : umlLinkDTOs ) { if ( ( ( ( ( linkDTO . from . equals ( classFrom ) ) && ( linkDTO . to . equals ( classTo ) ) ) && ( linkDTO . attributeFrom . equals ( attributeFrom ) ) ) && ( ( linkDTO . isComposite ) == isComposite ) ) && ( linkDTO . type . equals ( linkType ) ) ) { umlLinkDetected = true ; } } return umlLinkDetected ; }
org . junit . Assert . assertTrue ( isUmlLinkDetected ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) )
testBuilderFromAddress ( ) { java . util . List < com . aliyuncs . dm . simple . Email . Address > addressList = new java . util . ArrayList < com . aliyuncs . dm . simple . Email . Address > ( ) ; addressList . add ( new com . aliyuncs . dm . simple . Email . Address ( properties . getProperty ( "smtp.password" ) , "ssss" ) ) ; com . aliyuncs . dm . simple . Email email = com . aliyuncs . dm . simple . Email . builder ( ) . from ( properties . getProperty ( "smtp.username" ) , "dmtest" ) . recipients ( addressList ) . subject ( "test<sp>subject" ) . text ( "hello" ) . replyToAddress ( new com . aliyuncs . dm . simple . Email . Address ( properties . getProperty ( "smtp.username" ) , "" ) ) . build ( ) ; java . lang . String result = mailSender . sendMail ( email ) ; "<AssertPlaceHolder>" ; } sendMail ( com . aliyuncs . dm . simple . Email ) { try { com . aliyuncs . dm . simple . MimeMessage mimeMessage = getMimeMessage ( email ) ; com . aliyuncs . dm . simple . Transport . send ( mimeMessage ) ; } catch ( com . aliyuncs . dm . simple . MessagingException e ) { e . printStackTrace ( ) ; return e . getMessage ( ) ; } catch ( java . io . UnsupportedEncodingException e ) { e . printStackTrace ( ) ; return e . getMessage ( ) ; } return "success" ; }
org . junit . Assert . assertEquals ( "success" , result )
testGelijkeEntiteitInReferentie ( ) { voegBerichtToe ( nl . bzk . brp . model . bericht . kern . PersoonBericht . class , "p1" , null ) ; voegBerichtToe ( nl . bzk . brp . model . bericht . kern . PersoonBericht . class , "p2" , "p1" ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtIdentificeerbaar > berichtenDieDeRegelOvertreden = brby9906 . voerRegelUit ( bericht ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , berichtenDieDeRegelOvertreden . size ( ) )
testExecuteSuccess ( ) { when ( im . inTeam ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( false ) ; when ( im . getOwner ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( uuid ) ; world . bentobox . bentobox . database . objects . Island is = mock ( world . bentobox . bentobox . database . objects . Island . class ) ; org . bukkit . Location loc = mock ( org . bukkit . Location . class ) ; when ( loc . toVector ( ) ) . thenReturn ( new org . bukkit . util . Vector ( 123 , 123 , 432 ) ) ; when ( is . getCenter ( ) ) . thenReturn ( loc ) ; when ( im . getIsland ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( java . util . UUID . class ) ) ) . thenReturn ( is ) ; java . lang . String [ ] name = new java . lang . String [ ] { "tastybento" } ; when ( pm . getUUID ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( notUUID ) ; world . bentobox . bentobox . api . commands . admin . AdminDeleteCommand itl = new world . bentobox . bentobox . api . commands . admin . AdminDeleteCommand ( ac ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( user ) . sendMessage ( "commands.confirmation.confirm" , "[seconds]" , "0" ) ; itl . execute ( user , itl . getLabel ( ) , java . util . Arrays . asList ( name ) ) ; } execute ( world . bentobox . bentobox . api . user . User , java . lang . String , java . util . List ) { user . sendRawMessage ( ( ( ( ( "About<sp>" + ( world . bentobox . bentobox . BentoBox . getInstance ( ) . getDescription ( ) . getName ( ) ) ) + "<sp>v" ) + ( world . bentobox . bentobox . BentoBox . getInstance ( ) . getDescription ( ) . getVersion ( ) ) ) + ":" ) ) ; user . sendRawMessage ( "Copyright<sp>(c)<sp>2017<sp>-<sp>2019<sp>Tastybento,<sp>Poslovitch" ) ; user . sendRawMessage ( "See<sp>https://www.eclipse.org/legal/epl-2.0/<sp>for<sp>license<sp>information." ) ; return true ; }
org . junit . Assert . assertTrue ( itl . execute ( user , itl . getLabel ( ) , java . util . Arrays . asList ( name ) ) )
testGetExperimentsFrom ( ) { net . sourceforge . seqware . common . util . Log . info ( "testGetExperimentsFrom" ) ; java . util . List < net . sourceforge . seqware . common . model . Experiment > experiments = net . sourceforge . seqware . common . metadata . MetadataWSTest . instance . getExperimentsFrom ( 120 ) ; "<AssertPlaceHolder>" ; } getExperimentsFrom ( int ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; }
org . junit . Assert . assertFalse ( experiments . isEmpty ( ) )
testWithMultipleCalls ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; java . lang . String input = "{{<sp>model.testMethod(BaseClass)<sp>}},<sp>{{<sp>model.testMethod(ChildClass1)<sp>}},<sp>{{<sp>model.testMethod(ChildClass2)<sp>}}" ; java . lang . String expected = "BaseClass<sp>input,<sp>ChildClass1<sp>input,<sp>ChildClass2<sp>input" ; java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; context . put ( "model" , new com . mitchellbosecke . pebble . OverloadedMethodTest . Model2 ( ) ) ; context . put ( "BaseClass" , new com . mitchellbosecke . pebble . OverloadedMethodTest . BaseClass ( ) ) ; context . put ( "ChildClass1" , new com . mitchellbosecke . pebble . OverloadedMethodTest . ChildClass1 ( ) ) ; context . put ( "ChildClass2" , new com . mitchellbosecke . pebble . OverloadedMethodTest . ChildClass2 ( ) ) ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( input ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer , context ) ; "<AssertPlaceHolder>" ; } toString ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , writer . toString ( ) )