input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testCommand ( ) { org . bff . javampd . command . MPDCommand mpdCommand = new org . bff . javampd . command . MPDCommand ( "command" ) ; "<AssertPlaceHolder>" ; } getCommand ( ) { return command ; } | org . junit . Assert . assertEquals ( "command" , mpdCommand . getCommand ( ) ) |
deveObterVersaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFRetornoCancelamento cancelamento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFRetornoCancelamento ( ) ; final java . lang . String versao = "3.10" ; cancelamento . setVersao ( versao ) ; "<AssertPlaceHolder>" ; } getVersao ( ) { return this . versao ; } | org . junit . Assert . assertEquals ( "3.10" , cancelamento . getVersao ( ) ) |
shouldGetJavadocForObjectPersoon ( ) { nl . bzk . brp . metaregister . model . ObjectType persoon = objectDao . getBySyncId ( 3010 ) ; java . lang . String tekst = dao . getJavaDocForObject ( persoon ) ; "<AssertPlaceHolder>" ; } getJavaDocForObject ( nl . bzk . brp . metaregister . model . ObjectType ) { java . lang . String template = "select<sp>e<sp>from<sp>%s<sp>e<sp>where<sp>e.element.id<sp>=<sp>%d<sp>AND<sp>soort='DEF'" ; java . lang . String qlString = java . lang . String . format ( template , getModelClassName ( ) , objectType . getId ( ) ) ; nl . bzk . brp . metaregister . model . Tekst tekst = getSingleResult ( qlString ) ; return tekst . getTekst ( ) ; } | org . junit . Assert . assertNotNull ( tekst ) |
toSortedListBy ( ) { org . eclipse . collections . api . list . MutableList < java . lang . Integer > mutableList = this . classUnderTest ( ) . toList ( ) ; mutableList . shuffleThis ( ) ; org . eclipse . collections . api . list . ImmutableList < java . lang . Integer > immutableList = mutableList . toImmutable ( ) ; org . eclipse . collections . api . list . MutableList < java . lang . Integer > sortedList = immutableList . toSortedListBy ( org . eclipse . collections . impl . block . factory . Functions . getIntegerPassThru ( ) ) ; "<AssertPlaceHolder>" ; } classUnderTest ( ) { return SortedBags . immutable . empty ( ) ; } | org . junit . Assert . assertEquals ( this . classUnderTest ( ) , sortedList ) |
testVisitorLatitudeF ( ) { request . setVisitorLatitude ( null ) ; "<AssertPlaceHolder>" ; } getVisitorLatitude ( ) { return ( ( java . lang . Double ) ( getParameter ( org . piwik . java . tracking . PiwikRequest . VISITOR_LATITUDE ) ) ) ; } | org . junit . Assert . assertNull ( request . getVisitorLatitude ( ) ) |
testDeriveChildSelector_ZeroRemaining ( ) { org . eclipse . aether . collection . DependencySelector other1 = new org . eclipse . aether . util . graph . selector . AndDependencySelectorTest . DummyDependencySelector ( true , null ) ; org . eclipse . aether . collection . DependencySelector other2 = new org . eclipse . aether . util . graph . selector . AndDependencySelectorTest . DummyDependencySelector ( false , null ) ; org . eclipse . aether . collection . DependencySelector selector = new org . eclipse . aether . util . graph . selector . AndDependencySelector ( other1 , other2 ) ; "<AssertPlaceHolder>" ; } deriveChildSelector ( org . eclipse . aether . collection . DependencyCollectionContext ) { return child ; } | org . junit . Assert . assertNull ( selector . deriveChildSelector ( null ) ) |
setInvalidDataSourceAndExecutorConfigurationServerTest ( ) { java . lang . String [ ] origEntries = getConfigurationData ( "server" ) ; org . glassfish . javaee7 . batch . test . util . CommandUtil cmd = org . glassfish . javaee7 . batch . test . util . CommandUtil . getInstance ( ) . executeCommandAndGetAsList ( "asadmin" , org . glassfish . javaee7 . batch . test . BatchCommandsTest . SET_BATCH_RUNTIME_COMMAND , "--target" , "server" , "-x" , org . glassfish . javaee7 . batch . test . BatchCommandsTest . VALID_TIMER_POOL_DATA_SOURCE_NAME , "-d" , org . glassfish . javaee7 . batch . test . BatchCommandsTest . VALID_EXECUTOR_NAME ) ; java . lang . String [ ] newEntries = getConfigurationData ( "server" ) ; "<AssertPlaceHolder>" ; } ranOK ( ) { return ( ( cause ) == null ) && ( ( exitCode ) == 0 ) ; } | org . junit . Assert . assertTrue ( ( ( ( ! ( cmd . ranOK ( ) ) ) && ( newEntries [ 0 ] . equals ( origEntries [ 0 ] ) ) ) && ( newEntries [ 1 ] . equals ( origEntries [ 1 ] ) ) ) ) |
testEvalReturnString ( ) { actual . add ( connection . eval ( "return<sp>KEYS[1]" , ReturnType . VALUE , 1 , "foo" ) ) ; byte [ ] result = ( ( byte [ ] ) ( getResults ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { if ( ! ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_VERSION_KEY . equals ( key ) ) ) { return java . lang . System . getProperty ( key ) ; } if ( ( org . springframework . data . redis . RedisTestProfileValueSource . redisVersion . compareTo ( org . springframework . data . redis . RedisVersionUtils . parseVersion ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_50 ) ) ) >= 0 ) { return org . springframework . data . redis . RedisTestProfileValueSource . REDIS_50 ; } if ( ( org . springframework . data . redis . RedisTestProfileValueSource . redisVersion . compareTo ( org . springframework . data . redis . RedisVersionUtils . parseVersion ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_32 ) ) ) >= 0 ) { return org . springframework . data . redis . RedisTestProfileValueSource . REDIS_32 ; } if ( ( org . springframework . data . redis . RedisTestProfileValueSource . redisVersion . compareTo ( org . springframework . data . redis . RedisVersionUtils . parseVersion ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_30 ) ) ) >= 0 ) { return org . springframework . data . redis . RedisTestProfileValueSource . REDIS_30 ; } if ( ( org . springframework . data . redis . RedisTestProfileValueSource . redisVersion . compareTo ( org . springframework . data . redis . RedisVersionUtils . parseVersion ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_28 ) ) ) >= 0 ) { return org . springframework . data . redis . RedisTestProfileValueSource . REDIS_28 ; } if ( ( org . springframework . data . redis . RedisTestProfileValueSource . redisVersion . compareTo ( org . springframework . data . redis . RedisVersionUtils . parseVersion ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_26 ) ) ) >= 0 ) { return org . springframework . data . redis . RedisTestProfileValueSource . REDIS_26 ; } if ( ( org . springframework . data . redis . RedisTestProfileValueSource . redisVersion . compareTo ( org . springframework . data . redis . RedisVersionUtils . parseVersion ( org . springframework . data . redis . RedisTestProfileValueSource . REDIS_24 ) ) ) >= 0 ) { return org . springframework . data . redis . RedisTestProfileValueSource . REDIS_24 ; } throw new java . lang . UnsupportedOperationException ( "Only<sp>Redis<sp>2.4<sp>and<sp>higher<sp>are<sp>supported" ) ; } | org . junit . Assert . assertEquals ( "foo" , new java . lang . String ( result ) ) |
testGetValue ( ) { com . bixly . pastevid . screencap . RecorderPanelTest . log ( "getValue" ) ; long expResult = 0L ; long result = com . bixly . pastevid . screencap . RecorderPanelTest . instance . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return clockTime ; } | org . junit . Assert . assertEquals ( expResult , result ) |
loadReturnsUnaffectedString ( ) { doReturn ( 1 ) . when ( this . dataHolder ) . getIntValue ( org . phenotips . data . internal . controller . ClinicalStatusControllerTest . UNAFFECTED ) ; org . phenotips . data . PatientData < java . lang . String > result = this . component . load ( this . patient ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return null ; } | org . junit . Assert . assertEquals ( org . phenotips . data . internal . controller . ClinicalStatusControllerTest . UNAFFECTED , result . getValue ( ) ) |
testComponentAdapterResolutionIsFirstLookedForByClassKeyToTheTopOfTheContainerHierarchy ( ) { com . picocontainer . DefaultPicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; pico . addComponent ( "default" , com . picocontainer . testmodel . SimpleTouchable . class ) ; pico . addComponent ( com . picocontainer . testmodel . Touchable . class , com . picocontainer . testmodel . DecoratedTouchable . class , new com . picocontainer . parameters . ComponentParameter ( "default" ) ) ; com . picocontainer . DefaultPicoContainer grandChild = new com . picocontainer . DefaultPicoContainer ( new com . picocontainer . DefaultPicoContainer ( new com . picocontainer . DefaultPicoContainer ( pico ) ) ) ; com . picocontainer . testmodel . Touchable touchable = grandChild . getComponent ( com . picocontainer . testmodel . Touchable . class ) ; "<AssertPlaceHolder>" ; } getComponent ( com . googlecode . jtype . Generic ) { return null ; } | org . junit . Assert . assertEquals ( com . picocontainer . testmodel . DecoratedTouchable . class , touchable . getClass ( ) ) |
launchReindexationTest ( ) { when ( fr . gouv . vitam . logbook . operations . client . LogbookOperationsClientRestTest . mock . post ( ) ) . thenReturn ( javax . ws . rs . core . Response . status ( Status . CREATED ) . entity ( fr . gouv . vitam . common . json . JsonHandler . createObjectNode ( ) ) . build ( ) ) ; com . fasterxml . jackson . databind . JsonNode resp = fr . gouv . vitam . logbook . operations . client . LogbookOperationsClientRestTest . client . reindex ( new fr . gouv . vitam . common . database . parameter . IndexParameters ( ) ) ; "<AssertPlaceHolder>" ; } reindex ( fr . gouv . vitam . common . database . parameter . IndexParameters ) { return mock . post ( ) ; } | org . junit . Assert . assertNotNull ( resp ) |
testRedecorateTextComponent ( ) { javax . swing . JTextField textField = new javax . swing . JTextField ( ) ; org . jdesktop . swingx . autocomplete . AutoCompleteDecorator . decorate ( textField , java . util . Collections . emptyList ( ) , true ) ; int expectedFocusListenerLength = textField . getFocusListeners ( ) . length ; org . jdesktop . swingx . autocomplete . AutoCompleteDecorator . decorate ( textField , java . util . Collections . emptyList ( ) , true ) ; "<AssertPlaceHolder>" ; } decorate ( javax . swing . JList , javax . swing . text . JTextComponent , org . jdesktop . swingx . autocomplete . ObjectToStringConverter ) { org . jdesktop . swingx . autocomplete . AutoCompleteDecorator . undecorate ( list ) ; org . jdesktop . swingx . autocomplete . AbstractAutoCompleteAdaptor adaptor = new org . jdesktop . swingx . autocomplete . ListAdaptor ( list , textComponent , stringConverter ) ; org . jdesktop . swingx . autocomplete . AutoCompleteDocument document = org . jdesktop . swingx . autocomplete . AutoCompleteDecorator . createAutoCompleteDocument ( adaptor , true , stringConverter , textComponent . getDocument ( ) ) ; org . jdesktop . swingx . autocomplete . AutoCompleteDecorator . decorate ( textComponent , document , adaptor ) ; } | org . junit . Assert . assertThat ( textField . getFocusListeners ( ) . length , org . hamcrest . CoreMatchers . is ( expectedFocusListenerLength ) ) |
testMappingEnabled ( ) { configure ( resourceOptimizationEnabled , true ) ; boolean enabled = org . richfaces . resource . mapping . ResourceLoadingOptimizationConfiguration . isEnabled ( ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { return org . richfaces . application . configuration . ConfigurationServiceHelper . getBooleanConfigurationValue ( javax . faces . context . FacesContext . getCurrentInstance ( ) , CoreConfiguration . Items . resourceOptimizationEnabled ) ; } | org . junit . Assert . assertTrue ( enabled ) |
testDoFilter_attachesHttpSessionToUISession ( ) { org . eclipse . rap . rwt . internal . service . UISessionImpl deserializedUISession = new org . eclipse . rap . rwt . internal . service . UISessionImpl ( null , null ) ; javax . servlet . http . HttpSession httpSession = org . eclipse . rap . rwt . internal . engine . RWTClusterSupport_Test . mockHttpSession ( ) ; org . eclipse . rap . rwt . internal . engine . RWTClusterSupport_Test . setUISession ( httpSession , deserializedUISession ) ; request . setSession ( httpSession ) ; rwtClusterSupport . doFilter ( request , response , chain ) ; "<AssertPlaceHolder>" ; } getHttpSession ( ) { synchronized ( lock ) { return httpSession ; } } | org . junit . Assert . assertSame ( httpSession , deserializedUISession . getHttpSession ( ) ) |
testValidateXMLSignedMetadataSettings1 ( ) { java . lang . String signedmetadata = com . onelogin . saml2 . util . Util . getFileAsString ( "data/metadata/signed_metadata_settings1.xml" ) ; org . w3c . dom . Document docSignedmetadata = com . onelogin . saml2 . util . Util . loadXML ( signedmetadata ) ; boolean isValid = com . onelogin . saml2 . util . Util . validateXML ( docSignedmetadata , SchemaFactory . SAML_SCHEMA_METADATA_2_0 ) ; "<AssertPlaceHolder>" ; } validateXML ( org . w3c . dom . Document , java . net . URL ) { try { if ( xmlDocument == null ) { throw new java . lang . IllegalArgumentException ( "xmlDocument<sp>was<sp>null" ) ; } javax . xml . validation . Schema schema = com . onelogin . saml2 . util . SchemaFactory . loadFromUrl ( schemaUrl ) ; javax . xml . validation . Validator validator = schema . newValidator ( ) ; if ( com . onelogin . saml2 . util . Util . JAXP_15_SUPPORTED ) { validator . setProperty ( XMLConstants . ACCESS_EXTERNAL_DTD , "" ) ; validator . setProperty ( XMLConstants . ACCESS_EXTERNAL_SCHEMA , "" ) ; } com . onelogin . saml2 . util . XMLErrorAccumulatorHandler errorAcumulator = new com . onelogin . saml2 . util . XMLErrorAccumulatorHandler ( ) ; validator . setErrorHandler ( errorAcumulator ) ; javax . xml . transform . Source xmlSource = new javax . xml . transform . dom . DOMSource ( xmlDocument ) ; validator . validate ( xmlSource ) ; final boolean isValid = ! ( errorAcumulator . hasError ( ) ) ; if ( ! isValid ) { com . onelogin . saml2 . util . Util . LOGGER . warn ( ( "Errors<sp>found<sp>when<sp>validating<sp>SAML<sp>response<sp>with<sp>schema:<sp>" + ( errorAcumulator . getErrorXML ( ) ) ) ) ; } return isValid ; } catch ( java . lang . Exception e ) { com . onelogin . saml2 . util . Util . LOGGER . warn ( ( "Error<sp>executing<sp>validateXML:<sp>" + ( e . getMessage ( ) ) ) , e ) ; return false ; } } | org . junit . Assert . assertTrue ( isValid ) |
testTeiidURLOneSlash ( ) { java . lang . String SERVER_URL = "mm:/localhost:31000" ; "<AssertPlaceHolder>" ; } isValidServerURL ( java . lang . String ) { boolean valid = true ; try { new org . teiid . net . TeiidURL ( serverURL ) ; } catch ( java . lang . Exception e ) { valid = false ; } return valid ; } | org . junit . Assert . assertFalse ( org . teiid . net . TeiidURL . isValidServerURL ( SERVER_URL ) ) |
testPrefixes ( ) { "<AssertPlaceHolder>" ; } prefixes ( ) { if ( ! ( object . has ( org . onosproject . ra . config . RouterAdvertisementDeviceConfig . PREFIXES ) ) ) { return null ; } java . util . List < org . onosproject . net . host . InterfaceIpAddress > ips = com . google . common . collect . Lists . newArrayList ( ) ; com . fasterxml . jackson . databind . node . ArrayNode prefixes = ( ( com . fasterxml . jackson . databind . node . ArrayNode ) ( object . path ( org . onosproject . ra . config . RouterAdvertisementDeviceConfig . PREFIXES ) ) ) ; prefixes . forEach ( ( i ) -> ips . add ( org . onosproject . net . host . InterfaceIpAddress . valueOf ( i . asText ( ) ) ) ) ; return ips ; } | org . junit . Assert . assertThat ( config . prefixes ( ) , org . hamcrest . Matchers . is ( prefixes ) ) |
last_a_fby_b_big ( ) { final java . lang . String rulebase = "<sp>ms" 4 ; final long maxCount = 10000 ; test . ws . prova . test2 . ProvaMetadataTest . ResultCounter count = new test . ws . prova . test2 . ProvaMetadataTest . ResultCounter ( maxCount ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; java . util . concurrent . CountDownLatch doneSignal = new java . util . concurrent . CountDownLatch ( 1 ) ; globals . put ( "$Latch" , doneSignal ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaMetadataTest . kAgent , test . ws . prova . test2 . ProvaMetadataTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; long startTime = java . lang . System . currentTimeMillis ( ) ; try { for ( int i = 0 ; i < maxCount ; i ++ ) { int shift = i % 32 ; ws . prova . kernel2 . ProvaList terms = ws . prova . reference2 . ProvaListImpl . create ( new ws . prova . kernel2 . ProvaObject [ ] { ws . prova . reference2 . ProvaConstantImpl . create ( ( "<sp>ms" 0 + shift ) ) , ws . prova . reference2 . ProvaConstantImpl . create ( "async" ) , ws . prova . reference2 . ProvaConstantImpl . create ( 0 ) , ws . prova . reference2 . ProvaConstantImpl . create ( "request" ) , ws . prova . reference2 . ProvaListImpl . create ( new ws . prova . kernel2 . ProvaObject [ ] { ws . prova . reference2 . ProvaConstantImpl . create ( "login" ) , ws . prova . reference2 . ProvaConstantImpl . create ( ( "user" + shift ) ) , ws . prova . reference2 . ProvaConstantImpl . create ( "<sp>ms" 1 ) } ) } ) ; prova . addMsg ( terms ) ; ws . prova . kernel2 . ProvaList terms2 = ws . prova . reference2 . ProvaListImpl . create ( new ws . prova . kernel2 . ProvaObject [ ] { ws . prova . reference2 . ProvaConstantImpl . create ( ( "<sp>ms" 0 + shift ) ) , ws . prova . reference2 . ProvaConstantImpl . create ( "async" ) , ws . prova . reference2 . ProvaConstantImpl . create ( 0 ) , ws . prova . reference2 . ProvaConstantImpl . create ( "request" ) , ws . prova . reference2 . ProvaListImpl . create ( new ws . prova . kernel2 . ProvaObject [ ] { ws . prova . reference2 . ProvaConstantImpl . create ( "login" ) , ws . prova . reference2 . ProvaConstantImpl . create ( ( "user" + shift ) ) , ws . prova . reference2 . ProvaConstantImpl . create ( "<sp>ms" 2 ) } ) } ) ; prova . addMsg ( terms2 ) ; ws . prova . kernel2 . ProvaList terms3 = ws . prova . reference2 . ProvaListImpl . create ( new ws . prova . kernel2 . ProvaObject [ ] { ws . prova . reference2 . ProvaConstantImpl . create ( ( "<sp>ms" 0 + shift ) ) , ws . prova . reference2 . ProvaConstantImpl . create ( "async" ) , ws . prova . reference2 . ProvaConstantImpl . create ( 0 ) , ws . prova . reference2 . ProvaConstantImpl . create ( "request" ) , ws . prova . reference2 . ProvaListImpl . create ( new ws . prova . kernel2 . ProvaObject [ ] { ws . prova . reference2 . ProvaConstantImpl . create ( "logout" ) , ws . prova . reference2 . ProvaConstantImpl . create ( ( "user" + shift ) ) , ws . prova . reference2 . ProvaConstantImpl . create ( "<sp>ms" 1 ) } ) } ) ; prova . addMsg ( terms3 ) ; java . lang . Thread . sleep ( 0 , 10000 ) ; } long diff0 = ( java . lang . System . currentTimeMillis ( ) ) - startTime ; System . out . println ( ( ( "All<sp>messages<sp>sent<sp>in<sp>" + diff0 ) + "<sp>ms" ) ) ; doneSignal . await ( 5 , TimeUnit . SECONDS ) ; long diff = ( java . lang . System . currentTimeMillis ( ) ) - startTime ; System . out . println ( ( ( ( ( count . get ( ) ) + "<sp>ms" 3 ) + diff ) + "<sp>ms" ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Unexpected<sp>exception:<sp>" + ( e . getLocalizedMessage ( ) ) ) ) ; } } get ( ) { return count ; } | org . junit . Assert . assertEquals ( maxCount , count . get ( ) ) |
shouldSupportHeadersForResponses ( ) { stubClient . respond ( com . spotify . apollo . Response . < okio . ByteString > ok ( ) . withHeader ( "foo" , "bar" ) ) . to ( "http://ping" ) ; com . spotify . apollo . Response reply = getResponse ( "http://ping" ) . toCompletableFuture ( ) . get ( ) ; "<AssertPlaceHolder>" ; } header ( java . lang . String ) { return internalHeadersImpl ( ) . get ( name ) ; } | org . junit . Assert . assertThat ( reply . header ( "foo" ) . get ( ) , org . hamcrest . CoreMatchers . equalTo ( "bar" ) ) |
testVLongRandom ( ) { int count = 1024 * 1024 ; long [ ] data = new long [ count ] ; java . util . Random rng = new java . util . Random ( ) ; for ( int i = 0 ; i < ( data . length ) ; ++ i ) { int shift = ( rng . nextInt ( Long . SIZE ) ) + 1 ; long mask = ( 1L << shift ) - 1 ; long a = ( ( long ) ( rng . nextInt ( ) ) ) << 32 ; long b = ( ( long ) ( rng . nextInt ( ) ) ) & 4294967295L ; data [ i ] = ( a + b ) & mask ; } org . apache . hadoop . fs . FSDataOutputStream out = fs . create ( path ) ; for ( int i = 0 ; i < ( data . length ) ; ++ i ) { org . apache . hadoop . io . file . tfile . Utils . writeVLong ( out , data [ i ] ) ; } out . close ( ) ; org . apache . hadoop . fs . FSDataInputStream in = fs . open ( path ) ; for ( int i = 0 ; i < ( data . length ) ; ++ i ) { "<AssertPlaceHolder>" ; } in . close ( ) ; fs . delete ( path , false ) ; } readVLong ( java . io . DataInput ) { int firstByte = in . readByte ( ) ; if ( firstByte >= ( - 32 ) ) { return firstByte ; } switch ( ( firstByte + 128 ) / 8 ) { case 11 : case 10 : case 9 : case 8 : case 7 : return ( ( firstByte + 52 ) << 8 ) | ( in . readUnsignedByte ( ) ) ; case 6 : case 5 : case 4 : case 3 : return ( ( firstByte + 88 ) << 16 ) | ( in . readUnsignedShort ( ) ) ; case 2 : case 1 : return ( ( ( firstByte + 112 ) << 24 ) | ( ( in . readUnsignedShort ( ) ) << 8 ) ) | ( in . readUnsignedByte ( ) ) ; case 0 : int len = firstByte + 129 ; switch ( len ) { case 4 : return in . readInt ( ) ; case 5 : return ( ( ( long ) ( in . readInt ( ) ) ) << 8 ) | ( in . readUnsignedByte ( ) ) ; case 6 : return ( ( ( long ) ( in . readInt ( ) ) ) << 16 ) | ( in . readUnsignedShort ( ) ) ; case 7 : return ( ( ( ( long ) ( in . readInt ( ) ) ) << 24 ) | ( ( in . readUnsignedShort ( ) ) << 8 ) ) | ( in . readUnsignedByte ( ) ) ; case 8 : return in . readLong ( ) ; default : throw new java . io . IOException ( "Corrupted<sp>VLong<sp>encoding" ) ; } default : throw new java . lang . RuntimeException ( "Internal<sp>error" ) ; } } | org . junit . Assert . assertEquals ( org . apache . hadoop . io . file . tfile . Utils . readVLong ( in ) , data [ i ] ) |
validateSetTezJarLocalResourcesDefinedExistingDirectoryIgnored ( ) { java . net . URL [ ] cp = ( ( java . net . URLClassLoader ) ( java . lang . ClassLoader . getSystemClassLoader ( ) ) ) . getURLs ( ) ; java . lang . StringBuffer buffer = new java . lang . StringBuffer ( ) ; for ( java . net . URL url : cp ) { buffer . append ( url . toExternalForm ( ) ) ; buffer . append ( "," ) ; } org . apache . tez . dag . api . TezConfiguration conf = new org . apache . tez . dag . api . TezConfiguration ( ) ; conf . set ( TezConfiguration . TEZ_LIB_URIS , buffer . toString ( ) ) ; conf . setBoolean ( TezConfiguration . TEZ_IGNORE_LIB_URIS , true ) ; org . apache . hadoop . security . Credentials credentials = new org . apache . hadoop . security . Credentials ( ) ; java . util . Map < java . lang . String , org . apache . hadoop . yarn . api . records . LocalResource > localizedMap = org . apache . tez . client . TezClientUtils . setupTezJarsLocalResources ( conf , credentials ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( headIndex ) == ( splits . size ( ) ) ; } | org . junit . Assert . assertTrue ( localizedMap . isEmpty ( ) ) |
testWithImpossibleTime ( ) { results = com . wanasit . chrono . Chrono . Parse ( "0<sp>hours<sp>ago" , refDate ) ; "<AssertPlaceHolder>" ; } Parse ( java . lang . String , java . util . Date ) { return com . wanasit . chrono . Chrono . standard . parse ( text , refDate ) ; } | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testHasGlobalAction ( ) { com . eclipsesource . tabris . internal . ui . ActionDescriptor descriptor = mock ( com . eclipsesource . tabris . internal . ui . ActionDescriptor . class ) ; when ( descriptor . getId ( ) ) . thenReturn ( "foo" ) ; uiDescriptor . add ( descriptor ) ; com . eclipsesource . tabris . internal . ui . RemoteUI remoteUI = mock ( com . eclipsesource . tabris . internal . ui . RemoteUI . class ) ; when ( remoteUI . getPageParent ( ) ) . thenReturn ( shell ) ; com . eclipsesource . tabris . internal . ui . Controller controller = new com . eclipsesource . tabris . internal . ui . Controller ( remoteUI , uiDescriptor ) ; controller . createGlobalActions ( ui ) ; boolean hasAction = controller . hasAction ( "foo" ) ; "<AssertPlaceHolder>" ; } hasAction ( java . lang . String ) { com . eclipsesource . tabris . internal . ui . rendering . ActionRenderer result = findActionInGlobalActions ( id ) ; if ( result == null ) { result = findActionInPageActions ( id ) ; } return result != null ; } | org . junit . Assert . assertTrue ( hasAction ) |
testValidPoint ( ) { org . geoserver . web . StringValidatable validatable = new org . geoserver . web . StringValidatable ( "abc.def" ) ; new org . geoserver . web . data . resource . BasicResourceConfig . ResourceNameValidator ( ) . validate ( validatable ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return errorList . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( validatable . isValid ( ) ) |
increaseConcurrentOperationCountFailTest ( ) { int noOfConcurrentOperations = com . vmware . vrack . hms . common . util . CommonProperties . getMaxConcurrentTasksPerNode ( ) ; for ( int currentCount = 1 ; currentCount < ( noOfConcurrentOperations + 1 ) ; ++ currentCount ) { com . vmware . vrack . hms . node . NodeMetaInfoProvider . increaseConcurrentOperationCount ( "N1" ) ; } java . lang . Boolean lockAcquired = com . vmware . vrack . hms . node . NodeMetaInfoProvider . increaseConcurrentOperationCount ( "N1" ) ; "<AssertPlaceHolder>" ; } increaseConcurrentOperationCount ( java . lang . String ) { boolean canPerformOperationOnNode = true ; com . vmware . vrack . hms . node . NodeMetaInfoProvider . nodeServiceLock . lock ( ) ; try { com . vmware . vrack . hms . node . NodeMetaInfoProvider . logger . debug ( ( "Got<sp>the<sp>lock<sp>for<sp>determining<sp>feasibility<sp>to<sp>call<sp>operation<sp>service<sp>for<sp>node:" + nodeId ) ) ; java . lang . Integer currentOperationCount = ( ( java . lang . Integer ) ( com . vmware . vrack . hms . node . NodeMetaInfoProvider . nodeMetaInfoMap . get ( nodeId ) ) ) ; if ( currentOperationCount == null ) { currentOperationCount = 0 ; } int maxConcurrentTasksPerNode = com . vmware . vrack . hms . common . util . CommonProperties . getMaxConcurrentTasksPerNode ( ) ; if ( currentOperationCount >= maxConcurrentTasksPerNode ) { com . vmware . vrack . hms . node . NodeMetaInfoProvider . logger . warn ( ( ( ( "Will<sp>not<sp>perform<sp>further<sp>operation.<sp>Reached<sp>Max<sp>concurrent<sp>operation<sp>count<sp>for<sp>Node:" + nodeId ) + ".<sp>Current<sp>count:" ) + maxConcurrentTasksPerNode ) ) ; canPerformOperationOnNode = false ; } else { ++ currentOperationCount ; com . vmware . vrack . hms . node . NodeMetaInfoProvider . logger . debug ( ( ( ( "Node<sp>can<sp>perform<sp>operation.<sp>Increasing<sp>current<sp>concurrent<sp>operation<sp>count<sp>for<sp>Node:" + nodeId ) + "<sp>set<sp>to:" ) + currentOperationCount ) ) ; com . vmware . vrack . hms . node . NodeMetaInfoProvider . nodeMetaInfoMap . put ( nodeId , currentOperationCount ) ; } } catch ( java . lang . Exception ex ) { com . vmware . vrack . hms . node . NodeMetaInfoProvider . logger . warn ( ( "Error<sp>while<sp>checking<sp>for<sp>current<sp>operation<sp>count<sp>for<sp>Node:" + nodeId ) , ex ) ; } finally { com . vmware . vrack . hms . node . NodeMetaInfoProvider . nodeServiceLock . unlock ( ) ; } return canPerformOperationOnNode ; } | org . junit . Assert . assertFalse ( lockAcquired ) |
testNodeStatusWithEmptyNodeLabels ( ) { org . apache . hadoop . yarn . api . records . NodeId nodeId = org . apache . hadoop . yarn . api . records . NodeId . newInstance ( "host0" , 0 ) ; org . apache . hadoop . yarn . client . cli . NodeCLI cli = new org . apache . hadoop . yarn . client . cli . NodeCLI ( ) ; when ( client . getNodeReports ( ) ) . thenReturn ( getNodeReports ( 3 , NodeState . RUNNING ) ) ; cli . setClient ( client ) ; cli . setSysOutPrintStream ( sysOut ) ; cli . setSysErrPrintStream ( sysErr ) ; int result = cli . run ( new java . lang . String [ ] { "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 6 , nodeId . toString ( ) } ) ; "<AssertPlaceHolder>" ; verify ( client ) . getNodeReports ( ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintWriter pw = new java . io . PrintWriter ( baos ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 3 ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 1 ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 4 ) ; pw . println ( "\tNode-State<sp>:<sp>RUNNING" ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 5 ) ; pw . println ( ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 0 + ( org . apache . commons . lang . time . DateFormatUtils . format ( new java . util . Date ( 0 ) , "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 7 ) ) ) ) ; pw . println ( "\tHealth-Report<sp>:<sp>" ) ; pw . println ( "\tContainers<sp>:<sp>0" ) ; pw . println ( "\tMemory-Used<sp>:<sp>0MB" ) ; pw . println ( "\tMemory-Capacity<sp>:<sp>0MB" ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 2 ) ; pw . println ( "\tCPU-Capacity<sp>:<sp>0<sp>vcores" ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 9 ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" ) ; pw . println ( "\tGPU-Capacity<sp>:<sp>0<sp>gpus" 8 ) ; pw . println ( "\tResource<sp>Utilization<sp>by<sp>Node<sp>:<sp>PMem:2048<sp>MB,<sp>VMem:4096<sp>MB,<sp>VCores:8.0" ) ; pw . println ( "\tResource<sp>Utilization<sp>by<sp>Node<sp>:<sp>PMem:2048<sp>MB,<sp>VMem:4096<sp>MB,<sp>VCores:8.0" 0 ) ; pw . close ( ) ; java . lang . String nodeStatusStr = baos . toString ( "UTF-8" ) ; verify ( sysOut , times ( 1 ) ) . println ( isA ( java . lang . String . class ) ) ; verify ( sysOut ) . println ( nodeStatusStr ) ; } toString ( ) { if ( ( json ) == null ) { return "Test<sp>codec<sp>" + ( id ) ; } else { return json . toString ( ) ; } } | org . junit . Assert . assertEquals ( 0 , result ) |
testGeldigBuitenlandsePlaatsOfRegioOnbekend ( ) { final nl . bzk . brp . bijhouding . bericht . model . GeboorteElement geboorte = new nl . bzk . brp . bijhouding . bericht . model . GeboorteElement ( attributes , new nl . bzk . brp . bijhouding . bericht . model . DatumElement ( 20160502 ) , null , null , null , null , nl . bzk . brp . bijhouding . bericht . model . GeboorteElementTest . LOCATIE_OMSCHRIJVING , nl . bzk . brp . bijhouding . bericht . model . GeboorteElementTest . LANDGEBIEDCODE_ONBEKEND ) ; java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = geboorte . valideer ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
longValueWithNull ( ) { final org . jboss . msc . value . Value < java . lang . Long > value = new org . jboss . msc . value . DefaultValue < java . lang . Long > ( new org . jboss . msc . value . ImmediateValue < java . lang . Long > ( null ) , new org . jboss . msc . value . ImmediateValue < java . lang . Long > ( 4L ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return ( count ) ++ ; } | org . junit . Assert . assertEquals ( 4L , ( ( long ) ( value . getValue ( ) ) ) ) |
loadMarketplaceHistoryWithinPeriod ( ) { createMarketplaceHistoryEntries ( ) ; org . oscm . domobjects . MarketplaceHistory mp = dao . loadMarketplaceHistoryWithinPeriod ( org . oscm . billingservice . dao . SharesDataRetrievalServiceBean2IT . MARKETPLACE_KEY1 , org . oscm . billingservice . dao . SharesDataRetrievalServiceBean2IT . PERIOD_END ) ; "<AssertPlaceHolder>" ; } getObjKey ( ) { return objKey ; } | org . junit . Assert . assertEquals ( org . oscm . billingservice . dao . SharesDataRetrievalServiceBean2IT . MARKETPLACE_KEY1 , mp . getObjKey ( ) ) |
testDeleteExpectedPartitionValues ( ) { org . finra . herd . model . jpa . PartitionKeyGroupEntity partitionKeyGroupEntity = partitionKeyGroupDaoTestHelper . createPartitionKeyGroupEntity ( org . finra . herd . service . PARTITION_KEY_GROUP ) ; expectedPartitionValueDaoTestHelper . createExpectedPartitionValueEntities ( partitionKeyGroupEntity , expectedPartitionValueDaoTestHelper . getTestUnsortedExpectedPartitionValues ( ) ) ; org . finra . herd . model . api . xml . ExpectedPartitionValuesDeleteRequest request = expectedPartitionValueServiceTestHelper . createExpectedPartitionValuesDeleteRequest ( org . finra . herd . service . PARTITION_KEY_GROUP , expectedPartitionValueDaoTestHelper . getTestUnsortedExpectedPartitionValues ( ) ) ; org . finra . herd . model . api . xml . ExpectedPartitionValuesInformation resultPartitionValuesInformation = expectedPartitionValueService . deleteExpectedPartitionValues ( request ) ; expectedPartitionValueServiceTestHelper . validateExpectedPartitionValuesInformation ( org . finra . herd . service . PARTITION_KEY_GROUP , expectedPartitionValueDaoTestHelper . getTestSortedExpectedPartitionValues ( ) , resultPartitionValuesInformation ) ; "<AssertPlaceHolder>" ; } getExpectedPartitionValues ( ) { return expectedPartitionValues ; } | org . junit . Assert . assertEquals ( 0 , partitionKeyGroupEntity . getExpectedPartitionValues ( ) . size ( ) ) |
shouldReturnNullForPlayerArgOfResetCommand ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "reset" , "Beds" , "" } ; java . util . List < java . lang . String > completionResult = underTest . onTabComplete ( commandSender , command , null , args ) ; "<AssertPlaceHolder>" ; } onTabComplete ( org . bukkit . command . CommandSender , org . bukkit . command . Command , java . lang . String , java . lang . String [ ] ) { if ( shouldReturnPlayerList ( command , args ) ) { return null ; } java . lang . String aachCommand = args [ 0 ] ; java . util . Collection < java . lang . String > options = java . util . Collections . emptyList ( ) ; if ( ( ( args . length ) == 2 ) && ( "reset" . equalsIgnoreCase ( aachCommand ) ) ) { options = enabledCategoriesWithSubcategories ; } else if ( ( ( args . length ) == 2 ) && ( "give" . equalsIgnoreCase ( aachCommand ) ) ) { options = mainConfig . getShallowKeys ( CommandAchievements . COMMANDS . toString ( ) ) ; } else if ( ( ( args . length ) == 2 ) && ( org . apache . commons . lang3 . StringUtils . equalsAnyIgnoreCase ( aachCommand , "check" , "delete" ) ) ) { options = namesToDisplayNames . keySet ( ) ; } else if ( ( ( args . length ) == 2 ) && ( "inspect" . equalsIgnoreCase ( aachCommand ) ) ) { options = displayNamesToNames . keySet ( ) ; } else if ( ( ( args . length ) == 2 ) && ( "add" . equalsIgnoreCase ( aachCommand ) ) ) { options = java . util . Collections . singleton ( "1" ) ; } else if ( ( ( args . length ) == 3 ) && ( "add" . equalsIgnoreCase ( aachCommand ) ) ) { options = enabledCategoriesWithSubcategories ; } else if ( ( args . length ) == 1 ) { options = commandSpecs . stream ( ) . filter ( ( cs ) -> ( cs . permission ( ) . isEmpty ( ) ) || ( sender . hasPermission ( ( "achievement." + ( cs . permission ( ) ) ) ) ) ) . map ( CommandSpec :: name ) . collect ( java . util . stream . Collectors . toSet ( ) ) ; } return getPartialList ( options , args [ ( ( args . length ) - 1 ) ] ) ; } | org . junit . Assert . assertNull ( completionResult ) |
testJsonArrayOfPrimitives ( ) { java . lang . String expected = "[\"a\",1,3.2,null,true]" ; java . lang . Object [ ] array = new java . lang . Object [ ] { "a" , 1 , 3.2 , null , true } ; java . lang . String json = genson . serialize ( array ) ; "<AssertPlaceHolder>" ; } serialize ( java . lang . Object ) { com . owlike . genson . StringWriter sw = new com . owlike . genson . StringWriter ( ) ; com . owlike . genson . ObjectWriter writer = createWriter ( sw ) ; if ( object == null ) serializeNull ( writer ) ; else serialize ( object , object . getClass ( ) , writer , new com . owlike . genson . Context ( this ) ) ; return sw . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , json ) |
testCreateDisk ( ) { org . easymock . EasyMock . expect ( computeRpcMock . createDisk ( com . google . cloud . compute . deprecated . ComputeImplTest . DISK_ID . getZone ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . DISK . toPb ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . EMPTY_RPC_OPTIONS ) ) . andReturn ( zoneOperation . toPb ( ) ) ; org . easymock . EasyMock . replay ( computeRpcMock ) ; compute = options . getService ( ) ; com . google . cloud . compute . deprecated . DiskId diskId = com . google . cloud . compute . deprecated . DiskId . of ( "zone" , "disk" ) ; com . google . cloud . compute . deprecated . DiskTypeId diskTypeId = com . google . cloud . compute . deprecated . DiskTypeId . of ( "zone" , "diskType" ) ; com . google . cloud . compute . deprecated . DiskInfo disk = com . google . cloud . compute . deprecated . ComputeImplTest . DISK . toBuilder ( ) . setDiskId ( diskId ) . setConfiguration ( com . google . cloud . compute . deprecated . StandardDiskConfiguration . of ( diskTypeId ) ) . build ( ) ; com . google . cloud . compute . deprecated . Operation operation = compute . create ( disk ) ; "<AssertPlaceHolder>" ; } create ( com . google . cloud . compute . v1 . stub . RegionInstanceGroupManagerStubSettings ) { return new com . google . cloud . compute . v1 . RegionInstanceGroupManagerSettings . Builder ( stub . toBuilder ( ) ) . build ( ) ; } | org . junit . Assert . assertEquals ( zoneOperation , operation ) |
size_cyclophane_odd ( ) { int [ ] [ ] cyclophane_even = org . openscience . cdk . graph . InitialCyclesTest . cyclophane_even ( ) ; org . openscience . cdk . graph . RelevantCycles relevant = new org . openscience . cdk . graph . RelevantCycles ( cyclophane_even ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; } | org . junit . Assert . assertThat ( relevant . size ( ) , org . hamcrest . CoreMatchers . is ( 3 ) ) |
testDrop ( ) { es . ieci . tecdoc . fwktd . sql . node . schema . Table table = new es . ieci . tecdoc . fwktd . sql . node . schema . Table ( ) ; table . setName ( "anyGivenTable" ) ; table . setSchemaName ( "anyGivenSchema" ) ; es . ieci . tecdoc . fwktd . sql . node . statement . drop . Drop drop = new es . ieci . tecdoc . fwktd . sql . node . statement . drop . Drop ( table ) ; statementRenderer . visit ( drop ) ; "<AssertPlaceHolder>" ; } getSqlString ( ) { return sqlString ; } | org . junit . Assert . assertNotNull ( drop . getSqlString ( ) ) |
testCapitalizeWords8 ( ) { java . lang . Object s = "a....ze<sp>tyu<sp>iop" ; java . lang . String expResult = "A....Ze<sp>Tyu<sp>Iop" ; java . lang . String result = org . thymeleaf . util . StringUtils . capitalizeWords ( s , "<sp>." ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testPostSiteDocument ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
shouldKnowMultipleTimeWindows ( ) { com . graphhopper . jsprit . core . problem . job . Service s = Service . Builder . newInstance ( "s" ) . setLocation ( com . graphhopper . jsprit . core . problem . Location . newInstance ( "loc" ) ) . addTimeWindow ( com . graphhopper . jsprit . core . problem . solution . route . activity . TimeWindow . newInstance ( 0.0 , 10.0 ) ) . addTimeWindow ( com . graphhopper . jsprit . core . problem . solution . route . activity . TimeWindow . newInstance ( 20.0 , 30.0 ) ) . setName ( "name" ) . build ( ) ; "<AssertPlaceHolder>" ; } getTimeWindows ( ) { return java . util . Collections . unmodifiableCollection ( timeWindows ) ; } | org . junit . Assert . assertEquals ( 2 , s . getTimeWindows ( ) . size ( ) ) |
shouldFindFile ( ) { final java . lang . String targetDir = toOSPath ( "target" , "test-classes" ) ; final java . lang . String className = getClass ( ) . getName ( ) ; "<AssertPlaceHolder>" ; } binaryFileExists ( java . lang . String , java . lang . String ) { return ( ( com . github . bmsantos . core . cola . utils . ColaUtils . isSet ( dir ) ) && ( com . github . bmsantos . core . cola . utils . ColaUtils . isSet ( clazz ) ) ) && ( new java . io . File ( ( ( dir + ( separator ) ) + ( com . github . bmsantos . core . cola . utils . ColaUtils . binaryToOsClass ( clazz ) ) ) ) . exists ( ) ) ; } | org . junit . Assert . assertThat ( binaryFileExists ( targetDir , className ) , org . hamcrest . CoreMatchers . is ( true ) ) |
findGeoServerCASRESTPublisherMethodTest ( ) { java . lang . reflect . Method method = it . geosolutions . geoserver . rest . cas . GeoServerCASRESTPublisher . class . getMethod ( "publishShp" , java . lang . String . class , java . lang . String . class , org . apache . commons . httpclient . NameValuePair [ ] . class , java . lang . String . class , GeoServerRESTPublisher . UploadMethod . class , java . net . URI . class , java . lang . String . class , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( method ) |
removeInformationSpace ( ) { net . sharkfw . system . L . d ( ( "Using<sp>database:<sp>" + ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . DB10 ) ) , this ) ; net . sharkfw . knowledgeBase . persistent . sql . SqlSharkKB sqlSharkKB = new net . sharkfw . knowledgeBase . persistent . sql . SqlSharkKB ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . CONNECTION10 , "org.sqlite.JDBC" ) ; net . sharkfw . asip . ASIPSpace space = sqlSharkKB . createASIPSpace ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . set1 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . set2 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . peerSet1 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . peerSemanticTag1 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . peerSet2 , null , null , ASIPSpace . DIRECTION_IN ) ; net . sharkfw . asip . ASIPSpace space2 = sqlSharkKB . createASIPSpace ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . set2 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . set1 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . peerSet3 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . peerSemanticTag2 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . peerSet1 , null , null , ASIPSpace . DIRECTION_IN ) ; net . sharkfw . asip . ASIPSpace space3 = sqlSharkKB . createASIPSpace ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . semanticTag5 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . semanticTag4 , null , null , null , null , null , ASIPSpace . DIRECTION_IN ) ; sqlSharkKB . addInformation ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoName1 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoContent1 , space ) ; sqlSharkKB . addInformation ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoName2 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoContent2 , space2 ) ; sqlSharkKB . addInformation ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoName3 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoContent3 , space2 ) ; sqlSharkKB . addInformation ( net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoName4 , net . sharkfw . knowledgeBase . persistent . sql . SqlAsipInformationTest . infoContent4 , space3 ) ; int allInfos = 0 ; java . util . Iterator < net . sharkfw . asip . ASIPInformationSpace > allInformationSpaces = sqlSharkKB . getAllInformationSpaces ( ) ; while ( allInformationSpaces . hasNext ( ) ) { net . sharkfw . asip . ASIPInformationSpace next = allInformationSpaces . next ( ) ; allInfos += next . numberOfInformations ( ) ; } net . sharkfw . system . L . d ( ( "All<sp>infos:<sp>" + allInfos ) , this ) ; sqlSharkKB . removeInformationSpace ( space ) ; int allInfos2 = 0 ; java . util . Iterator < net . sharkfw . asip . ASIPInformationSpace > allInformationSpaces2 = sqlSharkKB . getAllInformationSpaces ( ) ; while ( allInformationSpaces2 . hasNext ( ) ) { net . sharkfw . asip . ASIPInformationSpace next = allInformationSpaces2 . next ( ) ; allInfos2 += next . numberOfInformations ( ) ; } net . sharkfw . system . L . d ( ( "All<sp>infos2:<sp>" + allInfos2 ) , this ) ; java . util . Iterator < net . sharkfw . asip . ASIPInformationSpace > informationSpacesSecond = sqlSharkKB . informationSpaces ( ) ; int numberOfSpaces = 0 ; while ( informationSpacesSecond . hasNext ( ) ) { numberOfSpaces ++ ; informationSpacesSecond . next ( ) ; } "<AssertPlaceHolder>" ; } next ( ) { return this . nextElement ( ) ; } | org . junit . Assert . assertEquals ( 2 , numberOfSpaces ) |
testNoSupportedPaths ( ) { context . registerInjectActivateService ( cugExclude , com . google . common . collect . ImmutableMap . of ( "principalNames" , new java . lang . String [ ] { org . apache . jackrabbit . oak . spi . security . authorization . cug . impl . CugConfigurationOsgiTest . ANY_PRINCIPAL_NAME } ) ) ; context . registerInjectActivateService ( cugConfiguration , com . google . common . collect . ImmutableMap . of ( CugConstants . PARAM_CUG_ENABLED , true , CugConstants . PARAM_CUG_SUPPORTED_PATHS , new java . lang . String [ 0 ] ) ) ; org . apache . jackrabbit . oak . spi . security . authorization . AuthorizationConfiguration config = context . getService ( org . apache . jackrabbit . oak . spi . security . authorization . AuthorizationConfiguration . class ) ; org . apache . jackrabbit . oak . spi . security . authorization . permission . PermissionProvider permissionProvider = config . getPermissionProvider ( root , wspName , com . google . common . collect . ImmutableSet . of ( new org . apache . jackrabbit . oak . spi . security . principal . PrincipalImpl ( org . apache . jackrabbit . oak . spi . security . authorization . cug . impl . CugConfigurationOsgiTest . ANY_PRINCIPAL_NAME ) ) ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return org . apache . jackrabbit . oak . spi . security . authorization . permission . EmptyPermissionProvider . INSTANCE ; } | org . junit . Assert . assertSame ( org . apache . jackrabbit . oak . spi . security . authorization . permission . EmptyPermissionProvider . getInstance ( ) , permissionProvider ) |
testSkipBoolean ( ) { long sentinel = Long . MAX_VALUE ; org . apache . trevni . OutputBuffer out = new org . apache . trevni . OutputBuffer ( ) ; out . writeValue ( false , ValueType . BOOLEAN ) ; out . writeLong ( sentinel ) ; org . apache . trevni . InputBuffer in = new org . apache . trevni . InputBuffer ( new org . apache . trevni . InputBytes ( out . toByteArray ( ) ) ) ; in . skipValue ( ValueType . BOOLEAN ) ; "<AssertPlaceHolder>" ; } readLong ( ) { org . apache . avro . io . parsing . Symbol actual = parser . advance ( Symbol . LONG ) ; if ( actual == ( org . apache . avro . io . parsing . Symbol . INT ) ) { return in . readInt ( ) ; } else if ( actual == ( org . apache . avro . io . parsing . Symbol . DOUBLE ) ) { return ( ( long ) ( in . readDouble ( ) ) ) ; } else { assert actual == ( org . apache . avro . io . parsing . Symbol . LONG ) ; return in . readLong ( ) ; } } | org . junit . Assert . assertEquals ( sentinel , in . readLong ( ) ) |
testLogRecovery ( ) { int iterations = 10 ; for ( int i = 0 ; i < iterations ; i ++ ) { boolean sync = ( ( i % 2 ) == 0 ) ? true : false ; journal . write ( java . nio . ByteBuffer . wrap ( new java . lang . String ( ( "DATA" + i ) ) . getBytes ( "UTF-8" ) ) , sync ) ; } journal . close ( ) ; journal . open ( ) ; int i = 0 ; for ( org . fusesource . hawtjournal . api . Location location : journal ) { java . nio . ByteBuffer buffer = journal . read ( location ) ; "<AssertPlaceHolder>" ; } } read ( org . fusesource . hawtjournal . api . Location ) { org . fusesource . hawtbuf . Buffer buffer = accessor . readLocation ( location ) ; return buffer . toByteBuffer ( ) ; } | org . junit . Assert . assertEquals ( ( "DATA" + ( i ++ ) ) , new java . lang . String ( buffer . array ( ) , "UTF-8" ) ) |
testCreateEntity_MayaLink ( ) { handler . addRequest ( false , "POST" , "/qcbin/rest/domains/domain/projects/project/defects/86/defect-links" , 201 ) . expectXmlBody ( "<defect-link><comment>There</comment><first-endpoint-id>86</first-endpoint-id></defect-link>" ) . content ( "entityServiceTest_defectLink.xml" ) ; handler . async ( ) ; addEntityListener ( new com . hp . alm . ali . idea . services . EntityLoaded ( handler , "defect-link" , 2763 , EntityListener . Event . CREATE ) ) ; com . hp . alm . ali . idea . model . Entity link = new com . hp . alm . ali . idea . model . Entity ( "defect-link" ) ; link . setProperty ( "first-endpoint-id" , "86" ) ; link . setProperty ( "comment" , "There" ) ; com . hp . alm . ali . idea . model . Entity created = entityService . createEntity ( link , false ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( 2763 , created . getId ( ) ) |
testWebServiceEP ( ) { org . apache . tuscany . sca . implementation . java . JavaImplementation type = javaImplementationFactory . createJavaImplementation ( ) ; processor . visitClass ( org . apache . tuscany . sca . implementation . java . introspect . impl . JAXWSProcessorTestCase . Foo2Impl . class , type ) ; org . apache . tuscany . sca . assembly . Service service = org . apache . tuscany . sca . implementation . java . introspect . impl . ModelHelper . getService ( type , "Foo2" ) ; "<AssertPlaceHolder>" ; } getService ( org . apache . tuscany . sca . implementation . java . JavaImplementation , java . lang . String ) { for ( org . apache . tuscany . sca . assembly . Service svc : type . getServices ( ) ) { if ( svc . getName ( ) . equals ( name ) ) { return svc ; } } return null ; } | org . junit . Assert . assertNotNull ( service ) |
shouldNotFilterAnyArchetypeReferencesNoEndDate ( ) { org . joda . time . DateTime startDateTime = new org . joda . time . DateTime ( "2013-03-01" ) ; org . joda . time . DateTime endDateTime = null ; java . util . Collection < se . cambio . cds . model . instance . ArchetypeReference > ehrData = generateContactArchetypeReferences ( ) ; java . util . Set < se . cambio . cds . model . instance . ArchetypeReference > filteredEhrARs = ehrDataFilterManager . filterEHRData ( startDateTime , endDateTime , ehrData ) ; "<AssertPlaceHolder>" ; } filterEHRData ( org . joda . time . DateTime , org . joda . time . DateTime , se . cambio . cds . util . Collection ) { se . cambio . cds . util . Set < se . cambio . cds . model . instance . ArchetypeReference > ehrDataAux = new se . cambio . cds . util . HashSet ( ) ; for ( se . cambio . cds . model . instance . ArchetypeReference archetypeReference : ehrData ) { boolean useAR = true ; org . joda . time . DateTime dateTime = dateTimeARFinder . getDateTime ( archetypeReference ) ; if ( ( ( dateTime == null ) || ( ( endDateTime != null ) && ( dateTime . isAfter ( endDateTime ) ) ) ) || ( ( startDateTime != null ) && ( dateTime . isBefore ( startDateTime ) ) ) ) { useAR = false ; if ( dateTime == null ) { org . slf4j . LoggerFactory . getLogger ( se . cambio . cds . util . EhrDataFilterManager . class ) . warn ( ( ( "Date<sp>time<sp>for<sp>Archetype<sp>Reference<sp>" + ( archetypeReference . getIdArchetype ( ) ) ) + "<sp>is<sp>null!" ) ) ; } } if ( useAR ) { ehrDataAux . add ( archetypeReference ) ; } } return ehrDataAux ; } | org . junit . Assert . assertEquals ( 2 , filteredEhrARs . size ( ) ) |
getDouble ( ) { final java . lang . Integer value = 44 ; final io . trane . ndbc . value . IntegerValue wrapper = new io . trane . ndbc . value . IntegerValue ( value ) ; "<AssertPlaceHolder>" ; } getDouble ( ) { return new java . lang . Double ( get ( ) ) ; } | org . junit . Assert . assertEquals ( new java . lang . Double ( value ) , wrapper . getDouble ( ) ) |
setNullOutputVlanId ( ) { flow . setOutputVlanId ( null ) ; "<AssertPlaceHolder>" ; } getOutputVlanId ( ) { org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . outputVlanId , flow . getOutputVlanId ( ) . intValue ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , flow . getOutputVlanId ( ) . intValue ( ) ) |
testTwoIf2 ( ) { instrument ( org . jacoco . core . test . validation . java5 . CyclomaticComplexityTest . TwoIf . class ) ; target . test ( ( - 1 ) ) ; final org . jacoco . core . analysis . ICounter complexity = analyze ( ) ; "<AssertPlaceHolder>" ; } getInstance ( int , int ) { if ( ( missed <= ( org . jacoco . core . internal . analysis . CounterImpl . SINGLETON_LIMIT ) ) && ( covered <= ( org . jacoco . core . internal . analysis . CounterImpl . SINGLETON_LIMIT ) ) ) { return org . jacoco . core . internal . analysis . CounterImpl . SINGLETONS [ missed ] [ covered ] ; } else { return new org . jacoco . core . internal . analysis . CounterImpl . Var ( missed , covered ) ; } } | org . junit . Assert . assertEquals ( org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 2 , 1 ) , complexity ) |
testActivitiesSinceUntil ( ) { if ( ! ( isV5OrHigher ( ) ) ) return ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( "ps" , "200" ) ; com . ibm . sbt . services . client . base . datahandlers . EntityList < com . ibm . sbt . services . client . connections . activities . Activity > activities = activityService . getMyActivities ( params ) ; for ( com . ibm . sbt . services . client . connections . activities . Activity activity : activities ) { if ( ! ( activity . isDeleted ( ) ) ) { activity . delete ( ) ; } } java . util . List < com . ibm . sbt . services . client . connections . activities . Activity > createdActivities = createActivities ( "Activities" , 5 , 1000 ) ; com . ibm . sbt . services . client . connections . activities . Activity sinceActivity = createdActivities . get ( 1 ) ; com . ibm . sbt . services . client . connections . activities . Activity untilActivity = createdActivities . get ( 3 ) ; params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( "nodetype" , "activity" ) ; params . put ( "since" , ( "" + ( sinceActivity . getPublished ( ) . getTime ( ) ) ) ) ; params . put ( "until" , ( "" + ( untilActivity . getPublished ( ) . getTime ( ) ) ) ) ; com . ibm . sbt . services . client . base . datahandlers . EntityList < com . ibm . sbt . services . client . connections . activities . Activity > myActivities = activityService . getMyActivities ( params ) ; System . out . println ( myActivities . size ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return count ; } | org . junit . Assert . assertEquals ( 2 , myActivities . size ( ) ) |
handle_shouldNotSetEmptyStringPropertiesToNullForAllowEmptyStringsAnnotation ( ) { org . openmrs . api . handler . OpenmrsObjectSaveHandlerTest . SomeClass obj = new org . openmrs . api . handler . OpenmrsObjectSaveHandlerTest . SomeClass ( "" ) ; new org . openmrs . api . handler . OpenmrsObjectSaveHandler ( ) . handle ( obj , null , null , null ) ; "<AssertPlaceHolder>" ; } getName ( ) { if ( getNames ( ) . isEmpty ( ) ) { if ( org . openmrs . Concept . log . isDebugEnabled ( ) ) { org . openmrs . Concept . log . debug ( ( "there<sp>are<sp>no<sp>names<sp>defined<sp>for:<sp>" + ( conceptId ) ) ) ; } return null ; } for ( java . util . Locale currentLocale : org . openmrs . util . LocaleUtility . getLocalesInOrder ( ) ) { org . openmrs . ConceptName preferredName = getPreferredName ( currentLocale ) ; if ( preferredName != null ) { return preferredName ; } org . openmrs . ConceptName fullySpecifiedName = getFullySpecifiedName ( currentLocale ) ; if ( fullySpecifiedName != null ) { return fullySpecifiedName ; } if ( ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( currentLocale . getCountry ( ) ) ) ) || ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( currentLocale . getVariant ( ) ) ) ) ) { java . util . Locale broaderLocale = new java . util . Locale ( currentLocale . getLanguage ( ) ) ; org . openmrs . ConceptName prefNameInBroaderLoc = getPreferredName ( broaderLocale ) ; if ( prefNameInBroaderLoc != null ) { return prefNameInBroaderLoc ; } org . openmrs . ConceptName fullySpecNameInBroaderLoc = getFullySpecifiedName ( broaderLocale ) ; if ( fullySpecNameInBroaderLoc != null ) { return fullySpecNameInBroaderLoc ; } } } for ( org . openmrs . ConceptName cn : getNames ( ) ) { if ( cn . isFullySpecifiedName ( ) ) { return cn ; } } if ( ! ( getSynonyms ( ) . isEmpty ( ) ) ) { return getSynonyms ( ) . iterator ( ) . next ( ) ; } return null ; } | org . junit . Assert . assertNotNull ( obj . getName ( ) ) |
singleNodeInitializationTest ( ) { org . dataconservancy . packaging . tool . impl . generator . PackageModelBuilderState state = bootstrap1 ( ) ; state . assembler = new org . dataconservancy . packaging . tool . impl . generator . mocks . FunctionalAssemblerMock ( folder . getRoot ( ) ) ; org . dataconservancy . packaging . tool . impl . generator . DomainObjectResourceBuilder serializer = new org . dataconservancy . packaging . tool . impl . generator . DomainObjectResourceBuilder ( ) ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; state . domainObjects . listSubjects ( ) . filterKeep ( ( s ) -> ! ( s . isAnon ( ) ) ) . forEachRemaining ( ( s ) -> count . incrementAndGet ( ) ) ; "<AssertPlaceHolder>" ; } getRoot ( ) { return nodeTree . getRoot ( ) ; } | org . junit . Assert . assertTrue ( ( ( count . get ( ) ) > 0 ) ) |
getActiveProfiles ( ) { java . util . List < org . apache . maven . shared . model . ModelProperty > modelProperties = new java . util . ArrayList < org . apache . maven . shared . model . ModelProperty > ( ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( org . apache . maven . project . builder . ProjectUri . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . Activation . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . Activation . Property . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . Activation . Property . name , "foo" ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . Activation . Property . value , "bar" ) ) ; org . apache . maven . shared . model . impl . DefaultModelDataSource dataSource = new org . apache . maven . shared . model . impl . DefaultModelDataSource ( modelProperties , org . apache . maven . project . builder . PomTransformer . MODEL_CONTAINER_FACTORIES ) ; java . util . List < org . apache . maven . shared . model . InterpolatorProperty > interpolatorProperties = new java . util . ArrayList < org . apache . maven . shared . model . InterpolatorProperty > ( ) ; interpolatorProperties . add ( new org . apache . maven . shared . model . InterpolatorProperty ( "${foo}" , "bar" ) ) ; org . apache . maven . project . builder . profile . ProfileContext ctx = new org . apache . maven . project . builder . profile . ProfileContext ( dataSource , null , null , interpolatorProperties ) ; java . util . Collection < org . apache . maven . shared . model . ModelContainer > profiles = ctx . getActiveProfiles ( ) ; "<AssertPlaceHolder>" ; } getActiveProfiles ( ) { if ( ( activeProfiles ) == null ) { activeProfiles = new java . util . ArrayList < java . lang . String > ( ) ; } return activeProfiles ; } | org . junit . Assert . assertTrue ( ( ( profiles . size ( ) ) == 1 ) ) |
testLargeEWAHCompressedBitmap ( ) { System . out . println ( "testing<sp>EWAH<sp>over<sp>a<sp>large<sp>array" ) ; com . googlecode . javaewah . EWAHCompressedBitmap myarray1 = new com . googlecode . javaewah . EWAHCompressedBitmap ( ) ; int N = 11000000 ; for ( int i = 0 ; i < N ; ++ i ) { myarray1 . set ( i ) ; } "<AssertPlaceHolder>" ; } sizeInBits ( ) { return this . sizeInBits ; } | org . junit . Assert . assertTrue ( ( ( myarray1 . sizeInBits ( ) ) == N ) ) |
testThenReturnNull ( ) { try { java . lang . Void result = client . service ( "serviceTest" ) . thenConsume ( new com . aldebaran . qi . Consumer < com . aldebaran . qi . Future < com . aldebaran . qi . AnyObject > > ( ) { @ com . aldebaran . qi . Override public void consume ( com . aldebaran . qi . Future < com . aldebaran . qi . AnyObject > arg ) { } } ) . get ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "get()<sp>must<sp>not<sp>fail" ) ; } } consume ( com . aldebaran . qi . Future ) { this . consumed = true ; switch ( future . get ( ) ) { case SleepThread . ERROR_VALUE : System . out . println ( "SleepFutureConsumer<sp>errored" ) ; throw new java . lang . Exception ( "SleepFutureConsumer<sp>evil!" ) ; case SleepThread . CANCEL_VALUE : System . out . println ( "SleepFutureConsumer<sp>cancelled" ) ; throw new java . util . concurrent . CancellationException ( "SleepFutureConsumer<sp>cancelled!" ) ; } System . out . println ( ( "SleepFutureConsumer<sp>consumed:<sp>" + ( future . get ( ) ) ) ) ; } | org . junit . Assert . assertNull ( result ) |
test0xFFInBinaryStream ( ) { byte [ ] b1 = new byte [ ] { 1 , 2 , 3 , ( ( byte ) ( 255 ) ) , 10 , 1 , 2 , 3 } ; byte [ ] b2 = new byte [ ] { 10 } ; org . apache . james . mime4j . io . BufferedLineReaderInputStream inbuffer = org . apache . james . mime4j . io . BufferedLineReaderInputStreamBufferTest . create ( b1 ) ; inbuffer . fillBuffer ( ) ; int i = inbuffer . indexOf ( b2 ) ; "<AssertPlaceHolder>" ; inbuffer . close ( ) ; } indexOf ( byte ) { return indexOf ( b , this . bufpos , bufferLen ( ) ) ; } | org . junit . Assert . assertEquals ( 4 , i ) |
testBuildWithParametersWithDisabledDEfaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; org . lnu . is . domain . paper . type . PaperType paperType = new org . lnu . is . domain . paper . type . PaperType ( ) ; org . lnu . is . domain . honors . type . HonorType honorsType = new org . lnu . is . domain . honors . type . HonorType ( ) ; java . util . Date docDate = new java . util . Date ( ) ; java . lang . String docSeries = "dfds" ; java . lang . String docNum = "fdssd" ; java . lang . String docIssued = "fdssd" ; java . lang . String docPin = "asfas<sp>xc" ; java . lang . Integer isChecked = 1 ; java . lang . Integer isForeign = 2 ; java . lang . Double mark = 4.5 ; org . lnu . is . domain . person . paper . PersonPaper context = new org . lnu . is . domain . person . paper . PersonPaper ( ) ; context . setPerson ( person ) ; context . setPaperType ( paperType ) ; context . setHonorsType ( honorsType ) ; context . setDocDate ( docDate ) ; context . setDocSeries ( docSeries ) ; context . setDocNum ( docNum ) ; context . setDocIssued ( docIssued ) ; context . setDocPin ( docPin ) ; context . setMark ( mark ) ; context . setIsChecked ( isChecked ) ; context . setIsForeign ( isForeign ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonPaper<sp>e<sp>WHERE<sp>(<sp>e.person<sp>=<sp>:person<sp>AND<sp>e.paperType<sp>=<sp>:paperType<sp>AND<sp>e.honorsType<sp>=<sp>:honorsType<sp>AND<sp>e.docDate<sp>=<sp>:docDate<sp>AND<sp>e.docSeries<sp>LIKE<sp>CONCAT('%',:docSeries,'%')<sp>AND<sp>e.docNum<sp>LIKE<sp>CONCAT('%',:docNum,'%')<sp>AND<sp>e.docIssued<sp>=<sp>:docIssued<sp>AND<sp>e.docPin<sp>=<sp>:docPin<sp>AND<sp>e.mark<sp>=<sp>:mark<sp>AND<sp>e.isChecked<sp>=<sp>:isChecked<sp>AND<sp>e.isForeign<sp>=<sp>:isForeign<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . paper . PersonPaper > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; } | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testPosition ( ) { java . awt . Point p1 = new java . awt . Point ( 1 , 2 ) ; graphNode . setPos ( p1 ) ; java . awt . Point p2 = graphNode . getPos ( ) ; "<AssertPlaceHolder>" ; } getPos ( ) { return displayPosition ; } | org . junit . Assert . assertEquals ( p1 , p2 ) |
testValidateFileTypePdfFile ( ) { org . apache . commons . fileupload . FileItem newFileItem = createFileItem ( "/content/test.pdf" ) ; boolean validateFileType = com . github . bordertech . wcomponents . util . FileUtil . validateFileType ( new com . github . bordertech . wcomponents . file . FileItemWrap ( newFileItem ) , java . util . Arrays . asList ( "application/pdf" ) ) ; "<AssertPlaceHolder>" ; } validateFileType ( com . github . bordertech . wcomponents . file . FileItemWrap , java . util . List ) { if ( newFile == null ) { return false ; } if ( ( fileTypes == null ) || ( fileTypes . isEmpty ( ) ) ) { return true ; } final java . util . List < java . lang . String > fileExts = fileTypes . stream ( ) . filter ( ( fileType ) -> fileType . startsWith ( "." ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; final java . util . List < java . lang . String > fileMimes = fileTypes . stream ( ) . filter ( ( fileType ) -> ! ( fileExts . contains ( fileType ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; if ( ( ( fileExts . size ( ) ) > 0 ) && ( ( newFile . getName ( ) ) != null ) ) { java . lang . String [ ] split = newFile . getName ( ) . split ( "\\.(?=[^\\.]+$)" ) ; if ( ( ( split . length ) == 2 ) && ( fileExts . stream ( ) . anyMatch ( ( fileExt ) -> fileExt . equals ( ( "." + ( split [ 1 ] ) ) ) ) ) ) { return true ; } } if ( ( fileMimes . size ( ) ) > 0 ) { final java . lang . String mimeType = com . github . bordertech . wcomponents . util . FileUtil . getFileMimeType ( newFile ) ; com . github . bordertech . wcomponents . util . FileUtil . LOG . debug ( ( "File<sp>mime-type<sp>is:<sp>" + mimeType ) ) ; for ( java . lang . String fileMime : fileMimes ) { if ( org . apache . commons . lang3 . StringUtils . equals ( mimeType , fileMime ) ) { return true ; } if ( ( fileMime . indexOf ( "*" ) ) == ( ( fileMime . length ( ) ) - 1 ) ) { fileMime = fileMime . substring ( 0 , ( ( fileMime . length ( ) ) - 1 ) ) ; if ( ( mimeType . indexOf ( fileMime ) ) == 0 ) { return true ; } } } } return false ; } | org . junit . Assert . assertTrue ( validateFileType ) |
testResourceManagerAdded ( ) { final org . apache . oozie . fluentjob . api . action . HiveActionBuilder builder = getBuilderInstance ( ) ; builder . withResourceManager ( org . apache . oozie . fluentjob . api . action . TestHiveActionBuilder . RESOURCE_MANAGER ) ; final org . apache . oozie . fluentjob . api . action . HiveAction action = builder . build ( ) ; "<AssertPlaceHolder>" ; } getResourceManager ( ) { return attributes . getResourceManager ( ) ; } | org . junit . Assert . assertEquals ( org . apache . oozie . fluentjob . api . action . TestHiveActionBuilder . RESOURCE_MANAGER , action . getResourceManager ( ) ) |
assertExecuteUpdateForSingleStatementSuccess ( ) { java . sql . Statement statement = getStatement ( ) ; when ( statement . executeUpdate ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DML_SQL ) ) . thenReturn ( 10 ) ; setExecuteGroups ( java . util . Collections . singletonList ( statement ) , SQLType . DML ) ; "<AssertPlaceHolder>" ; verify ( statement ) . executeUpdate ( org . apache . shardingsphere . shardingjdbc . executor . StatementExecutorTest . DML_SQL ) ; } executeUpdate ( ) { return executeUpdate ( new org . apache . shardingsphere . shardingjdbc . executor . StatementExecutor . Updater ( ) { @ org . apache . shardingsphere . shardingjdbc . executor . Override public int executeUpdate ( final java . sql . Statement statement , final java . lang . String sql ) throws java . sql . SQLException { return statement . executeUpdate ( sql ) ; } } ) ; } | org . junit . Assert . assertThat ( actual . executeUpdate ( ) , org . hamcrest . CoreMatchers . is ( 10 ) ) |
parse_timezone ( ) { biweekly . util . UtcOffset expected = new biweekly . util . UtcOffset ( true , 1 , 0 ) ; biweekly . util . UtcOffset actual = biweekly . util . UtcOffset . parse ( biweekly . util . TestUtils . buildTimezone ( 1 , 0 ) ) ; "<AssertPlaceHolder>" ; } buildTimezone ( int , int ) { int hourMillis = ( ( 1000 * 60 ) * 60 ) * hours ; int minuteMillis = ( 1000 * 60 ) * minutes ; if ( hours < 0 ) { minuteMillis *= - 1 ; } return new java . util . SimpleTimeZone ( ( hourMillis + minuteMillis ) , "" ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
executeWithReadOnlyStatementShouldRunAndReturnCorrectData ( ) { org . neo4j . jdbc . http . Connection connection = org . neo4j . jdbc . http . DriverManager . getConnection ( getJDBCUrl ( ) ) ; org . neo4j . jdbc . http . PreparedStatement statement = connection . prepareStatement ( "MATCH<sp>(m:Movie)<sp>WHERE<sp>m.title=<sp>?<sp>RETURN<sp>m.title" ) ; statement . setString ( 1 , "The<sp>Matrix" ) ; "<AssertPlaceHolder>" ; connection . close ( ) ; } execute ( ) { org . neo4j . driver . v1 . StatementResult result = executeInternal ( ) ; boolean hasResultSet = hasResultSet ( result ) ; if ( hasResultSet ) { this . currentResultSet = org . neo4j . jdbc . bolt . BoltNeo4jResultSet . newInstance ( this . hasDebug ( ) , this , result , this . resultSetParams ) ; this . currentUpdateCount = - 1 ; } else { this . currentResultSet = null ; try { org . neo4j . driver . v1 . summary . SummaryCounters stats = result . consume ( ) . counters ( ) ; this . currentUpdateCount = ( ( ( stats . nodesCreated ( ) ) + ( stats . nodesDeleted ( ) ) ) + ( stats . relationshipsCreated ( ) ) ) + ( stats . relationshipsDeleted ( ) ) ; } catch ( java . lang . Exception e ) { throw new java . sql . SQLException ( e ) ; } } return hasResultSet ; } | org . junit . Assert . assertTrue ( statement . execute ( ) ) |
testSetMetric ( ) { ipExtendedReachabilityTlv . setMetric ( 10 ) ; result2 = ipExtendedReachabilityTlv . metric ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; } | org . junit . Assert . assertThat ( result2 , org . hamcrest . CoreMatchers . is ( 10 ) ) |
staticReferencesAreNotEligible ( ) { java . util . List < java . lang . reflect . Field > field = net . openhft . lang . io . serialization . direct . DirectSerializationFilterTest . fieldsNamed ( "staticStringList" ) ; "<AssertPlaceHolder>" ; } stopAtFirstIneligibleField ( java . util . List ) { java . util . ArrayList < java . lang . reflect . Field > eligibleFields = new java . util . ArrayList < java . lang . reflect . Field > ( ) ; for ( java . lang . reflect . Field f : fields ) { if ( net . openhft . lang . io . serialization . direct . DirectSerializationFilter . checkEligible ( f ) ) { eligibleFields . add ( f ) ; } else { break ; } } return eligibleFields . isEmpty ( ) ? java . util . Collections . < java . lang . reflect . Field > emptyList ( ) : eligibleFields ; } | org . junit . Assert . assertTrue ( net . openhft . lang . io . serialization . direct . DirectSerializationFilter . stopAtFirstIneligibleField ( field ) . isEmpty ( ) ) |
repaintPropertySetLeadsToInvalidation ( ) { final jetbrains . jetpad . base . Value < java . lang . Boolean > repaintCalled = new jetbrains . jetpad . base . Value ( false ) ; jetbrains . jetpad . projectional . view . View view = new jetbrains . jetpad . projectional . view . ViewTest . MyView ( ) { @ jetbrains . jetpad . projectional . view . Override void repaint ( ) { super . repaint ( ) ; repaintCalled . set ( true ) ; } } ; view . set ( new jetbrains . jetpad . projectional . view . ViewPropertySpec ( "b" , ViewPropertyKind . REPAINT ) , new java . lang . Object ( ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return myValue . get ( ) ; } | org . junit . Assert . assertTrue ( repaintCalled . get ( ) ) |
testReadWriteComposite ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "Calculator.composite" ) ; org . apache . tuscany . sca . assembly . Composite composite = ( ( org . apache . tuscany . sca . assembly . Composite ) ( org . apache . tuscany . sca . binding . ws . xml . WriteTestCase . staxProcessor . read ( org . apache . tuscany . sca . binding . ws . xml . WriteTestCase . inputFactory . createXMLStreamReader ( is ) , org . apache . tuscany . sca . binding . ws . xml . WriteTestCase . context ) ) ) ; "<AssertPlaceHolder>" ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; org . apache . tuscany . sca . binding . ws . xml . WriteTestCase . staxProcessor . write ( composite , org . apache . tuscany . sca . binding . ws . xml . WriteTestCase . outputFactory . createXMLStreamWriter ( bos ) , org . apache . tuscany . sca . binding . ws . xml . WriteTestCase . context ) ; System . out . println ( bos . toString ( ) ) ; } createXMLStreamReader ( java . net . URL ) { try { javax . xml . transform . stream . StreamSource scdlSource = new javax . xml . transform . stream . StreamSource ( org . apache . tuscany . sca . common . xml . stax . StAXHelper . openStream ( url ) , url . toString ( ) ) ; return inputFactory . createXMLStreamReader ( scdlSource ) ; } catch ( java . io . IOException e ) { throw new javax . xml . stream . XMLStreamException ( e ) ; } } | org . junit . Assert . assertNotNull ( composite ) |
suggestionIndexingRuleHierarchy ( ) { java . lang . String indexNodeType = "nt:base" ; java . lang . String queryNodeType = "nt:unstructured" ; boolean enableSuggestionIndex = true ; boolean enableSpellcheckIndex = false ; boolean queryForSugggestion = true ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexNode node = createSuggestionOrSpellcheckIndex ( indexNodeType , enableSuggestionIndex , enableSpellcheckIndex ) ; org . apache . jackrabbit . oak . spi . query . QueryIndex . IndexPlan plan = getSuggestOrSpellcheckIndexPlan ( node , queryNodeType , queryForSugggestion ) ; "<AssertPlaceHolder>" ; } getSuggestOrSpellcheckIndexPlan ( org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexNode , java . lang . String , boolean ) { org . apache . jackrabbit . oak . query . index . FilterImpl filter = createFilter ( nodeType ) ; filter . restrictProperty ( indexNode . getDefinition ( ) . getFunctionName ( ) , Operator . EQUAL , org . apache . jackrabbit . oak . plugins . memory . PropertyValues . newString ( ( ( forSugggestion ? "suggest" : "spellcheck" ) + "?term=foo" ) ) ) ; org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner planner = new org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner ( indexNode , "/foo" , filter , java . util . Collections . < org . apache . jackrabbit . oak . spi . query . QueryIndex . OrderEntry > emptyList ( ) ) ; return planner . getPlan ( ) ; } | org . junit . Assert . assertNull ( plan ) |
testDerivePublicKey ( ) { for ( net . named_data . jndn . tests . unit_tests . TestTpmPrivateKey . KeyTestData dataSet : keyTestData ) { byte [ ] pkcs8 = net . named_data . jndn . util . Common . base64Decode ( dataSet . privateKeyPkcs8Unencrypted ) ; net . named_data . jndn . security . tpm . TpmPrivateKey key = new net . named_data . jndn . security . tpm . TpmPrivateKey ( ) ; try { key . loadPkcs8 ( java . nio . ByteBuffer . wrap ( pkcs8 ) ) ; } catch ( java . lang . Throwable ex ) { org . junit . Assert . fail ( ( "Unexpected<sp>exception:<sp>" + ( ex . getMessage ( ) ) ) ) ; } net . named_data . jndn . util . Blob publicKeyBits = key . derivePublicKey ( ) ; byte [ ] expected = net . named_data . jndn . util . Common . base64Decode ( dataSet . publicKeyEncoding ) ; "<AssertPlaceHolder>" ; } } equals ( java . lang . Object ) { if ( ! ( other instanceof net . named_data . jndn . encrypt . RepetitiveInterval ) ) return false ; return ( compare ( ( ( net . named_data . jndn . encrypt . RepetitiveInterval ) ( other ) ) ) ) == 0 ; } | org . junit . Assert . assertTrue ( publicKeyBits . equals ( new net . named_data . jndn . util . Blob ( expected ) ) ) |
testGetLatestStepExecutionSkipCount ( ) { prepareServiceWithSingleStepExecution ( ) ; "<AssertPlaceHolder>" ; } getLatestSkipCount ( ) { org . springframework . batch . core . StepExecution stepExecution = getLatestStepExecution ( stepName ) ; return stepExecution == null ? 0 : stepExecution . getSkipCount ( ) ; } | org . junit . Assert . assertEquals ( 0 , metrics . getLatestSkipCount ( ) ) |
should_update_success ( ) { com . flow . platform . api . domain . EmailSettingContent emailSetting = new com . flow . platform . api . domain . EmailSettingContent ( "smtp.163.com" , 465 , "xxxx@163.com" ) ; org . springframework . test . web . servlet . request . MockHttpServletRequestBuilder content = post ( "/message/email/settings" ) . contentType ( MediaType . APPLICATION_JSON ) . content ( emailSetting . toJson ( ) ) ; try { org . springframework . test . web . servlet . MvcResult mvcResult = this . mockMvc . perform ( content ) . andDo ( print ( ) ) . andExpect ( status ( ) . isOk ( ) ) . andReturn ( ) ; emailSetting . setPassword ( "123456" ) ; content = patch ( "/message/email/settings" ) . contentType ( MediaType . APPLICATION_JSON ) . content ( emailSetting . toJson ( ) ) ; mvcResult = this . mockMvc . perform ( content ) . andDo ( print ( ) ) . andExpect ( status ( ) . isOk ( ) ) . andReturn ( ) ; java . lang . String response = mvcResult . getResponse ( ) . getContentAsString ( ) ; com . flow . platform . api . domain . EmailSettingContent setting = Jsonable . GSON_CONFIG . fromJson ( response , com . flow . platform . api . domain . EmailSettingContent . class ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } getPassword ( ) { return password ; } | org . junit . Assert . assertNull ( setting . getPassword ( ) ) |
shouldFailConnectionWhenResponseHeaderSecWebSocketExtensionsNotNegotiated ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { never ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; never ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; never ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( any ( java . lang . Throwable . class ) ) ) ; never ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/path?query" , null , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; } | org . junit . Assert . assertFalse ( connectFuture . isConnected ( ) ) |
testGetPlaceholder ( ) { com . box . l10n . mojito . service . assetintegritychecker . integritychecker . PrintfLikeIntegrityChecker checker = new com . box . l10n . mojito . service . assetintegritychecker . integritychecker . PrintfLikeIntegrityChecker ( ) ; java . lang . String string = "%1$ld<sp><sp>%2$@<sp><sp><sp>%d<sp>%1$-04d<sp>%1$04d<sp>%2$.2ld" ; java . util . Set < java . lang . String > placeholders = checker . getPlaceholders ( string ) ; java . util . Set < java . lang . String > expected = new java . util . HashSet ( ) ; expected . add ( "%1$ld" ) ; expected . add ( "%2$@" ) ; expected . add ( "%d" ) ; expected . add ( "%1$-04d" ) ; expected . add ( "%1$04d" ) ; expected . add ( "%2$.2ld" ) ; com . box . l10n . mojito . service . assetintegritychecker . integritychecker . PrintfLikeIntegrityCheckerTest . logger . debug ( "expected:<sp>{}" , expected ) ; com . box . l10n . mojito . service . assetintegritychecker . integritychecker . PrintfLikeIntegrityCheckerTest . logger . debug ( "actual:<sp>{}" , placeholders ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expected , placeholders ) |
concurrentTest ( ) { int threads = 100 ; final java . util . concurrent . CyclicBarrier barrier = new java . util . concurrent . CyclicBarrier ( ( threads + 1 ) ) ; for ( int i = 0 ; i < threads ; i ++ ) { new java . lang . Thread ( ) { public void run ( ) { try { barrier . await ( ) ; for ( int i = 0 ; i < 10000 ; i ++ ) map . put ( i , i ) ; for ( int i = 0 ; i < 10000 ; i ++ ) map . get ( i ) ; barrier . await ( ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } } } . start ( ) ; } barrier . await ( ) ; barrier . await ( ) ; "<AssertPlaceHolder>" ; System . out . println ( map ) ; } size ( ) { return super . size ( ) ; } | org . junit . Assert . assertEquals ( 10 , map . size ( ) ) |
testParseNullLabelsInUserLabels ( ) { "<AssertPlaceHolder>" ; } userLabels ( java . util . Map ) { if ( userLabels != null ) { for ( java . lang . String key : userLabels . keySet ( ) ) { if ( ( key . startsWith ( io . strimzi . operator . common . model . Labels . STRIMZI_DOMAIN ) ) && ( ! ( key . equals ( io . strimzi . operator . common . model . Labels . STRIMZI_KIND_LABEL ) ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( ( "User<sp>labels<sp>includes<sp>a<sp>Strimzi<sp>label<sp>that<sp>is<sp>not<sp>" + ( io . strimzi . operator . common . model . Labels . STRIMZI_KIND_LABEL ) ) + ":<sp>" ) + key ) ) ; } } return new io . strimzi . operator . common . model . Labels ( userLabels ) ; } return io . strimzi . operator . common . model . Labels . EMPTY ; } | org . junit . Assert . assertEquals ( Labels . EMPTY , io . strimzi . operator . common . model . Labels . userLabels ( null ) ) |
isOverlappingInputMatchingDeltaBase ( ) { org . batfish . coordinator . WorkDetails details1 = _builder . setSnapshotId ( new org . batfish . identifiers . SnapshotId ( "t1" ) ) . setReferenceSnapshotId ( new org . batfish . identifiers . SnapshotId ( "t2" ) ) . setIsDifferential ( true ) . build ( ) ; org . batfish . coordinator . WorkDetails details2 = _builder . setSnapshotId ( new org . batfish . identifiers . SnapshotId ( "t2" ) ) . setReferenceSnapshotId ( null ) . setIsDifferential ( false ) . build ( ) ; "<AssertPlaceHolder>" ; } isOverlappingInput ( org . batfish . coordinator . WorkDetails ) { return ( ( _snapshotId . equals ( o . _snapshotId ) ) || ( _snapshotId . equals ( o . _referenceSnapshotId ) ) ) || ( ( _isDifferential ) && ( ( _referenceSnapshotId . equals ( o . _snapshotId ) ) || ( _referenceSnapshotId . equals ( o . _referenceSnapshotId ) ) ) ) ; } | org . junit . Assert . assertTrue ( details1 . isOverlappingInput ( details2 ) ) |
testFindElementByTagName ( ) { java . util . Random random = new java . util . Random ( ) ; org . openqa . selenium . WebElement text = com . sugarcrm . candybean . examples . mobile . AppiumIosTest . driver . findElement ( org . openqa . selenium . By . tagName ( "textField" ) ) ; int number = ( random . nextInt ( ( ( ( com . sugarcrm . candybean . examples . mobile . AppiumIosTest . MAXIMUM ) - ( com . sugarcrm . candybean . examples . mobile . AppiumIosTest . MINIMUM ) ) + 1 ) ) ) + ( com . sugarcrm . candybean . examples . mobile . AppiumIosTest . MINIMUM ) ; text . sendKeys ( java . lang . String . valueOf ( number ) ) ; com . sugarcrm . candybean . examples . mobile . AppiumIosTest . driver . findElement ( org . openqa . selenium . By . tagName ( "button" ) ) . click ( ) ; org . openqa . selenium . WebElement sumLabel = com . sugarcrm . candybean . examples . mobile . AppiumIosTest . driver . findElement ( org . openqa . selenium . By . tagName ( "staticText" ) ) ; "<AssertPlaceHolder>" ; } getText ( ) { logger . info ( ( "Getting<sp>text<sp>for<sp>element:<sp>" + ( this . toString ( ) ) ) ) ; if ( "input" . equals ( we . getTagName ( ) ) ) { return this . we . getAttribute ( "value" ) ; } return this . we . getText ( ) ; } | org . junit . Assert . assertEquals ( sumLabel . getText ( ) , java . lang . String . valueOf ( number ) ) |
testConstants ( ) { java . lang . reflect . Constructor < org . ff4j . store . mongodb . FeatureStoreMongoConstants > ce = org . ff4j . store . mongodb . FeatureStoreMongoConstants . class . getDeclaredConstructor ( ) ; ce . setAccessible ( true ) ; ce . newInstance ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( ce ) |
testAsymmetric ( ) { final uk . gov . dstl . baleen . types . common . Person p = new uk . gov . dstl . baleen . types . common . Person ( jCas ) ; p . addToIndexes ( ) ; final uk . gov . dstl . baleen . types . semantic . Location l = new uk . gov . dstl . baleen . types . semantic . Location ( jCas ) ; p . addToIndexes ( ) ; final uk . gov . dstl . baleen . types . semantic . Relation p2l = new uk . gov . dstl . baleen . types . semantic . Relation ( jCas ) ; p2l . setSource ( p ) ; p2l . setTarget ( l ) ; p2l . setRelationshipType ( "went" ) ; p2l . setRelationSubType ( "past" ) ; p2l . addToIndexes ( ) ; final uk . gov . dstl . baleen . types . semantic . Relation l2p = new uk . gov . dstl . baleen . types . semantic . Relation ( jCas ) ; l2p . setSource ( l ) ; l2p . setTarget ( p ) ; l2p . setRelationshipType ( "went" ) ; p2l . setRelationSubType ( "past" ) ; l2p . addToIndexes ( ) ; processJCas ( "mongo" , fongoErd , "symmetric" , false ) ; final java . util . List < uk . gov . dstl . baleen . types . semantic . Relation > select = new java . util . ArrayList ( org . apache . uima . fit . util . JCasUtil . select ( jCas , uk . gov . dstl . baleen . types . semantic . Relation . class ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( int ) ( flattened ( ) . count ( ) ) ) ; } | org . junit . Assert . assertEquals ( 1 , select . size ( ) ) |
shouldIdentifyContentObjectsWithNoBodyAsBeingEqual ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object , java . lang . Object ) { if ( ( expectedObj == null ) || ( actualObj == null ) ) { return false ; } java . util . Collection < smartrics . rest . client . RestData . Header > expected = ( ( java . util . Collection < smartrics . rest . client . RestData . Header > ) ( expectedObj ) ) ; java . util . Collection < smartrics . rest . client . RestData . Header > actual = ( ( java . util . Collection < smartrics . rest . client . RestData . Header > ) ( actualObj ) ) ; for ( smartrics . rest . client . RestData . Header k : expected ) { smartrics . rest . client . RestData . Header aHdr = find ( actual , k ) ; if ( aHdr == null ) { addError ( ( ( ( ( "not<sp>found:<sp>[" + ( k . getName ( ) ) ) + "<sp>:<sp>" ) + ( k . getValue ( ) ) ) + "]" ) ) ; } } return ( getErrors ( ) . size ( ) ) == 0 ; } | org . junit . Assert . assertFalse ( adapter . equals ( null , null ) ) |
testRemoveEventsForUsers ( ) { java . util . List < com . serotonin . m2m2 . vo . User > users = createUsers ( 2 , SuperadminPermissionDefinition . GROUP_NAME ) ; int cleanerPeriod = 10000 ; int timeToLive = cleanerPeriod * 4 ; int eventCount = 100 ; this . cache = new com . serotonin . m2m2 . rt . event . UserEventCache ( timeToLive , cleanerPeriod ) ; com . serotonin . m2m2 . rt . event . UserEventCacheTest . EventGeneratorThread egt = new com . serotonin . m2m2 . rt . event . UserEventCacheTest . EventGeneratorThread ( this , eventCount , users ) ; egt . setUserThreads ( new java . util . ArrayList ( ) ) ; for ( com . serotonin . m2m2 . vo . User user : users ) cache . getAllEvents ( user . getId ( ) ) ; synchronized ( monitor ) { egt . start ( ) ; while ( ( runningThreads . intValue ( ) ) > 0 ) { monitor . wait ( ) ; } } cache . removeUser ( users . get ( 0 ) . getId ( ) , egt . allEvents . get ( 10 ) . getId ( ) ) ; cache . removeUser ( users . get ( 0 ) . getId ( ) , egt . allEvents . get ( 20 ) . getId ( ) ) ; cache . removeUser ( users . get ( 0 ) . getId ( ) , egt . allEvents . get ( 30 ) . getId ( ) ) ; cache . removeUser ( users . get ( 1 ) . getId ( ) , egt . allEvents . get ( 5 ) . getId ( ) ) ; cache . removeUser ( users . get ( 1 ) . getId ( ) , egt . allEvents . get ( 10 ) . getId ( ) ) ; cache . removeUser ( users . get ( 1 ) . getId ( ) , egt . allEvents . get ( 20 ) . getId ( ) ) ; cache . removeUser ( users . get ( 1 ) . getId ( ) , egt . allEvents . get ( 40 ) . getId ( ) ) ; this . timer . fastForwardTo ( ( ( this . timer . currentTimeMillis ( ) ) + ( cleanerPeriod * 2 ) ) ) ; "<AssertPlaceHolder>" ; } getCache ( ) { return cache ; } | org . junit . Assert . assertEquals ( ( eventCount - 2 ) , this . cache . getCache ( ) . size ( ) ) |
testOnException ( ) { java . util . concurrent . atomic . AtomicReference < org . slieb . throwables . java . lang . Throwable > reference = new java . util . concurrent . atomic . AtomicReference ( ) ; org . slieb . throwables . java . lang . Exception expected = new org . slieb . throwables . java . lang . Exception ( "expected" ) ; try { org . slieb . throwables . DoublePredicateWithThrowable . castDoublePredicateWithThrowable ( ( v1 ) -> { throw expected ; } ) . onException ( reference :: set ) . test ( 0 ) ; } catch ( java . lang . Throwable ignored ) { } "<AssertPlaceHolder>" ; } get ( ) { try { return getWithThrowable ( ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } } | org . junit . Assert . assertEquals ( expected , reference . get ( ) ) |
testChooseRandomExcludedNode ( ) { java . lang . String scope = "~" + ( org . apache . hadoop . net . NodeBase . getPath ( dataNodes [ 0 ] ) ) ; java . util . Map < org . apache . hadoop . net . Node , java . lang . Integer > frequency = pickNodesAtRandom ( 100 , scope ) ; for ( org . apache . hadoop . net . Node key : dataNodes ) { "<AssertPlaceHolder>" ; } } get ( org . apache . hadoop . hdfs . server . blockmanagement . BlockInfoContiguous ) { java . util . Collection < io . hops . metadata . hdfs . entity . ExcessReplica > excessReplicas = getExcessReplicas ( blk ) ; if ( excessReplicas == null ) { return null ; } java . util . TreeSet < java . lang . String > stIds = new java . util . TreeSet ( ) ; for ( io . hops . metadata . hdfs . entity . ExcessReplica er : excessReplicas ) { stIds . add ( datanodeManager . getDatanodeBySid ( er . getStorageId ( ) ) . getDatanodeUuid ( ) ) ; } return stIds ; } | org . junit . Assert . assertTrue ( ( ( ( frequency . get ( key ) ) > 0 ) || ( key == ( dataNodes [ 0 ] ) ) ) ) |
distinctReducerReturnsCommonValueIfAllValuesAreSame ( ) { io . datakernel . jmx . JmxReducerDistinct reducer = new io . datakernel . jmx . JmxReducerDistinct ( ) ; java . util . List < java . lang . String > input = asList ( "data" , "data" , "data" ) ; "<AssertPlaceHolder>" ; } reduce ( io . datakernel . functional . BiFunction ) { return fn . apply ( result , throwable ) ; } | org . junit . Assert . assertEquals ( "data" , reducer . reduce ( input ) ) |
write_ValidImage_WriterCanCompress_NoCompressionTypeFromWriter ( ) { javax . imageio . ImageWriteParam iwParam = mock ( javax . imageio . ImageWriteParam . class ) ; javax . imageio . ImageWriter writer = mock ( javax . imageio . ImageWriter . class ) ; javax . imageio . spi . ImageWriterSpi spi = mock ( javax . imageio . spi . ImageWriterSpi . class ) ; when ( iwParam . canWriteCompressed ( ) ) . thenReturn ( true ) ; when ( iwParam . getCompressionTypes ( ) ) . thenReturn ( null ) ; when ( writer . getDefaultWriteParam ( ) ) . thenReturn ( iwParam ) ; when ( writer . getOriginatingProvider ( ) ) . thenReturn ( spi ) ; when ( spi . getFormatNames ( ) ) . thenReturn ( new java . lang . String [ ] { "foo" , "FOO" } ) ; when ( spi . getFileSuffixes ( ) ) . thenReturn ( new java . lang . String [ ] { "foo" , "FOO" } ) ; when ( spi . createWriterInstance ( ) ) . thenReturn ( writer ) ; when ( spi . createWriterInstance ( anyObject ( ) ) ) . thenReturn ( writer ) ; javax . imageio . spi . IIORegistry . getDefaultInstance ( ) . registerServiceProvider ( spi ) ; java . io . File outputFile = new java . io . File ( net . coobird . thumbnailator . tasks . io . FileImageSinkTest . TMPDIR , "test.foo" ) ; outputFile . deleteOnExit ( ) ; java . awt . image . BufferedImage imgToWrite = new java . awt . image . BufferedImage ( 100 , 100 , java . awt . image . BufferedImage . TYPE_INT_RGB ) ; net . coobird . thumbnailator . ThumbnailParameter param = mock ( net . coobird . thumbnailator . ThumbnailParameter . class ) ; when ( param . getOutputQuality ( ) ) . thenReturn ( 0.8F ) ; when ( param . getOutputFormatType ( ) ) . thenReturn ( ThumbnailParameter . DEFAULT_FORMAT_TYPE ) ; net . coobird . thumbnailator . tasks . io . FileImageSink sink = new net . coobird . thumbnailator . tasks . io . FileImageSink ( outputFile ) ; sink . setThumbnailParameter ( param ) ; sink . write ( imgToWrite ) ; "<AssertPlaceHolder>" ; verify ( iwParam , atLeastOnce ( ) ) . setCompressionMode ( ImageWriteParam . MODE_EXPLICIT ) ; verify ( iwParam , never ( ) ) . setCompressionType ( anyString ( ) ) ; verify ( iwParam , atLeastOnce ( ) ) . setCompressionQuality ( 0.8F ) ; verify ( param , atLeastOnce ( ) ) . getOutputQuality ( ) ; verify ( param , atLeastOnce ( ) ) . getOutputFormatType ( ) ; javax . imageio . spi . IIORegistry . getDefaultInstance ( ) . deregisterServiceProvider ( spi ) ; } getSink ( ) { if ( ! ( written ) ) { throw new java . lang . IllegalStateException ( "BufferedImageSink<sp>has<sp>not<sp>been<sp>written<sp>to<sp>yet." ) ; } return img ; } | org . junit . Assert . assertEquals ( outputFile , sink . getSink ( ) ) |
testDeserializeJsonParserDeserializationContextWithNull ( ) { org . codehaus . jackson . map . ObjectMapper mapper = createObjectMapper ( ) ; java . lang . String json = "{\"email\":null}" ; br . com . insula . opes . json . deserializer . EmailJsonDeserializerTest . Teste teste = mapper . readValue ( json , br . com . insula . opes . json . deserializer . EmailJsonDeserializerTest . Teste . class ) ; "<AssertPlaceHolder>" ; } getEmail ( ) { return email ; } | org . junit . Assert . assertNull ( teste . getEmail ( ) ) |
testUniqueConstraintsViolation ( ) { if ( com . splicemachine . derby . impl . load . HBaseBulkLoadIndexIT . notSupported ) return ; try { methodWatcher . execute ( java . lang . String . format ( "create<sp>unique<sp>index<sp>bi<sp>on<sp>b(i)<sp>auto<sp>splitkeys<sp>hfile<sp>location<sp>'%s'" , com . splicemachine . derby . impl . load . HBaseBulkLoadIndexIT . getResource ( "data" ) ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { java . lang . String errorMessage = e . getMessage ( ) ; java . lang . String expected = "The<sp>statement<sp>was<sp>aborted<sp>because<sp>it<sp>would<sp>have<sp>caused<sp>a<sp>duplicate<sp>key<sp>value<sp>in<sp>a<sp>unique<sp>or<sp>primary<sp>key<sp>constraint<sp>or<sp>unique<sp>index<sp>identified<sp>by<sp>'BI'<sp>defined<sp>on<sp>'B'." ; "<AssertPlaceHolder>" ; } } getMessage ( ) { if ( ! ( specialConstructor ) ) { return super . getMessage ( ) ; } java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; int maxSize = 0 ; for ( int i = 0 ; i < ( expectedTokenSequences . length ) ; i ++ ) { if ( maxSize < ( expectedTokenSequences [ i ] . length ) ) { maxSize = expectedTokenSequences [ i ] . length ; } for ( int j = 0 ; j < ( expectedTokenSequences [ i ] . length ) ; j ++ ) { expected . append ( tokenImage [ expectedTokenSequences [ i ] [ j ] ] ) . append ( "<sp>" ) ; } if ( ( expectedTokenSequences [ i ] [ ( ( expectedTokenSequences [ i ] . length ) - 1 ) ] ) != 0 ) { expected . append ( "Was<sp>expecting<sp>one<sp>of:" 0 ) ; } expected . append ( eol ) . append ( "<sp>" ) ; } java . lang . StringBuilder retval = new java . lang . StringBuilder ( "Encountered<sp>\"" ) ; com . splicemachine . db . impl . tools . ij . Token tok = currentToken . next ; for ( int i = 0 ; i < maxSize ; i ++ ) { if ( i != 0 ) retval . append ( "<sp>" ) ; if ( ( tok . kind ) == 0 ) { retval . append ( tokenImage [ 0 ] ) ; break ; } retval . append ( add_escapes ( tok . image ) ) ; tok = tok . next ; } retval . append ( "\"<sp>at<sp>line<sp>" ) . append ( currentToken . next . beginLine ) . append ( ",<sp>column<sp>" ) . append ( currentToken . next . beginColumn ) ; return retval . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , errorMessage ) |
testIntersection2 ( ) { tl . lin . data . array . ArrayListOfDoubles a = new tl . lin . data . array . ArrayListOfDoubles ( ) ; a . add ( 5 ) ; tl . lin . data . array . ArrayListOfDoubles b = new tl . lin . data . array . ArrayListOfDoubles ( ) ; b . add ( 0 ) . add ( 1 ) . add ( 2 ) . add ( 3 ) ; tl . lin . data . array . ArrayListOfDoubles c = a . intersection ( b ) ; "<AssertPlaceHolder>" ; } size ( ) { return n ; } | org . junit . Assert . assertTrue ( ( ( c . size ( ) ) == 0 ) ) |
noEventsForTouchedProperties ( ) { final java . lang . String testNodeName = "test_touched_node" ; final java . lang . String testNodePath = '/' + testNodeName ; javax . jcr . Session session = getAdminSession ( ) ; javax . jcr . Node testNode = session . getRootNode ( ) . addNode ( testNodeName ) ; testNode . setProperty ( "foo" , "bar" ) ; testNode . setProperty ( "foo2" , "bar0" ) ; session . save ( ) ; javax . jcr . Session observingSession = createAdminSession ( ) ; javax . jcr . observation . ObservationManager observationManager = observingSession . getWorkspace ( ) . getObservationManager ( ) ; try { final java . util . List < javax . jcr . observation . Event > events = new java . util . ArrayList < javax . jcr . observation . Event > ( ) ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; javax . jcr . observation . EventListener listener = new javax . jcr . observation . EventListener ( ) { @ org . apache . jackrabbit . oak . jcr . Override public void onEvent ( javax . jcr . observation . EventIterator eventIt ) { while ( eventIt . hasNext ( ) ) { events . add ( eventIt . nextEvent ( ) ) ; } if ( ! ( events . isEmpty ( ) ) ) { latch . countDown ( ) ; } } } ; observationManager . addEventListener ( listener , org . apache . jackrabbit . oak . jcr . PROPERTY_CHANGED , testNodePath , true , null , null , false ) ; session . getNode ( testNodePath ) . setProperty ( "foo" , "bar" ) ; session . getNode ( testNodePath ) . setProperty ( "foo2" , "bar2" ) ; session . save ( ) ; latch . await ( 60 , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } finally { observingSession . logout ( ) ; } } size ( ) { return size ; } | org . junit . Assert . assertEquals ( 1 , events . size ( ) ) |
testSearchBusinessObjectDefinitionsOnlyShortDescriptionAndDataProviderName ( ) { java . util . Set < org . finra . herd . model . api . xml . BusinessObjectDefinition > expectedBusinessObjectDefinitions = setUpTestEntitiesForSearchTesting ( ) ; for ( org . finra . herd . model . api . xml . BusinessObjectDefinition businessObjectDefinition : expectedBusinessObjectDefinitions ) { businessObjectDefinition . setDisplayName ( null ) ; } org . finra . herd . model . api . xml . BusinessObjectDefinitionSearchResponse searchResponse = businessObjectDefinitionService . searchBusinessObjectDefinitions ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSearchRequest ( java . util . Arrays . asList ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSearchFilter ( NO_EXCLUSION_SEARCH_FILTER , java . util . Arrays . asList ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionSearchKey ( new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) , INCLUDE_TAG_HIERARCHY ) ) ) ) ) , com . google . common . collect . Sets . newHashSet ( org . finra . herd . service . FIELD_SHORT_DESCRIPTION , org . finra . herd . service . FIELD_DATA_PROVIDER_NAME ) ) ; java . util . Set < org . finra . herd . model . api . xml . BusinessObjectDefinition > actualBusinessObjectDefinitions = new java . util . HashSet ( searchResponse . getBusinessObjectDefinitions ( ) ) ; "<AssertPlaceHolder>" ; } getBusinessObjectDefinitions ( ) { return businessObjectDefinitionService . getBusinessObjectDefinitions ( ) ; } | org . junit . Assert . assertEquals ( actualBusinessObjectDefinitions , expectedBusinessObjectDefinitions ) |
doesNotAcceptArguments ( ) { joptsimple . OptionDescriptor nonOptions = parser . nonOptions ( ) . describedAs ( "dirs" ) ; "<AssertPlaceHolder>" ; } acceptsArguments ( ) { return false ; } | org . junit . Assert . assertFalse ( nonOptions . acceptsArguments ( ) ) |
localDateTime ( ) { java . time . LocalDateTime localDateTime = java . time . LocalDateTime . of ( 2016 , 2 , 24 , 5 , 55 ) ; javax . ws . rs . ext . ParamConverter < java . time . LocalDateTime > converter = ( ( javax . ws . rs . ext . ParamConverter < java . time . LocalDateTime > ) ( provider . getConverter ( localDateTime . getClass ( ) , localDateTime . getClass ( ) , localDateTime . getClass ( ) . getAnnotations ( ) ) ) ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { return null ; } | org . junit . Assert . assertEquals ( localDateTime , converter . fromString ( converter . toString ( localDateTime ) ) ) |
testSDIV_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "60FF05" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; } | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
testSetGetCreationTime ( ) { System . out . println ( "testSetGetCreationTime" ) ; gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord instance = new gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord ( ) ; java . util . Date expResult = new java . util . Date ( ) ; instance . setCreationTime ( expResult ) ; java . util . Date result = instance . getCreationTime ( ) ; "<AssertPlaceHolder>" ; } getCreationTime ( ) { if ( ( creationTime ) == null ) { return null ; } else { return ( ( java . util . Date ) ( creationTime . clone ( ) ) ) ; } } | org . junit . Assert . assertEquals ( expResult , result ) |
testSpecEnableCountingFALSE ( ) { com . hp . hpl . jena . rdf . model . Model m = com . epimorphics . jsonrdf . utils . ModelIOUtils . modelFromTurtle ( ":my<sp>a<sp>api:API;<sp>elda:enableCounting<sp>false;<sp>api:sparqlEndpoint<sp>:spoo" ) ; com . hp . hpl . jena . rdf . model . Resource root = m . createResource ( m . expandPrefix ( ":my" ) ) ; com . epimorphics . lda . specs . APISpec s = com . epimorphics . lda . apispec . tests . SpecUtil . specFrom ( root ) ; "<AssertPlaceHolder>" ; } getEnableCounting ( ) { return Boolean . FALSE ; } | org . junit . Assert . assertEquals ( Boolean . FALSE , s . getEnableCounting ( ) ) |
testGetJDKProxyEnvProxyHasUserInfo ( ) { com . aliyuncs . http . HttpRequest request = mock ( com . aliyuncs . http . HttpRequest . class ) ; java . net . Proxy proxy = com . aliyuncs . http . HttpUtil . getJDKProxy ( null , "http://user:passwd@www.aliyun.com" , request ) ; "<AssertPlaceHolder>" ; } getJDKProxy ( java . lang . String , java . lang . String , com . aliyuncs . http . HttpRequest ) { java . net . Proxy proxy = java . net . Proxy . NO_PROXY ; try { java . lang . String proxyStr = ( ! ( com . aliyuncs . utils . StringUtils . isEmpty ( clientProxy ) ) ) ? clientProxy : envProxy ; if ( com . aliyuncs . utils . StringUtils . isEmpty ( proxyStr ) ) { return proxy ; } java . net . URL proxyUrl = new java . net . URL ( proxyStr ) ; java . lang . String userInfo = proxyUrl . getUserInfo ( ) ; if ( userInfo != null ) { byte [ ] bytes = userInfo . getBytes ( "UTF-8" ) ; java . lang . String auth = javax . xml . bind . DatatypeConverter . printBase64Binary ( bytes ) ; request . putHeaderParameter ( "Proxy-Authorization" , ( "Basic<sp>" + auth ) ) ; } java . lang . String hostname = proxyUrl . getHost ( ) ; int port = proxyUrl . getPort ( ) ; if ( port == ( - 1 ) ) { port = proxyUrl . getDefaultPort ( ) ; } java . net . SocketAddress addr = new java . net . InetSocketAddress ( hostname , port ) ; proxy = new java . net . Proxy ( Proxy . Type . HTTP , addr ) ; } catch ( java . io . IOException e ) { throw new com . aliyuncs . exceptions . ClientException ( "SDK.InvalidProxy" , "proxy<sp>url<sp>is<sp>invalid" ) ; } return proxy ; } | org . junit . Assert . assertNotNull ( proxy ) |
testForwardScanForRecordAfterLedger ( ) { java . lang . String streamName = runtime . getMethodName ( ) ; org . apache . distributedlog . BKDistributedLogManager bkdlm = ( ( org . apache . distributedlog . BKDistributedLogManager ) ( createNewDLM ( conf , streamName ) ) ) ; org . apache . distributedlog . DLMTestUtil . generateLogSegmentNonPartitioned ( bkdlm , 0 , 5 , 1 ) ; org . apache . distributedlog . DLSN dlsn = new org . apache . distributedlog . DLSN ( 2 , 0 , 0 ) ; java . util . concurrent . CompletableFuture < org . apache . distributedlog . LogRecordWithDLSN > futureLogrec = getFirstGreaterThanRecord ( bkdlm , 0 , dlsn ) ; org . apache . distributedlog . LogRecordWithDLSN logrec = org . apache . distributedlog . util . Utils . ioResult ( futureLogrec ) ; "<AssertPlaceHolder>" ; bkdlm . close ( ) ; } ioResult ( java . util . concurrent . CompletableFuture ) { return org . apache . distributedlog . common . concurrent . FutureUtils . result ( result , ( cause ) -> { if ( cause instanceof java . io . IOException ) { return ( ( java . io . IOException ) ( cause ) ) ; } else if ( cause instanceof org . apache . zookeeper . KeeperException ) { return new org . apache . distributedlog . exceptions . ZKException ( "Encountered<sp>zookeeper<sp>exception<sp>on<sp>waiting<sp>result" , ( ( org . apache . zookeeper . KeeperException ) ( cause ) ) ) ; } else if ( cause instanceof org . apache . bookkeeper . client . BKException ) { return new org . apache . distributedlog . exceptions . BKTransmitException ( "Encountered<sp>bookkeeper<sp>exception<sp>on<sp>waiting<sp>result" , ( ( org . apache . bookkeeper . client . BKException ) ( cause ) ) . getCode ( ) ) ; } else if ( cause instanceof java . lang . InterruptedException ) { return new org . apache . distributedlog . exceptions . DLInterruptedException ( "Interrupted<sp>on<sp>waiting<sp>result" , cause ) ; } else { return new java . io . IOException ( "Encountered<sp>exception<sp>on<sp>waiting<sp>result" , cause ) ; } } ) ; } | org . junit . Assert . assertEquals ( null , logrec ) |
validateHeaderAll ( ) { javax . xml . transform . Source testXml = new javax . xml . transform . stream . StreamSource ( new org . springframework . core . io . ClassPathResource ( sample_wrong ) . getInputStream ( ) ) ; try { schematron . validate ( testXml , new org . openehealth . ipf . commons . xml . SchematronProfile ( "schematron/cda_phmr/templates/2.16.840.1.113883.10.20.9.sch" ) ) ; org . junit . Assert . fail ( ) ; } catch ( org . openehealth . ipf . commons . core . modules . api . ValidationException ex ) { "<AssertPlaceHolder>" ; } } getCauses ( ) { return causes ; } | org . junit . Assert . assertEquals ( 20 , ex . getCauses ( ) . length ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.