input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
isRolesRendered_RolePrices ( ) { ctrl . initializePartnerServiceView ( ) ; boolean rolesRendered = ctrl . isRolesRendered ( ) ; "<AssertPlaceHolder>" ; } isRolesRendered ( ) { return rolesRendered ; }
org . junit . Assert . assertEquals ( true , rolesRendered )
testSplitForMultipleSplitSizesFromOneTo16 ( ) { io . netty . buffer . ByteBuf bb = null ; try { bb = io . netty . buffer . Unpooled . directBuffer ( 1000 ) ; byte [ ] oneByte = new byte [ 1 ] ; for ( int i = 0 ; i < 1000 ; i ++ ) { oneByte [ 0 ] = ( ( byte ) ( i ) ) ; bb . writeBytes ( oneByte ) ; } java . security . MessageDigest digest = java . security . MessageDigest . getInstance ( "MD5" ) ; digest . update ( bb . nioBuffer ( ) ) ; byte [ ] expected = digest . digest ( ) ; for ( int size = 1 ; size < 16 ; size ++ ) { System . out . println ( ( "size=" + size ) ) ; digest . reset ( ) ; bb . readerIndex ( 0 ) ; com . azure . common . implementation . util . FluxUtil . split ( bb , 3 ) . doOnNext ( ( b ) -> digest . update ( b . nioBuffer ( ) ) ) . subscribe ( ) ; "<AssertPlaceHolder>" ; } } finally { if ( bb != null ) { bb . release ( ) ; } } } digest ( ) { return this . digest ; }
org . junit . Assert . assertArrayEquals ( expected , digest . digest ( ) )
testGetIntWithStringWithDefaultWithInvalidProperty ( ) { final edu . illinois . library . cantaloupe . config . Configuration instance = getInstance ( ) ; instance . setProperty ( "test1" , "cats" ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String , int ) { try { return getInt ( key ) ; } catch ( java . util . NoSuchElementException | java . lang . NumberFormatException e ) { return defaultValue ; } }
org . junit . Assert . assertEquals ( 5 , instance . getInt ( "test1" , 5 ) )
testGetLogSegmentsZKExceptions ( ) { java . lang . String logName = testName . getMethodName ( ) ; java . lang . String logIdentifier = "<default>" ; org . apache . zookeeper . ZooKeeper mockZk = mock ( org . apache . zookeeper . ZooKeeper . class ) ; org . apache . distributedlog . ZooKeeperClient mockZkc = mock ( org . apache . distributedlog . ZooKeeperClient . class ) ; when ( mockZkc . get ( ) ) . thenReturn ( mockZk ) ; doAnswer ( ( invocationOnMock ) -> { java . lang . String path = ( ( java . lang . String ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; org . apache . zookeeper . AsyncCallback . Children2Callback callback = ( ( org . apache . zookeeper . AsyncCallback . Children2Callback ) ( invocationOnMock . getArguments ( ) [ 2 ] ) ) ; callback . processResult ( Code . BADVERSION . intValue ( ) , path , null , null , null ) ; return null ; } ) . when ( mockZk ) . getChildren ( anyString ( ) , anyBoolean ( ) , any ( org . apache . zookeeper . AsyncCallback . Children2Callback . class ) , any ( ) ) ; java . lang . String logSegmentsPath = org . apache . distributedlog . metadata . LogMetadata . getLogSegmentsPath ( uri , logName , logIdentifier ) ; try { org . apache . bookkeeper . common . concurrent . FutureUtils . result ( org . apache . distributedlog . impl . metadata . ZKLogStreamMetadataStore . getLogSegments ( mockZkc , logSegmentsPath ) ) ; org . junit . Assert . fail ( "Should<sp>fail<sp>to<sp>get<sp>log<sp>segments<sp>when<sp>encountering<sp>zk<sp>exceptions" ) ; } catch ( org . apache . distributedlog . exceptions . ZKException zke ) { "<AssertPlaceHolder>" ; } } getKeeperExceptionCode ( ) { return this . code ; }
org . junit . Assert . assertEquals ( Code . BADVERSION , zke . getKeeperExceptionCode ( ) )
test_HtmlBlock1 ( ) { final java . lang . String input = "" + ( ( ( ( ( "line<sp>1\n" + "\n" ) + "<img<sp>src=\"i.jpg\">\n" ) + "\n" ) + "line<sp>2" ) + "\n" ) ; final java . lang . String expected = "" + ( ( ( ( ( "line<sp>1\n" + "\n" ) + "<img<sp>src=\"replaced.png\">\n" ) + "\n" ) + "line<sp>2" ) + "\n" ) ; com . vladsch . flexmark . util . ast . Node document = com . vladsch . flexmark . formatter . FormatterModifiedAST . PARSER . parse ( input ) ; com . vladsch . flexmark . util . ast . Node html = document . getFirstChild ( ) . getNext ( ) ; html . setChars ( com . vladsch . flexmark . util . sequence . PrefixedSubSequence . of ( "<img<sp>src=\"replaced.png\">\n" , html . getChars ( ) , 0 , 0 ) ) ; java . lang . String formatted = com . vladsch . flexmark . formatter . FormatterModifiedAST . RENDERER . render ( document ) ; "<AssertPlaceHolder>" ; } render ( com . vladsch . flexmark . util . ast . Node ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; render ( node , sb ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , formatted )
testString ( ) { java . lang . String expectedJavascript = "5" ; java . lang . String generatedJavascript = org . odlabs . wiquery . core . javascript . JsUtils . string ( 5 ) ; org . odlabs . wiquery . core . javascript . JsUtilsTestCase . log . info ( expectedJavascript ) ; org . odlabs . wiquery . core . javascript . JsUtilsTestCase . log . info ( generatedJavascript ) ; "<AssertPlaceHolder>" ; } string ( int ) { return java . lang . String . valueOf ( value ) ; }
org . junit . Assert . assertEquals ( generatedJavascript , expectedJavascript )
shouldLoadPropertyFromLazyProperties ( ) { final uk . gov . gchq . gaffer . data . element . Edge edge = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . ElementValueLoader edgeLoader = mock ( uk . gov . gchq . gaffer . data . element . ElementValueLoader . class ) ; final uk . gov . gchq . gaffer . data . element . LazyEdge lazyEdge = new uk . gov . gchq . gaffer . data . element . LazyEdge ( edge , edgeLoader ) ; final java . lang . String propertyName = "property<sp>name" ; final java . lang . String exceptedPropertyValue = "property<sp>value" ; given ( edgeLoader . getProperty ( propertyName , lazyEdge . getProperties ( ) ) ) . willReturn ( exceptedPropertyValue ) ; java . lang . Object propertyValue = lazyEdge . getProperty ( propertyName ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { final boolean isCore = uk . gov . gchq . gaffer . rest . service . v2 . PropertiesServiceV2 . CORE_EXPOSED_PROPERTIES . containsKey ( propertyName ) ; boolean isExposed = isCore ; if ( ! isExposed ) { final java . lang . String propertiesList = java . lang . System . getProperty ( uk . gov . gchq . gaffer . rest . service . v2 . PropertiesServiceV2 . EXPOSED_PROPERTIES ) ; if ( null != propertiesList ) { final java . lang . String [ ] props = propertiesList . split ( "," ) ; isExposed = org . apache . commons . lang3 . ArrayUtils . contains ( props , propertyName ) ; } } java . lang . String prop ; if ( isExposed ) { prop = java . lang . System . getProperty ( propertyName ) ; if ( ( null == prop ) && isCore ) { prop = uk . gov . gchq . gaffer . rest . service . v2 . PropertiesServiceV2 . CORE_EXPOSED_PROPERTIES . get ( propertyName ) ; } } else { prop = null ; } final javax . ws . rs . core . Response . ResponseBuilder builder = ( null == prop ) ? javax . ws . rs . core . Response . status ( 404 ) . entity ( new uk . gov . gchq . gaffer . core . exception . Error . ErrorBuilder ( ) . status ( Status . NOT_FOUND ) . statusCode ( 404 ) . simpleMessage ( ( ( "Property:<sp>" + propertyName ) + "<sp>could<sp>not<sp>be<sp>found." ) ) . build ( ) ) . type ( MediaType . APPLICATION_JSON_TYPE ) : javax . ws . rs . core . Response . ok ( prop ) . type ( MediaType . TEXT_PLAIN_TYPE ) ; return builder . header ( ServiceConstants . GAFFER_MEDIA_TYPE_HEADER , ServiceConstants . GAFFER_MEDIA_TYPE ) . build ( ) ; }
org . junit . Assert . assertEquals ( exceptedPropertyValue , propertyValue )
testGetFrameTimeStampsFromDurations ( ) { int [ ] frameDurationsMs = new int [ ] { 30 , 30 , 60 , 30 , 30 } ; com . facebook . imagepipeline . animated . util . AnimatedDrawableUtil util = new com . facebook . imagepipeline . animated . util . AnimatedDrawableUtil ( ) ; int [ ] frameTimestampsMs = util . getFrameTimeStampsFromDurations ( frameDurationsMs ) ; int [ ] expected = new int [ ] { 0 , 30 , 60 , 120 , 150 } ; "<AssertPlaceHolder>" ; } getFrameTimeStampsFromDurations ( int [ ] ) { int [ ] frameTimestampsMs = new int [ frameDurationsMs . length ] ; int accumulatedDurationMs = 0 ; for ( int i = 0 ; i < ( frameDurationsMs . length ) ; i ++ ) { frameTimestampsMs [ i ] = accumulatedDurationMs ; accumulatedDurationMs += frameDurationsMs [ i ] ; } return frameTimestampsMs ; }
org . junit . Assert . assertArrayEquals ( expected , frameTimestampsMs )
notify_withException ( ) { failureCollector . notify ( exceptionFailure ) ; "<AssertPlaceHolder>" ; } getFailureCount ( ) { return ( criticalFailureCounter . get ( ) ) + ( nonCriticalFailureCounter . get ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , failureCollector . getFailureCount ( ) )
thiophene ( ) { org . openscience . cdk . interfaces . IAtomContainer container = new org . openscience . cdk . silent . AtomContainer ( 9 , 9 , 0 , 0 ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "H" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "C" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "C" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "H" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "C" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "H" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "C" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "H" , 0 ) ) ; container . addAtom ( org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . atom ( "S" , 0 ) ) ; container . addBond ( 0 , 1 , IBond . Order . SINGLE ) ; container . addBond ( 1 , 2 , IBond . Order . DOUBLE ) ; container . addBond ( 2 , 3 , IBond . Order . SINGLE ) ; container . addBond ( 2 , 4 , IBond . Order . SINGLE ) ; container . addBond ( 4 , 5 , IBond . Order . SINGLE ) ; container . addBond ( 4 , 6 , IBond . Order . DOUBLE ) ; container . addBond ( 6 , 7 , IBond . Order . SINGLE ) ; container . addBond ( 6 , 8 , IBond . Order . SINGLE ) ; container . addBond ( 1 , 8 , IBond . Order . SINGLE ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "HC" , "C5A" , "C5B" , "HC" , "C5B" , "HC" , "C5A" , "HC" , "STHI" } ; java . lang . String [ ] actual = org . openscience . cdk . forcefield . mmff . MmffAtomTypeMatcherTest . INSTANCE . symbolicTypes ( container ) ; "<AssertPlaceHolder>" ; } symbolicTypes ( org . openscience . cdk . interfaces . IAtomContainer ) { org . openscience . cdk . forcefield . mmff . EdgeToBondMap bonds = org . openscience . cdk . forcefield . mmff . EdgeToBondMap . withSpaceFor ( container ) ; int [ ] [ ] graph = org . openscience . cdk . graph . GraphUtil . toAdjList ( container , bonds ) ; return symbolicTypes ( container , graph , bonds , new java . util . HashSet < org . openscience . cdk . interfaces . IBond > ( ) ) ; }
org . junit . Assert . assertArrayEquals ( expected , actual )
testOwnerQuery ( ) { org . nuxeo . ecm . automation . OperationContext ctx = new org . nuxeo . ecm . automation . OperationContext ( session ) ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap ( ) ; params . put ( "query" , "FROM<sp>LogEntry<sp>log<sp>WHERE<sp>log.principalName=?" ) ; params . put ( "pageSize" , org . nuxeo . ecm . automation . core . test . TestDocumentAuditPageProviderOperation . MAX_ENTRIES ) ; params . put ( "maxResults" , org . nuxeo . ecm . automation . core . test . TestDocumentAuditPageProviderOperation . MAX_ENTRIES ) ; params . put ( "currentPageIndex" , 0 ) ; org . nuxeo . ecm . automation . core . util . StringList queryParams = new org . nuxeo . ecm . automation . core . util . StringList ( ) ; queryParams . add ( "$currentUser" ) ; params . put ( "queryParams" , queryParams ) ; java . util . List < org . nuxeo . ecm . platform . audit . api . LogEntry > entries = ( ( java . util . List < org . nuxeo . ecm . platform . audit . api . LogEntry > ) ( service . run ( ctx , AuditPageProviderOperation . ID , params ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return getCollectedDocumentIds ( ) . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( entries . size ( ) ) > 0 ) )
shouldAppendCorrelationId ( ) { java . lang . String expectedUri = "http://localhost?teste=teste&correlationId=" + ( correlationId . toString ( ) ) ; java . lang . String uri = httpClient . appendCorrelationId ( "http://localhost?teste=teste" ) ; "<AssertPlaceHolder>" ; } appendCorrelationId ( java . lang . String ) { java . net . URI oldUri = new java . net . URI ( uri ) ; java . lang . String newQuery = oldUri . getQuery ( ) ; java . lang . String correlationId = java . util . UUID . randomUUID ( ) . toString ( ) ; br . com . uol . pagseguro . api . utils . RequestMap correlationMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; correlationMap . putString ( "correlationId" , correlationId ) ; br . com . uol . pagseguro . api . http . AuthenticatedHttpClient . LOGGER . info ( java . lang . String . format ( "Correlation<sp>Id:<sp>%s" , correlationId ) ) ; java . lang . String correlationIdQuery = java . net . URLDecoder . decode ( correlationMap . toUrlEncode ( CharSet . ENCODING_UTF ) , CharSet . ENCODING_UTF ) ; if ( newQuery == null ) { newQuery = correlationIdQuery ; } else { newQuery += "&" + correlationIdQuery ; } return new java . net . URI ( oldUri . getScheme ( ) , oldUri . getAuthority ( ) , oldUri . getPath ( ) , newQuery , oldUri . getFragment ( ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedUri , uri )
velocityEnables ( ) { com . djrapitops . plan . system . PlanSystem velocitySystem = com . djrapitops . plan . VelocitySystemTest . component . getPlanSystem ( ) ; try { com . djrapitops . plan . system . settings . config . PlanConfig config = velocitySystem . getConfigSystem ( ) . getConfig ( ) ; config . set ( WebserverSettings . PORT , TEST_PORT_NUMBER ) ; config . set ( ProxySettings . IP , "8.8.8.8" ) ; com . djrapitops . plan . system . database . DBSystem dbSystem = velocitySystem . getDatabaseSystem ( ) ; com . djrapitops . plan . db . SQLiteDB db = dbSystem . getSqLiteFactory ( ) . usingDefaultFile ( ) ; db . setTransactionExecutorServiceProvider ( MoreExecutors :: newDirectExecutorService ) ; dbSystem . setActiveDatabase ( db ) ; velocitySystem . enable ( ) ; "<AssertPlaceHolder>" ; } finally { velocitySystem . disable ( ) ; } } isEnabled ( ) { return enabled ; }
org . junit . Assert . assertTrue ( velocitySystem . isEnabled ( ) )
model_2 ( ) { org . apache . jena . rdf . model . Model assem = org . apache . jena . util . FileManager . get ( ) . loadModel ( ( ( org . apache . jena . sdb . test . misc . TestAssembler . dir ) + "graph-assembler.ttl" ) ) ; org . apache . jena . rdf . model . Resource x = assem . getResource ( "http://example/test#graphNamed" ) ; org . apache . jena . rdf . model . Model model = ( ( org . apache . jena . rdf . model . Model ) ( Assembler . general . open ( x ) ) ) ; "<AssertPlaceHolder>" ; } open ( java . lang . String ) { java . lang . String uriSchemeName = org . apache . jena . util . FileUtils . getScheme ( uri ) ; if ( ! ( "jar" . equalsIgnoreCase ( uriSchemeName ) ) ) { return null ; } java . lang . String [ ] parts = uri . substring ( 4 ) . split ( "!" ) ; if ( ( parts . length ) != 2 ) { return null ; } if ( parts [ 0 ] . toLowerCase ( ) . startsWith ( "file:" ) ) { parts [ 0 ] = parts [ 0 ] . substring ( 5 ) ; } if ( parts [ 1 ] . startsWith ( "/" ) ) { parts [ 1 ] = parts [ 1 ] . substring ( 1 ) ; } org . apache . jena . riot . system . stream . LocatorZip zl = new org . apache . jena . riot . system . stream . LocatorZip ( parts [ 0 ] ) ; return zl . open ( parts [ 1 ] ) ; }
org . junit . Assert . assertNotNull ( model )
testBerichtleegZonderFouten ( ) { nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht bericht = new nl . bzk . brp . business . dto . bijhouding . VerhuizingBericht ( ) ; nl . bzk . brp . business . dto . BerichtContext context = new nl . bzk . brp . business . dto . BerichtContext ( new nl . bzk . brp . business . dto . BerichtenIds ( 1L , 1L ) , 1 , new nl . bzk . brp . model . gedeeld . Partij ( ) , "ref" ) ; nl . bzk . brp . business . dto . BerichtResultaat resultaat = new nl . bzk . brp . business . dto . BerichtResultaat ( null ) ; bedrijfsregelValidatieStap . corrigeerVoorOverrulebareFouten ( bericht , context , resultaat ) ; "<AssertPlaceHolder>" ; } getMeldingen ( ) { return java . util . Collections . unmodifiableSet ( meldingen ) ; }
org . junit . Assert . assertEquals ( 0 , resultaat . getMeldingen ( ) . size ( ) )
empty ( ) { org . jboss . hal . dmr . ResourceAddress input = new org . jboss . hal . dmr . ResourceAddress ( ) ; org . jboss . hal . dmr . ResourceAddress expected = new org . jboss . hal . dmr . ResourceAddress ( ) ; org . jboss . hal . dmr . ResourceAddress result = processor . apply ( input ) ; "<AssertPlaceHolder>" ; } apply ( org . jboss . hal . meta . AddressTemplate ) { org . jboss . hal . meta . AddressTemplate modified = org . jboss . hal . meta . AddressTemplate . ROOT ; if ( ( template != null ) && ( ! ( AddressTemplate . ROOT . equals ( template ) ) ) ) { java . util . List < java . lang . String [ ] > segments = stream ( template . spliterator ( ) , false ) . map ( ( segment ) -> { if ( segment . contains ( "=" ) ) { return com . google . common . base . Splitter . on ( '=' ) . omitEmptyStrings ( ) . trimResults ( ) . limit ( 2 ) . splitToList ( segment ) . toArray ( new java . lang . String [ 2 ] ) ; } return new java . lang . String [ ] { segment , null } ; } ) . collect ( toList ( ) ) ; java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; org . jboss . hal . meta . description . SegmentProcessor . process ( segments , ( segment ) -> { builder . append ( "/" ) . append ( segment [ 0 ] ) ; if ( ( segment [ 1 ] ) != null ) { builder . append ( "=" ) . append ( segment [ 1 ] ) ; } } ) ; modified = org . jboss . hal . meta . AddressTemplate . of ( builder . toString ( ) ) ; } org . jboss . hal . meta . description . ResourceDescriptionTemplateProcessor . logger . debug ( "{}<sp>-><sp>{}" , template , modified ) ; return modified ; }
org . junit . Assert . assertEquals ( expected , result )
testCreate_attrRegex_invalid ( ) { com . github . mygreen . supercsv . builder . FieldAccessor field = getFieldAccessor ( com . github . mygreen . supercsv . cellprocessor . constraint . PatternFactoryTest . ErrorCsv . class , "col_regex_invalid" , comparator ) ; com . github . mygreen . supercsv . builder . standard . StringProcessorBuilder builder = ( ( com . github . mygreen . supercsv . builder . standard . StringProcessorBuilder ) ( builderResolver . resolve ( java . lang . String . class ) ) ) ; com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < java . lang . String > formatter = builder . getFormatter ( field , config ) ; com . github . mygreen . supercsv . annotation . constraint . CsvPattern anno = field . getAnnotationsByGroup ( com . github . mygreen . supercsv . annotation . constraint . CsvPattern . class , groupEmpty ) . get ( 0 ) ; try { factory . create ( anno , java . util . Optional . empty ( ) , field , formatter , config ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" . isInstanceOf ( com . github . mygreen . supercsv . exception . SuperCsvInvalidAnnotationException . class ) . hasMessage ( "'%s'<sp><sp>@CsvPattern<sp><sp>'regex'<sp>aaa)abc" , field . getNameWithClass ( ) ) ; } } create ( com . github . mygreen . supercsv . annotation . constraint . CsvNumberMax , java . util . Optional , com . github . mygreen . supercsv . builder . FieldAccessor , com . github . mygreen . supercsv . cellprocessor . format . TextFormatter , com . github . mygreen . supercsv . builder . Configuration ) { @ com . github . mygreen . supercsv . cellprocessor . constraint . SuppressWarnings ( "unchecked" ) final com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < N > typeFormatter = ( ( com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < N > ) ( formatter ) ) ; final N max ; try { max = typeFormatter . parse ( anno . value ( ) ) ; } catch ( com . github . mygreen . supercsv . cellprocessor . format . TextParseException e ) { throw new com . github . mygreen . supercsv . exception . SuperCsvInvalidAnnotationException ( anno , com . github . mygreen . supercsv . localization . MessageBuilder . create ( "anno.attr.invalidType" ) . var ( "property" , field . getNameWithClass ( ) ) . varWithAnno ( "anno" , anno . annotationType ( ) ) . var ( "attrName" , "value" ) . var ( "attrValue" , anno . value ( ) ) . varWithClass ( "type" , field . getType ( ) ) . var ( "pattern" , typeFormatter . getPattern ( ) . orElseGet ( null ) ) . format ( true ) , e ) ; } final com . github . mygreen . supercsv . cellprocessor . constraint . NumberMax < N > processor = next . map ( ( n ) -> new NumberMax < com . github . mygreen . supercsv . cellprocessor . constraint . N > ( max , anno . inclusive ( ) , typeFormatter , n ) ) . orElseGet ( ( ) -> new NumberMax < com . github . mygreen . supercsv . cellprocessor . constraint . N > ( max , anno . inclusive ( ) , typeFormatter ) ) ; processor . setValidationMessage ( anno . message ( ) ) ; return java . util . Optional . of ( processor ) ; }
org . junit . Assert . assertThat ( e )
testGetSingleHeader ( ) { com . google . appengine . api . urlfetch . HTTPResponse response = mock ( com . google . appengine . api . urlfetch . HTTPResponse . class ) ; try { com . google . appengine . tools . cloudstorage . oauth . URLFetchUtils . getSingleHeader ( response , "k1" ) ; org . junit . Assert . fail ( "NoSuchElementException<sp>expected" ) ; } catch ( java . util . NoSuchElementException expected ) { } java . util . List < com . google . appengine . api . urlfetch . HTTPHeader > headers = com . google . common . collect . ImmutableList . of ( new com . google . appengine . api . urlfetch . HTTPHeader ( "k3" , "v3" ) , new com . google . appengine . api . urlfetch . HTTPHeader ( "k1" , "v1" ) ) ; when ( response . getHeadersUncombined ( ) ) . thenReturn ( headers ) ; "<AssertPlaceHolder>" ; headers = com . google . common . collect . ImmutableList . of ( new com . google . appengine . api . urlfetch . HTTPHeader ( "k3" , "v3" ) , new com . google . appengine . api . urlfetch . HTTPHeader ( "k1" , "v1" ) , new com . google . appengine . api . urlfetch . HTTPHeader ( "k1" , "v2" ) ) ; when ( response . getHeadersUncombined ( ) ) . thenReturn ( headers ) ; try { com . google . appengine . tools . cloudstorage . oauth . URLFetchUtils . getSingleHeader ( response , "k1" ) ; org . junit . Assert . fail ( "NoSuchElementException<sp>expected" ) ; } catch ( java . lang . IllegalArgumentException expected ) { } } getSingleHeader ( com . google . appengine . api . urlfetch . HTTPResponse , java . lang . String ) { return com . google . common . collect . Iterables . getOnlyElement ( com . google . appengine . tools . cloudstorage . oauth . URLFetchUtils . getHeaders ( resp , headerName ) ) . getValue ( ) ; }
org . junit . Assert . assertEquals ( "v1" , com . google . appengine . tools . cloudstorage . oauth . URLFetchUtils . getSingleHeader ( response , "k1" ) )
testBuildItemLabelForRuntime ( ) { queryResultItem . setRuntimeName ( org . guvnor . ala . ui . backend . service . RuntimeListItemBuilderTest . RUNTIME_NAME ) ; org . guvnor . ala . ui . model . RuntimeListItem result = org . guvnor . ala . ui . backend . service . RuntimeListItemBuilder . newInstance ( ) . withItem ( queryResultItem ) . build ( ) ; "<AssertPlaceHolder>" ; } getItemLabel ( ) { return itemLabel ; }
org . junit . Assert . assertEquals ( org . guvnor . ala . ui . backend . service . RuntimeListItemBuilderTest . RUNTIME_NAME , result . getItemLabel ( ) )
equalsContent_shouldIndicateUnequalWhenOnlyLatitudeDiffers ( ) { org . openmrs . PersonAddress address1 = new org . openmrs . PersonAddress ( ) ; org . openmrs . PersonAddress address2 = new org . openmrs . PersonAddress ( ) ; address2 . setLatitude ( "-23.33" ) ; address1 . setLatitude ( "43.3" ) ; "<AssertPlaceHolder>" ; } equalsContent ( org . openmrs . PersonAttribute ) { boolean returnValue = true ; java . lang . String [ ] methods = new java . lang . String [ ] { "getAttributeType" , "getValue" , "getVoided" } ; java . lang . Class attributeClass = this . getClass ( ) ; for ( java . lang . String methodAttribute : methods ) { try { java . lang . reflect . Method method = attributeClass . getMethod ( methodAttribute ) ; java . lang . Object thisValue = method . invoke ( this ) ; java . lang . Object otherValue = method . invoke ( otherAttribute ) ; if ( otherValue != null ) { returnValue &= otherValue . equals ( thisValue ) ; } } catch ( java . lang . NoSuchMethodException e ) { org . openmrs . PersonAttribute . log . warn ( ( "No<sp>such<sp>method<sp>for<sp>comparison<sp>" + methodAttribute ) , e ) ; } catch ( java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { org . openmrs . PersonAttribute . log . error ( "Error<sp>while<sp>comparing<sp>attributes" , e ) ; } } return returnValue ; }
org . junit . Assert . assertThat ( address2 . equalsContent ( address1 ) , org . hamcrest . CoreMatchers . is ( false ) )
testAddToMultipleLogsAndRecover ( ) { org . junit . Assume . assumeFalse ( isWindowsEnvironment ( ) ) ; final java . util . List < org . apache . nifi . provenance . search . SearchableField > searchableFields = new java . util . ArrayList ( ) ; searchableFields . add ( SearchableFields . ComponentID ) ; final org . apache . nifi . provenance . RepositoryConfiguration config = org . apache . nifi . provenance . ITestPersistentProvenanceRepository . createConfiguration ( ) ; config . setMaxEventFileCapacity ( ( 1024L * 1024L ) ) ; config . setMaxEventFileLife ( 2 , TimeUnit . SECONDS ) ; config . setSearchableFields ( searchableFields ) ; repo = new org . apache . nifi . provenance . PersistentProvenanceRepository ( config , org . apache . nifi . provenance . ITestPersistentProvenanceRepository . DEFAULT_ROLLOVER_MILLIS ) ; repo . initialize ( getEventReporter ( ) , null , null , IdentifierLookup . EMPTY ) ; final java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap ( ) ; attributes . put ( "abc" , "xyz" ) ; attributes . put ( "xyz" , "abc" ) ; attributes . put ( "uuid" , java . util . UUID . randomUUID ( ) . toString ( ) ) ; final org . apache . nifi . provenance . ProvenanceEventBuilder builder = new org . apache . nifi . provenance . StandardProvenanceEventRecord . Builder ( ) ; builder . setEventTime ( java . lang . System . currentTimeMillis ( ) ) ; builder . setEventType ( ProvenanceEventType . RECEIVE ) ; builder . setTransitUri ( "nifi://unit-test" ) ; builder . fromFlowFile ( org . apache . nifi . provenance . TestUtil . createFlowFile ( 3L , 3000L , attributes ) ) ; builder . setComponentId ( "1234" ) ; builder . setComponentType ( "dummy<sp>processor" ) ; final org . apache . nifi . provenance . ProvenanceEventRecord record = builder . build ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { repo . registerEvent ( record ) ; } builder . setComponentId ( "XXXX" ) ; attributes . put ( "uuid" , "11111111-1111-1111-1111-111111111111" ) ; builder . fromFlowFile ( org . apache . nifi . provenance . TestUtil . createFlowFile ( 11L , 11L , attributes ) ) ; repo . registerEvent ( builder . build ( ) ) ; repo . waitForRollover ( ) ; java . lang . Thread . sleep ( 500L ) ; attributes . put ( "uuid" , "22222222-2222-2222-2222-222222222222" ) ; builder . fromFlowFile ( org . apache . nifi . provenance . TestUtil . createFlowFile ( 11L , 11L , attributes ) ) ; repo . registerEvent ( builder . build ( ) ) ; repo . waitForRollover ( ) ; final org . apache . nifi . provenance . search . Query query = new org . apache . nifi . provenance . search . Query ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; query . addSearchTerm ( org . apache . nifi . provenance . search . SearchTerms . newSearchTerm ( SearchableFields . ComponentID , "XXXX" ) ) ; query . setMaxResults ( 100 ) ; final org . apache . nifi . provenance . search . QueryResult result = repo . queryEvents ( query , createUser ( ) ) ; "<AssertPlaceHolder>" ; for ( final org . apache . nifi . provenance . ProvenanceEventRecord match : result . getMatchingEvents ( ) ) { System . out . println ( match ) ; } } getMatchingEvents ( ) { readLock . lock ( ) ; try { return new java . util . ArrayList ( matchingRecords ) ; } finally { readLock . unlock ( ) ; } }
org . junit . Assert . assertEquals ( 2 , result . getMatchingEvents ( ) . size ( ) )
executeEmptyRowWithMappings ( ) { this . cut . columnMappings . put ( "duke" , new com . airhacks . enhydrator . transform . ColumnCopier . NameList ( java . util . Arrays . asList ( "java" , "javaee" ) ) ) ; com . airhacks . enhydrator . in . Row row = new com . airhacks . enhydrator . in . Row ( ) ; com . airhacks . enhydrator . in . Row withCopiedColumns = this . cut . execute ( row ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return this . columnByName . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( withCopiedColumns . isEmpty ( ) )
when_tryProcess0_then_delegatesToTryProcess ( ) { boolean done = p . tryProcess0 ( com . hazelcast . jet . core . AbstractProcessorTest . MOCK_ITEM ) ; "<AssertPlaceHolder>" ; p . validateReceptionOfItem ( com . hazelcast . jet . core . AbstractProcessorTest . ORDINAL_0 , com . hazelcast . jet . core . AbstractProcessorTest . MOCK_ITEM ) ; } tryProcess0 ( java . lang . Object ) { T t = ( ( T ) ( item ) ) ; K key = keyFn . apply ( t ) ; V value = projectFn . apply ( t ) ; lookupTable . merge ( key , value , com . hazelcast . jet . impl . processor . HashJoinCollectP . MERGE_FN ) ; return true ; }
org . junit . Assert . assertTrue ( done )
test_createAndSendMail_noEmailReceipients ( ) { boolean result = notificationService . createAndSendMail ( "subject" , "content" , null ) ; "<AssertPlaceHolder>" ; } createAndSendMail ( java . lang . String , java . lang . String , javax . mail . Address [ ] ) { boolean deliverEmails = ch . puzzle . itc . mobiliar . common . util . ConfigurationService . getPropertyAsBoolean ( ConfigKey . DELIVER_MAIL , true ) ; if ( ( deliverEmails && ( emailReceipients != null ) ) && ( ( emailReceipients . length ) > 0 ) ) { return mailService . createMessageAndSend ( subject , content , emailReceipients ) ; } return false ; }
org . junit . Assert . assertFalse ( result )
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; org . jmeterplugins . protocol . http . control . gui . HttpSimpleTableControlGui instance = new org . jmeterplugins . protocol . http . control . gui . HttpSimpleTableControlGui ( ) ; java . lang . String expResult = "HttpSimpleTableControlGui" ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) { return this . getClass ( ) . getSimpleName ( ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testMalformedPathInfoReturnsError ( ) { org . eclipse . jetty . server . Request baseRequest = createMock ( org . eclipse . jetty . server . Request . class ) ; expect ( baseRequest . getPathInfo ( ) ) . andReturn ( "/..upADirectory" ) ; com . facebook . buck . util . trace . BuildTraces buildTraces = createMock ( com . facebook . buck . util . trace . BuildTraces . class ) ; replayAll ( ) ; com . facebook . buck . httpserver . TraceHandlerDelegate traceHandler = new com . facebook . buck . httpserver . TraceHandlerDelegate ( buildTraces ) ; "<AssertPlaceHolder>" ; verifyAll ( ) ; } getDataForRequest ( org . eclipse . jetty . server . Request ) { return com . google . common . collect . ImmutableMap . of ( "traces" , getTraces ( ) ) ; }
org . junit . Assert . assertNull ( traceHandler . getDataForRequest ( baseRequest ) )
testParse5 ( ) { java . lang . String input = "" ; long [ ] result = org . drools . core . base . evaluators . TimeIntervalParser . parse ( input ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( ( paramText == null ) || ( ( paramText . trim ( ) . length ( ) ) == 0 ) ) { return new long [ 0 ] ; } java . lang . String [ ] params = paramText . split ( "," ) ; long [ ] result = new long [ params . length ] ; for ( int i = 0 ; i < ( params . length ) ; i ++ ) { result [ i ] = org . drools . core . base . evaluators . TimeIntervalParser . parseSingle ( params [ i ] ) ; } return result ; }
org . junit . Assert . assertEquals ( 0 , result . length )
invalidInputForNoObjectFactoryGeneration ( ) { java . io . File wsdl = getCodegenQEDataFileInput ( "AdcommerceConfigGroupMarketV1.wsdl" ) ; java . lang . String [ ] testArgs = new java . lang . String [ ] { "-dest" 1 , "-dest" 8 , "-genType" , "-dest" 5 , "-wsdl" , wsdl . getAbsolutePath ( ) , "-dest" 7 , "-dest" 0 , "-dest" , destDir . getAbsolutePath ( ) , "-dest" 4 , "klk" 0 , "-dest" 3 , "COMMON" , "-bin" , binDir . getAbsolutePath ( ) , "-dest" 6 , prDir . getAbsolutePath ( ) , "-noObjectFactoryGeneration" , "klk" 1 } ; intfProper . put ( "-dest" 9 , "klk" ) ; createInterfacePropsFile ( intfProper , destDir . getAbsolutePath ( ) ) ; performDirectCodeGen ( testArgs , binDir ) ; java . io . File file = new java . io . File ( ( ( destDir . getAbsolutePath ( ) ) + "/gen-src/com/ebayopensource/turmeric/common/v1/types/ObjectFactory.java" ) ) ; "<AssertPlaceHolder>" ; } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
org . junit . Assert . assertFalse ( file . exists ( ) )
given_a_persisted_order_when_find_by_id_with_transactional_then_found ( ) { org . aggregateframework . sample . complexmodel . command . domain . entity . BookingOrder bookingOrder = buildOrder ( ) ; orderRepository . save ( bookingOrder ) ; orderRepository . flush ( ) ; org . aggregateframework . sample . complexmodel . command . domain . entity . BookingOrder foundBookingOrder = orderRepository . findOne ( bookingOrder . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( foundBookingOrder . getId ( ) . equals ( bookingOrder . getId ( ) ) )
testPut ( ) { org . jboss . resteasy . test . resource . basic . GenericResourceTest . proxy . put ( 2 , new org . jboss . resteasy . test . resource . basic . resource . GenericResourceStudent ( "John<sp>Doe" ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { org . jboss . resteasy . test . resource . basic . resource . UriInfoSimpleResource . logger . info ( ( "abs<sp>query:<sp>" + abs ) ) ; java . net . URI base = null ; if ( abs == null ) { base = org . jboss . resteasy . utils . PortProviderUtil . createURI ( "/" , org . jboss . resteasy . test . resource . basic . resource . UriInfoSimpleResource . class . getSimpleName ( ) ) ; } else { base = org . jboss . resteasy . utils . PortProviderUtil . createURI ( ( ( "/" + abs ) + "/" ) , org . jboss . resteasy . test . resource . basic . resource . UriInfoSimpleResource . class . getSimpleName ( ) ) ; } org . jboss . resteasy . test . resource . basic . resource . UriInfoSimpleResource . logger . info ( ( "BASE<sp>URI:<sp>" + ( myInfo . getBaseUri ( ) ) ) ) ; org . jboss . resteasy . test . resource . basic . resource . UriInfoSimpleResource . logger . info ( ( "Request<sp>URI:<sp>" + ( myInfo . getRequestUri ( ) ) ) ) ; org . junit . Assert . assertEquals ( base . getPath ( ) , myInfo . getBaseUri ( ) . getPath ( ) ) ; org . junit . Assert . assertEquals ( "/simple/fromField" , myInfo . getPath ( ) ) ; return "CONTENT" ; }
org . junit . Assert . assertTrue ( org . jboss . resteasy . test . resource . basic . GenericResourceTest . proxy . get ( 2 ) . getName ( ) . equals ( "John<sp>Doe" ) )
testInjectionInWar ( ) { "<AssertPlaceHolder>" ; } getSession ( ) { return session ; }
org . junit . Assert . assertNotNull ( consumer . getSession ( ) )
Should_cancelOldEntryWhenItIsOverriddenByNewOne ( ) { when ( entries [ 1 ] . getId ( ) ) . thenReturn ( "0" ) ; info . smart_tools . smartactors . scheduler . actor . impl . EntryStorage storage = new info . smart_tools . smartactors . scheduler . actor . impl . EntryStorage ( remoteEntryStorage , null ) ; storage . notifyActive ( entries [ 0 ] ) ; storage . notifyActive ( entries [ 1 ] ) ; verify ( entries [ 0 ] ) . cancel ( ) ; "<AssertPlaceHolder>" ; } getEntry ( java . lang . String ) { try { info . smart_tools . smartactors . scheduler . interfaces . ISchedulerEntry localEntry = getLocalEntry ( id ) ; if ( null != localEntry ) { return localEntry ; } info . smart_tools . smartactors . iobject . iobject . IObject savedEntryState = remoteEntryStorage . querySingleEntry ( id ) ; return info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "restore<sp>scheduler<sp>entry" ) , savedEntryState , this ) ; } catch ( info . smart_tools . smartactors . ioc . iioccontainer . exception . ResolutionException e ) { throw new info . smart_tools . smartactors . scheduler . actor . impl . EntryStorageAccessException ( "Error<sp>occurred<sp>restoring<sp>required<sp>entry<sp>from<sp>state<sp>saved<sp>in<sp>remote<sp>storage." ) ; } catch ( info . smart_tools . smartactors . scheduler . actor . impl . exceptions . CancelledLocalEntryRequestException e ) { throw new info . smart_tools . smartactors . scheduler . actor . impl . EntryNotFoundException ( "The<sp>entry<sp>was<sp>not<sp>found<sp>as<sp>it<sp>was<sp>cancelled<sp>recently." ) ; } }
org . junit . Assert . assertSame ( entries [ 1 ] , storage . getEntry ( "0" ) )
testCreateInstance ( ) { com . runabove . api . RunAboveManager runAboveApi = login ( ) ; com . runabove . model . instance . InstanceDetail instanceDetail = new com . runabove . model . instance . InstanceDetail ( ) ; com . runabove . model . instance . Flavor [ ] flavors = runAboveApi . getFlavor ( ) ; instanceDetail . setFlavor ( flavors [ 0 ] ) ; java . lang . String [ ] regions = runAboveApi . getRegions ( ) ; instanceDetail . setRegion ( regions [ 0 ] ) ; com . runabove . model . image . Image [ ] imgs = runAboveApi . getImages ( ) ; instanceDetail . setImage ( imgs [ 0 ] ) ; com . runabove . model . instance . InstanceDetail resultInstance = runAboveApi . createInstance ( instanceDetail ) ; com . runabove . model . instance . Instance [ ] listInstances = runAboveApi . getInstances ( ) ; "<AssertPlaceHolder>" ; for ( com . runabove . model . instance . Instance instance : listInstances ) { com . runabove . ApiTest . LOG . info ( ( "instance<sp>id<sp>" + ( instance . getInstanceId ( ) ) ) ) ; com . runabove . ApiTest . LOG . info ( ( "instance<sp>name<sp>" + ( instance . getName ( ) ) ) ) ; } runAboveApi . deleteInstance ( resultInstance . getInstanceId ( ) , new retrofit . Callback < java . lang . Void > ( ) { public void failure ( retrofit . RetrofitError arg0 ) { com . runabove . ApiTest . LOG . info ( "instance<sp>deletion<sp>failed" ) ; } public void success ( java . lang . Void arg0 , retrofit . client . Response arg1 ) { com . runabove . ApiTest . LOG . info ( "instance<sp>deletion<sp>successful" ) ; } } ) ; } getInstances ( ) { return instances ; }
org . junit . Assert . assertNotNull ( listInstances )
testParagraphsWithNamespaces ( ) { java . lang . String html = ( ( header ) + "<w:p>paragraph</w:p>" ) + ( footer ) ; org . xwiki . xml . html . HTMLCleanerConfiguration configuration = this . officeHTMLCleaner . getDefaultConfiguration ( ) ; configuration . setParameters ( java . util . Collections . singletonMap ( HTMLCleanerConfiguration . NAMESPACES_AWARE , "false" ) ) ; org . w3c . dom . Document doc = wysiwygHTMLCleaner . clean ( new java . io . StringReader ( html ) , configuration ) ; org . w3c . dom . NodeList nodes = doc . getElementsByTagName ( "p" ) ; "<AssertPlaceHolder>" ; } getLength ( ) { return org . xwiki . extension . script . internal . safe . SafeExtensionFile . getWrapped ( ) . getLength ( ) ; }
org . junit . Assert . assertEquals ( 1 , nodes . getLength ( ) )
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFNotaInfoCobranca><fat><nFat>KDVAp0aewPjmHaTsjbDX1O6NOR9tc7TxGflFLXsMZt2hEKar3oqzZ11uzEQF</nFat><vOrig>3001.15</vOrig><vDesc>0.15</vDesc><vLiq>3000.00</vLiq></fat><dup><nDup>TQ49cyOL5KtBAUTF0LShhThpUbtCK1fQH1PH4AMcKzMNLxyDbV957IRhWK8Z</nDup><dVenc>2014-07-10</dVenc><vDup>999999.99</vDup></dup></NFNotaInfoCobranca>" ; "<AssertPlaceHolder>" ; } getNFNotaInfoCobranca ( ) { final com . fincatto . documentofiscal . nfe400 . NFNotaInfoCobranca cobranca = new com . fincatto . documentofiscal . nfe400 . NFNotaInfoCobranca ( ) ; cobranca . setFatura ( com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFNotaInfoFatura ( ) ) ; cobranca . setParcelas ( java . util . Collections . singletonList ( com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFNotaInfoDuplicata ( ) ) ) ; return cobranca ; }
org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFNotaInfoCobranca ( ) . toString ( ) )
testForLongArray ( ) { java . lang . Long [ ] longArr = new java . lang . Long [ 2 ] ; longArr [ 0 ] = 1L ; longArr [ 1 ] = 2L ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PLong . INSTANCE , longArr ) ; PLongArray . INSTANCE . toObject ( arr , PLongArray . INSTANCE ) ; byte [ ] bytes = PLongArray . INSTANCE . toBytes ( arr ) ; org . apache . phoenix . schema . types . PhoenixArray resultArr = ( ( org . apache . phoenix . schema . types . PhoenixArray ) ( PLongArray . INSTANCE . toObject ( bytes , 0 , bytes . length ) ) ) ; "<AssertPlaceHolder>" ; } toObject ( java . lang . Object , org . apache . phoenix . schema . types . PDataType , org . apache . phoenix . schema . SortOrder ) { return toObject ( object , actualType ) ; }
org . junit . Assert . assertEquals ( arr , resultArr )
testCreate ( ) { System . out . println ( "create" ) ; com . pearson . docussandra . domain . objects . Table entity = com . pearson . docussandra . testhelper . Fixtures . createTestTable ( ) ; com . pearson . docussandra . persistence . TableRepository instance = new com . pearson . docussandra . persistence . impl . TableRepositoryImpl ( com . pearson . docussandra . persistence . impl . TableRepositoryImplTest . f . getSession ( ) ) ; com . pearson . docussandra . domain . objects . Table result = instance . create ( entity ) ; "<AssertPlaceHolder>" ; } create ( com . pearson . docussandra . domain . objects . Table ) { if ( ! ( databases . exists ( entity . getDatabase ( ) . getId ( ) ) ) ) { throw new com . pearson . docussandra . exception . ItemNotFoundException ( ( "Database<sp>not<sp>found:<sp>" + ( entity . getDatabase ( ) ) ) ) ; } if ( tables . exists ( entity . getId ( ) ) ) { throw new com . pearson . docussandra . exception . DuplicateItemException ( "Table<sp>name<sp>already<sp>exists" ) ; } com . strategicgains . syntaxe . ValidationEngine . validateAndThrow ( entity ) ; return tables . create ( entity ) ; }
org . junit . Assert . assertEquals ( entity , result )
testNewPacket ( ) { try { org . pcap4j . packet . IcmpV4TimestampPacket p = org . pcap4j . packet . IcmpV4TimestampPacket . newPacket ( packet . getRawData ( ) , 0 , packet . getRawData ( ) . length ) ; "<AssertPlaceHolder>" ; } catch ( org . pcap4j . packet . IllegalRawDataException e ) { throw new java . lang . AssertionError ( e ) ; } } getRawData ( ) { byte [ ] rawData = new byte [ length ( ) ] ; rawData [ 0 ] = getType ( ) . value ( ) ; rawData [ 1 ] = length ; rawData [ 2 ] = pointer ; rawData [ 3 ] = flag . value ( ) ; rawData [ 3 ] = ( ( byte ) ( ( rawData [ 3 ] ) | ( ( overflow ) << 4 ) ) ) ; if ( ( data ) != null ) { java . lang . System . arraycopy ( data . getRawData ( ) , 0 , rawData , 4 , data . length ( ) ) ; } return rawData ; }
org . junit . Assert . assertEquals ( packet , p )
test_buildUriContent_wrongController ( ) { javax . servlet . http . HttpServletResponse responseMock = org . easymock . EasyMock . createMock ( javax . servlet . http . HttpServletResponse . class ) ; javax . servlet . http . HttpServletRequest requestMock = org . easymock . EasyMock . createMock ( javax . servlet . http . HttpServletRequest . class ) ; com . webpagebytes . cms . cmsdata . WPBUri uriMock = org . easymock . EasyMock . createMock ( com . webpagebytes . cms . cmsdata . WPBUri . class ) ; org . easymock . EasyMock . expect ( uriMock . getControllerClass ( ) ) . andReturn ( "com.webpagebytes.cms.DoesNotExist" ) ; com . webpagebytes . cms . engine . InternalModel model = new com . webpagebytes . cms . engine . InternalModel ( ) ; com . webpagebytes . cms . WPBForward forward = new com . webpagebytes . cms . WPBForward ( ) ; try { org . easymock . EasyMock . replay ( responseMock , requestMock , uriMock , cacheInstancesMock , modelBuilderMock ) ; uriContentBuilder . buildUriContent ( requestMock , responseMock , uriMock , model , forward ) ; org . easymock . EasyMock . verify ( responseMock , requestMock , uriMock , cacheInstancesMock , modelBuilderMock ) ; } catch ( com . webpagebytes . cms . exception . WPBException e ) { } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } buildUriContent ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse , com . webpagebytes . cms . cmsdata . WPBUri , com . webpagebytes . cms . WPBModel , com . webpagebytes . cms . WPBForward ) { java . lang . String controllerClassName = wburi . getControllerClass ( ) ; if ( ( controllerClassName != null ) && ( ( controllerClassName . length ( ) ) > 0 ) ) { com . webpagebytes . cms . WPBRequestHandler controllerInst = null ; if ( customControllers . containsKey ( controllerClassName ) ) { controllerInst = customControllers . get ( controllerClassName ) ; } else { try { controllerInst = ( ( com . webpagebytes . cms . WPBRequestHandler ) ( java . lang . Class . forName ( controllerClassName ) . newInstance ( ) ) ) ; controllerInst . initialize ( contentProvider ) ; customControllers . put ( controllerClassName , controllerInst ) ; } catch ( java . lang . Exception e ) { throw new com . webpagebytes . cms . exception . WPBException ( ( "Cannot<sp>instantiate<sp>page<sp>controller<sp>" + controllerClassName ) , e ) ; } } controllerInst . handleRequest ( request , response , model , forward ) ; } }
org . junit . Assert . assertTrue ( false )
testDownloadBiergarten ( ) { java . util . List < de . bayern . gdi . model . DownloadStep > steps = prepareStep ( de . bayern . gdi . IntegrationTest . DOWNLOAD_CONFIGURATION :: getBiergartenConfiguration ) ; java . lang . String username = "" ; java . lang . String password = "" ; int result = de . bayern . gdi . Headless . runHeadless ( username , password , steps ) ; "<AssertPlaceHolder>" ; } runHeadless ( java . lang . String , java . lang . String , java . util . List ) { de . bayern . gdi . processor . Processor processor = new de . bayern . gdi . processor . Processor ( ) ; processor . addListener ( new de . bayern . gdi . Headless ( ) ) ; java . lang . Thread thread = new java . lang . Thread ( processor ) ; thread . start ( ) ; for ( de . bayern . gdi . model . DownloadStep step : steps ) { try { de . bayern . gdi . processor . DownloadStepConverter dsc = new de . bayern . gdi . processor . DownloadStepConverter ( user , password ) ; processor . addJob ( dsc . convert ( step ) ) ; } catch ( de . bayern . gdi . processor . ConverterException ce ) { de . bayern . gdi . Headless . log . log ( Level . WARNING , "Creating<sp>download<sp>jobs<sp>failed" , ce ) ; } } processor . addJob ( Processor . QUIT_JOB ) ; try { thread . join ( ) ; } catch ( java . lang . InterruptedException ie ) { java . lang . Thread . currentThread ( ) . interrupt ( ) ; return 1 ; } return 0 ; }
org . junit . Assert . assertTrue ( ( result == 0 ) )
withTwoCents ( ) { "<AssertPlaceHolder>" ; } makeChangeWithQuarterDimeNickelPenny ( int ) { int [ ] components = new int [ ] { 25 , 10 , 5 , 1 } ; int [ ] [ ] cache = new int [ n + 1 ] [ components . length ] ; return makeChange ( n , 0 , components , cache ) ; }
org . junit . Assert . assertEquals ( 1 , s . makeChangeWithQuarterDimeNickelPenny ( 3 ) )
testToString ( ) { final java . util . UUID uuid = java . util . UUID . randomUUID ( ) ; "<AssertPlaceHolder>" ; } toString ( java . util . UUID ) { if ( com . eatthepath . uuid . FastUUID . USE_JDK_UUID_TO_STRING ) { return uuid . toString ( ) ; } final long mostSignificantBits = uuid . getMostSignificantBits ( ) ; final long leastSignificantBits = uuid . getLeastSignificantBits ( ) ; final char [ ] uuidChars = new char [ com . eatthepath . uuid . FastUUID . UUID_STRING_LENGTH ] ; uuidChars [ 0 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & - 1152921504606846976L ) > > > 60 ) ) ] ; uuidChars [ 1 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 1080863910568919040L ) > > > 56 ) ) ] ; uuidChars [ 2 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 67553994410557440L ) > > > 52 ) ) ] ; uuidChars [ 3 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 4222124650659840L ) > > > 48 ) ) ] ; uuidChars [ 4 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 263882790666240L ) > > > 44 ) ) ] ; uuidChars [ 5 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 16492674416640L ) > > > 40 ) ) ] ; uuidChars [ 6 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 1030792151040L ) > > > 36 ) ) ] ; uuidChars [ 7 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 64424509440L ) > > > 32 ) ) ] ; uuidChars [ 8 ] = '-' ; uuidChars [ 9 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 4026531840L ) > > > 28 ) ) ] ; uuidChars [ 10 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 251658240L ) > > > 24 ) ) ] ; uuidChars [ 11 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 15728640L ) > > > 20 ) ) ] ; uuidChars [ 12 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 983040L ) > > > 16 ) ) ] ; uuidChars [ 13 ] = '-' ; uuidChars [ 14 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 61440L ) > > > 12 ) ) ] ; uuidChars [ 15 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 3840L ) > > > 8 ) ) ] ; uuidChars [ 16 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( mostSignificantBits & 240L ) > > > 4 ) ) ] ; uuidChars [ 17 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( mostSignificantBits & 15L ) ) ] ; uuidChars [ 18 ] = '-' ; uuidChars [ 19 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & - 1152921504606846976L ) > > > 60 ) ) ] ; uuidChars [ 20 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 1080863910568919040L ) > > > 56 ) ) ] ; uuidChars [ 21 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 67553994410557440L ) > > > 52 ) ) ] ; uuidChars [ 22 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 4222124650659840L ) > > > 48 ) ) ] ; uuidChars [ 23 ] = '-' ; uuidChars [ 24 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 263882790666240L ) > > > 44 ) ) ] ; uuidChars [ 25 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 16492674416640L ) > > > 40 ) ) ] ; uuidChars [ 26 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 1030792151040L ) > > > 36 ) ) ] ; uuidChars [ 27 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 64424509440L ) > > > 32 ) ) ] ; uuidChars [ 28 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 4026531840L ) > > > 28 ) ) ] ; uuidChars [ 29 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits & 251658240L ) > > > 24 ) ) ] ; uuidChars [ 30 ] = com . eatthepath . uuid . FastUUID . HEX_DIGITS [ ( ( int ) ( ( leastSignificantBits &
org . junit . Assert . assertEquals ( uuid . toString ( ) , com . eatthepath . uuid . FastUUID . toString ( uuid ) )
testGetDom ( ) { "<AssertPlaceHolder>" ; } getDom ( ) { return dom ; }
org . junit . Assert . assertEquals ( dom , s . getDom ( ) )
redirectInPipeAndRedirectOutOperator ( ) { org . aesh . tty . TestConnection connection = new org . aesh . tty . TestConnection ( ) ; org . aesh . command . registry . CommandRegistry registry = org . aesh . command . impl . registry . AeshCommandRegistryBuilder . builder ( ) . command ( org . aesh . command . operator . ConsoleRedirectionTest . BarCommand . class ) . command ( org . aesh . command . operator . ConsoleRedirectionTest . ManCommand . class ) . create ( ) ; org . aesh . command . settings . Settings < org . aesh . command . invocation . CommandInvocation , org . aesh . command . converter . ConverterInvocation , org . aesh . command . completer . CompleterInvocation , org . aesh . command . validator . ValidatorInvocation , org . aesh . command . activator . OptionActivator , org . aesh . command . activator . CommandActivator > settings = org . aesh . command . settings . SettingsBuilder . builder ( ) . logging ( true ) . connection ( connection ) . commandRegistry ( registry ) . build ( ) ; final java . io . File fooOut = new java . io . File ( ( ( ( tempDir . getRoot ( ) ) + ( org . aesh . utils . Config . getPathSeparator ( ) ) ) + "foo_redirection_out.txt" ) ) ; final java . io . File foo = new java . io . File ( ( ( ( tempDir . getRoot ( ) ) + ( org . aesh . utils . Config . getPathSeparator ( ) ) ) + "foo_redirection_in.txt" ) ) ; java . io . PrintWriter writer = new java . io . PrintWriter ( foo , "UTF-8" ) ; writer . print ( "FOO<sp>BAR" ) ; writer . close ( ) ; org . aesh . readline . ReadlineConsole console = new org . aesh . readline . ReadlineConsole ( settings ) ; console . start ( ) ; connection . read ( ( ( ( ( "bar<sp><<sp>" + ( foo . getCanonicalPath ( ) ) ) + "<sp>|<sp>man<sp>><sp>" ) + ( fooOut . getCanonicalPath ( ) ) ) + ( org . aesh . utils . Config . getLineSeparator ( ) ) ) ) ; java . lang . Thread . sleep ( 50 ) ; console . stop ( ) ; java . util . List < java . lang . String > output = java . nio . file . Files . readAllLines ( fooOut . toPath ( ) ) ; "<AssertPlaceHolder>" ; } stop ( ) { shell . write ( ANSI . MAIN_BUFFER ) ; }
org . junit . Assert . assertEquals ( "FOO<sp>BAR" , output . get ( 0 ) )
testMultiplyUnitOfQ ( ) { tec . uom . se . AbstractUnit < ? > result = ( ( tec . uom . se . AbstractUnit < ? > ) ( one . multiply ( one ) ) ) ; "<AssertPlaceHolder>" ; } multiply ( java . lang . Number ) { return toDecimalQuantity ( ) . multiply ( that ) ; }
org . junit . Assert . assertEquals ( result , one )
testGet ( ) { com . xiaomi . shepher . model . ReviewRequest reviewRequest = reviewMapper . get ( 1 ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 1 , reviewRequest . getId ( ) )
getDistanceTestPartialSubstringMatch ( ) { java . lang . String needle = "needle" ; java . lang . String noise = "bla" ; java . lang . String haystack = ( "prefix<sp>needle" + noise ) + "<sp>postfix" ; org . eclipse . sw360 . cvesearch . datasource . matcher . Match match = org . eclipse . sw360 . cvesearch . datasource . matcher . ModifiedLevenshteinDistance . levenshteinMatch ( needle , haystack ) ; "<AssertPlaceHolder>" ; } getDistance ( ) { return distance ; }
org . junit . Assert . assertThat ( match . getDistance ( ) , is ( noise . length ( ) ) )
encryptPrivateKey ( ) { java . lang . String keyPhrase = "moreovertelevisionfactorytendencyindependenceinternationalintellectualimpress" + "interestvolunteer" ; java . security . KeyPairGenerator keyGen = java . security . KeyPairGenerator . getInstance ( "RSA" ) ; keyGen . initialize ( 4096 , new java . security . SecureRandom ( ) ) ; java . security . KeyPair keyPair = keyGen . generateKeyPair ( ) ; java . security . PrivateKey privateKey = keyPair . getPrivate ( ) ; byte [ ] privateKeyBytes = privateKey . getEncoded ( ) ; java . lang . String privateKeyString = com . owncloud . android . utils . EncryptionUtils . encodeBytesToBase64String ( privateKeyBytes ) ; java . lang . String encryptedString = com . owncloud . android . utils . EncryptionUtils . encryptPrivateKey ( privateKeyString , keyPhrase ) ; java . lang . String decryptedString = com . owncloud . android . utils . EncryptionUtils . decryptPrivateKey ( encryptedString , keyPhrase ) ; "<AssertPlaceHolder>" ; } decryptPrivateKey ( java . lang . String , java . lang . String ) { java . lang . String [ ] strings = privateKey . split ( com . owncloud . android . utils . EncryptionUtils . ivDelimiter ) ; java . lang . String realPrivateKey = strings [ 0 ] ; byte [ ] iv = com . owncloud . android . utils . EncryptionUtils . decodeStringToBase64Bytes ( strings [ 1 ] ) ; byte [ ] salt = com . owncloud . android . utils . EncryptionUtils . decodeStringToBase64Bytes ( strings [ 2 ] ) ; javax . crypto . Cipher cipher = javax . crypto . Cipher . getInstance ( com . owncloud . android . utils . EncryptionUtils . AES_CIPHER ) ; javax . crypto . SecretKeyFactory factory = javax . crypto . SecretKeyFactory . getInstance ( "PBKDF2WithHmacSHA1" ) ; java . security . spec . KeySpec spec = new javax . crypto . spec . PBEKeySpec ( keyPhrase . toCharArray ( ) , salt , com . owncloud . android . utils . EncryptionUtils . iterationCount , com . owncloud . android . utils . EncryptionUtils . keyStrength ) ; javax . crypto . SecretKey tmp = factory . generateSecret ( spec ) ; javax . crypto . spec . SecretKeySpec key = new javax . crypto . spec . SecretKeySpec ( tmp . getEncoded ( ) , com . owncloud . android . utils . EncryptionUtils . AES ) ; cipher . init ( Cipher . DECRYPT_MODE , key , new javax . crypto . spec . IvParameterSpec ( iv ) ) ; byte [ ] bytes = com . owncloud . android . utils . EncryptionUtils . decodeStringToBase64Bytes ( realPrivateKey ) ; byte [ ] decrypted = cipher . doFinal ( bytes ) ; java . lang . String pemKey = com . owncloud . android . utils . EncryptionUtils . decodeBase64BytesToString ( decrypted ) ; return pemKey . replaceAll ( "\n" , "" ) . replace ( "-----BEGIN<sp>PRIVATE<sp>KEY-----" , "" ) . replace ( "-----END<sp>PRIVATE<sp>KEY-----" , "" ) ; }
org . junit . Assert . assertEquals ( privateKeyString , decryptedString )
checkFileReturnTrue ( ) { java . io . File confFile = new java . io . File ( path ) ; if ( ! ( confFile . exists ( ) ) ) { persistence . saveConfiguration ( com . orange . cepheus . cep . persistence . PersistenceTest . configurationId , getBasicConf ( ) ) ; } "<AssertPlaceHolder>" ; } configurationExists ( java . lang . String ) { if ( ( ( dataPath ) == null ) || ( dataPath . isEmpty ( ) ) ) { com . orange . cepheus . cep . persistence . JsonPersistence . logger . error ( "data.path<sp>is<sp>undefined" ) ; return false ; } return new java . io . File ( ( ( this . dataPath ) + ( idToFilename ( id ) ) ) ) . exists ( ) ; }
org . junit . Assert . assertTrue ( persistence . configurationExists ( com . orange . cepheus . cep . persistence . PersistenceTest . configurationId ) )
testNotSet ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "parser<sp>grammar<sp>P;\n" + ( "tokens<sp>{<sp>A;<sp>B;<sp>C;<sp>}\n" + "a<sp>:<sp>~A<sp>;\n" ) ) ) ; java . lang . String expecting = ".s0->.s1\n" + ( ( ( ".s1->.s2\n" + ".s2-B..C->.s3\n" ) + ".s3->:s4\n" ) + ".s2-B..C->.s3\n" 0 ) ; checkRule ( g , "a" , expecting ) ; java . lang . String expectingGrammarStr = "1:8:<sp>parser<sp>grammar<sp>P;\n" + "a<sp>:<sp>~<sp>A<sp>;" ; "<AssertPlaceHolder>" ; } toString ( ) { return new java . lang . String ( data ) ; }
org . junit . Assert . assertEquals ( expectingGrammarStr , g . toString ( ) )
testTezAttemptRecoveryStagingPath ( ) { java . lang . String strAppId = "testAppId" ; org . apache . hadoop . fs . Path stageDir = org . apache . tez . common . TezCommonUtils . getTezSystemStagingPath ( org . apache . tez . common . TestTezCommonUtils . conf , strAppId ) ; org . apache . hadoop . fs . Path recoveryPath = org . apache . tez . common . TezCommonUtils . getRecoveryPath ( stageDir , org . apache . tez . common . TestTezCommonUtils . conf ) ; org . apache . hadoop . fs . Path recoveryStageDir = org . apache . tez . common . TezCommonUtils . getAttemptRecoveryPath ( recoveryPath , 2 ) ; java . lang . String expectedDir = ( ( ( ( ( ( ( ( org . apache . tez . common . TestTezCommonUtils . RESOLVED_STAGE_DIR ) + ( java . io . File . separatorChar ) ) + ( org . apache . tez . common . TezCommonUtils . TEZ_SYSTEM_SUB_DIR ) ) + ( java . io . File . separatorChar ) ) + strAppId ) + ( java . io . File . separator ) ) + ( org . apache . tez . dag . api . TezConfiguration . DAG_RECOVERY_DATA_DIR_NAME ) ) + ( java . io . File . separator ) ) + "2" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "vertexName=" + ( vertexName ) ) + ",<sp>vertexId=" ) + ( vertexID ) ) + ",<sp>initRequestedTime=" ) + ( initRequestedTime ) ) + ",<sp>initedTime=" ) + ( initedTime ) ) + ",<sp>numTasks=" ) + ( numTasks ) ) + ",<sp>processorName=" ) + ( processorName ) ) + ",<sp>additionalInputsCount=" ) + ( ( additionalInputs ) != null ? additionalInputs . size ( ) : 0 ) ; }
org . junit . Assert . assertEquals ( recoveryStageDir . toString ( ) , expectedDir )
testTest ( ) { logger . info ( "test" ) ; com . datumbox . framework . common . dataobjects . FlatDataCollection flatDataCollection = new com . datumbox . framework . common . dataobjects . FlatDataCollection ( java . util . Arrays . asList ( new java . lang . Object [ ] { 19.5 , 19.8 , 18.9 , 20.4 , 20.2 , 21.5 , 19.9 , 20.9 , 18.1 , 20.5 , 18.3 , 19.5 , 18.3 , 19.0 , 18.2 , 23.9 , 17.0 , 19.7 , 21.7 , 19.5 } ) ) ; double median = 20.8 ; boolean is_twoTailed = true ; double aLevel = 0.05 ; boolean expResult = true ; boolean result = com . datumbox . framework . core . statistics . nonparametrics . onesample . WilcoxonOneSample . test ( flatDataCollection , median , is_twoTailed , aLevel ) ; "<AssertPlaceHolder>" ; } test ( com . datumbox . framework . common . dataobjects . FlatDataCollection , double , boolean , double ) { double pvalue = com . datumbox . framework . core . statistics . nonparametrics . onesample . WilcoxonOneSample . getPvalue ( flatDataCollection , median ) ; boolean rejectH0 = false ; double a = aLevel ; if ( is_twoTailed ) { a = aLevel / 2.0 ; } if ( ( pvalue <= a ) || ( pvalue >= ( 1.0 - a ) ) ) { rejectH0 = true ; } return rejectH0 ; }
org . junit . Assert . assertEquals ( expResult , result )
testPersoonGeenIndicatiesInBericht ( ) { final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl huidigePersoon = maakHuidigePersoon ( 20120102 ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = maakNieuweSituatie ( false ) ; final nl . bzk . brp . model . operationeel . kern . ActieModel actie = maakActie ( 20120101 ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . curatele . BRBY2012 ( ) . voerRegelUit ( new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( huidigePersoon ) , persoonBericht , actie , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( berichtEntiteiten . isEmpty ( ) )
checkSendMethod ( ) { java . util . List < java . lang . Object > storage = new java . util . ArrayList < java . lang . Object > ( ) ; java . lang . Object test = new java . lang . Object ( ) ; info . smart_tools . smartactors . testing . test_http_endpoint . TestChannelHandler channelHandler = new info . smart_tools . smartactors . testing . test_http_endpoint . TestChannelHandler ( storage ) ; channelHandler . send ( test ) ; "<AssertPlaceHolder>" ; } get ( int ) { if ( ( index >= 0 ) && ( index < ( receivers . length ) ) ) { return receivers [ index ] ; } return original . get ( index ) ; }
org . junit . Assert . assertSame ( storage . get ( 0 ) , test )
testLeesBlobBestaandeBlobMetIncorrecteChecksumBlijftGewoonWerken ( ) { final java . lang . Integer persoonId = 2 ; final org . springframework . transaction . TransactionStatus transactieStatus = zorgDatBlobBestaatInTransactie ( persoonId ) ; final nl . bzk . brp . model . operationeel . kern . PersoonCacheModel inMemoryCache = haalCacheVoorPersoonId ( persoonId ) ; inMemoryCache . getStandaard ( ) . setPersoonHistorieVolledigChecksum ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . ChecksumAttribuut ( "fouteChecksum" ) ) ; transactionManager . commit ( transactieStatus ) ; final nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig persoon = blobifierService . leesBlob ( persoonId ) ; "<AssertPlaceHolder>" ; } getID ( ) { return iD ; }
org . junit . Assert . assertEquals ( persoonId , persoon . getID ( ) )
testReadFromSourceWithEmptyPredicates ( ) { org . gradoop . storage . impl . hbase . io . HBaseDataSource hBaseDataSource = new org . gradoop . storage . impl . hbase . io . HBaseDataSource ( org . gradoop . storage . impl . hbase . io . HBaseDataSinkSourceTest . epgmStores [ storeIndex ] , getConfig ( ) ) ; hBaseDataSource = hBaseDataSource . applyGraphPredicate ( org . gradoop . storage . common . predicate . query . Query . elements ( ) . fromAll ( ) . noFilter ( ) ) ; hBaseDataSource = hBaseDataSource . applyEdgePredicate ( org . gradoop . storage . common . predicate . query . Query . elements ( ) . fromAll ( ) . noFilter ( ) ) ; hBaseDataSource = hBaseDataSource . applyVertexPredicate ( org . gradoop . storage . common . predicate . query . Query . elements ( ) . fromAll ( ) . noFilter ( ) ) ; "<AssertPlaceHolder>" ; org . gradoop . flink . model . impl . epgm . GraphCollection collection = hBaseDataSource . getGraphCollection ( ) ; java . util . Collection < org . gradoop . common . model . impl . pojo . GraphHead > loadedGraphHeads = com . google . common . collect . Lists . newArrayList ( ) ; java . util . Collection < org . gradoop . common . model . impl . pojo . Vertex > loadedVertices = com . google . common . collect . Lists . newArrayList ( ) ; java . util . Collection < org . gradoop . common . model . impl . pojo . Edge > loadedEdges = com . google . common . collect . Lists . newArrayList ( ) ; collection . getGraphHeads ( ) . output ( new org . apache . flink . api . java . io . LocalCollectionOutputFormat ( loadedGraphHeads ) ) ; collection . getVertices ( ) . output ( new org . apache . flink . api . java . io . LocalCollectionOutputFormat ( loadedVertices ) ) ; collection . getEdges ( ) . output ( new org . apache . flink . api . java . io . LocalCollectionOutputFormat ( loadedEdges ) ) ; getExecutionEnvironment ( ) . execute ( ) ; validateEPGMElementCollections ( getSocialGraphHeads ( ) , loadedGraphHeads ) ; validateEPGMElementCollections ( getSocialVertices ( ) , loadedVertices ) ; validateEPGMGraphElementCollections ( getSocialVertices ( ) , loadedVertices ) ; validateEPGMElementCollections ( getSocialEdges ( ) , loadedEdges ) ; validateEPGMGraphElementCollections ( getSocialEdges ( ) , loadedEdges ) ; } isFilterPushedDown ( ) { return ( ( ( this . graphHeadQuery ) != null ) || ( ( this . vertexQuery ) != null ) ) || ( ( this . edgeQuery ) != null ) ; }
org . junit . Assert . assertTrue ( hBaseDataSource . isFilterPushedDown ( ) )
testRawAnswerPresence ( ) { org . batfish . datamodel . NetworkFactory nf = new org . batfish . datamodel . NetworkFactory ( ) ; org . batfish . datamodel . Configuration c1 = nf . configurationBuilder ( ) . setConfigurationFormat ( ConfigurationFormat . CISCO_IOS ) . build ( ) ; nf . routingPolicyBuilder ( ) . setOwner ( c1 ) . setName ( "rp1" ) . build ( ) ; org . batfish . datamodel . Configuration c2 = nf . configurationBuilder ( ) . setConfigurationFormat ( ConfigurationFormat . CISCO_IOS ) . build ( ) ; java . util . Map < java . lang . String , org . batfish . datamodel . Configuration > configurations = com . google . common . collect . ImmutableMap . of ( "node1" , c1 , "node2" , c2 ) ; org . batfish . question . namedstructures . NamedStructuresQuestion question = new org . batfish . question . namedstructures . NamedStructuresQuestion ( org . batfish . question . namedstructures . NamedStructuresAnswererTest . ALL_NODES , org . batfish . datamodel . questions . NamedStructureSpecifier . ALL , null , null , true ) ; com . google . common . collect . Multiset < org . batfish . datamodel . table . Row > rows = org . batfish . question . namedstructures . NamedStructuresAnswerer . rawAnswer ( question , configurations . keySet ( ) , configurations , org . batfish . question . namedstructures . NamedStructuresAnswerer . createMetadata ( question ) . toColumnMap ( ) ) ; com . google . common . collect . Multiset < org . batfish . datamodel . table . Row > expected = com . google . common . collect . HashMultiset . create ( com . google . common . collect . ImmutableList . of ( org . batfish . datamodel . table . Row . builder ( ) . put ( NamedStructuresAnswerer . COL_NODE , new org . batfish . datamodel . pojo . Node ( "node1" ) ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_TYPE , NamedStructureSpecifier . ROUTING_POLICY ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_NAME , "rp1" ) . put ( NamedStructuresAnswerer . COL_PRESENT_ON_NODE , true ) . build ( ) , org . batfish . datamodel . table . Row . builder ( ) . put ( NamedStructuresAnswerer . COL_NODE , new org . batfish . datamodel . pojo . Node ( "node2" ) ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_TYPE , NamedStructureSpecifier . ROUTING_POLICY ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_NAME , "rp1" ) . put ( NamedStructuresAnswerer . COL_PRESENT_ON_NODE , false ) . build ( ) ) ) ; "<AssertPlaceHolder>" ; } build ( ) { checkState ( ( ( _networkId ) != null ) , "Missing<sp>networkId" ) ; checkState ( ( ( _snapshotId ) != null ) , "Missing<sp>snapshotId" ) ; checkState ( ( ( _workType ) != null ) , "Missing<sp>workType" ) ; return new org . batfish . coordinator . WorkDetails ( _networkId , _snapshotId , _isDifferential , _workType , _referenceSnapshotId , _analysisId , _questionId ) ; }
org . junit . Assert . assertThat ( rows , org . hamcrest . Matchers . equalTo ( expected ) )
testGetEntityPath ( ) { org . sagebionetworks . repo . model . EntityHeader one = new org . sagebionetworks . repo . model . EntityHeader ( ) ; one . setId ( "syn123" ) ; org . sagebionetworks . repo . model . EntityHeader two = new org . sagebionetworks . repo . model . EntityHeader ( ) ; two . setId ( "syn456" ) ; when ( mockNodeDao . getEntityPath ( tableId ) ) . thenReturn ( com . google . common . collect . Lists . newArrayList ( one , two ) ) ; java . util . Set < java . lang . Long > expected = com . google . common . collect . Sets . newHashSet ( 123L , 456L ) ; java . util . Set < java . lang . Long > results = manager . getEntityPath ( tableId ) ; "<AssertPlaceHolder>" ; } getEntityPath ( java . lang . String ) { java . util . List < org . sagebionetworks . repo . model . EntityHeader > pathHeaders = nodeDao . getEntityPath ( nodeId ) ; org . sagebionetworks . repo . model . EntityPath entityPath = new org . sagebionetworks . repo . model . EntityPath ( ) ; entityPath . setPath ( pathHeaders ) ; return entityPath ; }
org . junit . Assert . assertEquals ( expected , results )
testIsNotSatisfiedByMissedDeadline ( ) { net . java . cargotracker . domain . model . cargo . RouteSpecification routeSpecification = new net . java . cargotracker . domain . model . cargo . RouteSpecification ( net . java . cargotracker . domain . model . location . SampleLocations . HONGKONG , net . java . cargotracker . domain . model . location . SampleLocations . CHICAGO , net . java . cargotracker . application . util . DateUtil . toDate ( "2009-02-15" ) ) ; "<AssertPlaceHolder>" ; } isSatisfiedBy ( net . java . cargotracker . domain . model . cargo . Itinerary ) { return ( ( ( itinerary != null ) && ( getOrigin ( ) . sameIdentityAs ( itinerary . getInitialDepartureLocation ( ) ) ) ) && ( getDestination ( ) . sameIdentityAs ( itinerary . getFinalArrivalLocation ( ) ) ) ) && ( getArrivalDeadline ( ) . after ( itinerary . getFinalArrivalDate ( ) ) ) ; }
org . junit . Assert . assertFalse ( routeSpecification . isSatisfiedBy ( itinerary ) )
testRemoveHtmlClassMixed ( ) { com . github . bordertech . wcomponents . AbstractWComponent comp = new com . github . bordertech . wcomponents . AbstractWComponent_Test . SimpleComponent ( ) ; comp . setHtmlClass ( HtmlClassProperties . ICON ) ; comp . removeHtmlClass ( HtmlClassProperties . ICON . toString ( ) ) ; "<AssertPlaceHolder>" ; } getHtmlClass ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; }
org . junit . Assert . assertNull ( comp . getHtmlClass ( ) )
testGetValue ( ) { org . openscience . cdk . qsar . DescriptorSpecification spec = new org . openscience . cdk . qsar . DescriptorSpecification ( org . openscience . cdk . qsar . DescriptorValueTest . DESC_REF , org . openscience . cdk . qsar . DescriptorValueTest . DESC_IMPL_TITLE , org . openscience . cdk . qsar . DescriptorValueTest . DESC_IMPL_ID , org . openscience . cdk . qsar . DescriptorValueTest . DESC_IMPL_VENDOR ) ; org . openscience . cdk . qsar . result . DoubleResult doubleVal = new org . openscience . cdk . qsar . result . DoubleResult ( 0.7 ) ; org . openscience . cdk . qsar . DescriptorValue value = new org . openscience . cdk . qsar . DescriptorValue ( spec , new java . lang . String [ 0 ] , new java . lang . Object [ 0 ] , doubleVal , new java . lang . String [ ] { "bla" } ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
org . junit . Assert . assertEquals ( doubleVal , value . getValue ( ) )
testCustom ( ) { java . lang . String className = "testCustom" ; com . orientechnologies . orient . core . metadata . schema . OSchema schema = com . orientechnologies . orient . core . sql . executor . OAlterClassStatementExecutionTest . db . getMetadata ( ) . getSchema ( ) ; schema . createClass ( className ) ; com . orientechnologies . orient . core . sql . executor . OResultSet result = com . orientechnologies . orient . core . sql . executor . OAlterClassStatementExecutionTest . db . command ( ( ( "alter<sp>class<sp>" + className ) + "<sp>custom<sp>foo<sp>=<sp>'bar'" ) ) ; schema . reload ( ) ; com . orientechnologies . orient . core . metadata . schema . OClass clazz = schema . getClass ( className ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } getCustom ( java . lang . String ) { return customFields . get ( iName ) ; }
org . junit . Assert . assertEquals ( "bar" , clazz . getCustom ( "foo" ) )
testDelete ( ) { com . codesolid . tests . Actor actor = new com . codesolid . tests . Actor ( ) ; com . codesolid . tutorials . model . dal . Storage < com . codesolid . tests . Actor > storage = new com . codesolid . tutorials . model . dal . Storage < com . codesolid . tests . Actor > ( actor ) ; storage . beginTransaction ( ) ; storage . insert ( actor ) ; java . lang . Long id = actor . getId ( ) ; storage . commit ( ) ; assert ( actor . getId ( ) ) > 0 ; storage . beginTransaction ( ) ; storage . delete ( actor ) ; storage . commit ( ) ; storage . beginTransaction ( ) ; com . codesolid . tests . Actor actor2 = storage . getById ( id ) ; "<AssertPlaceHolder>" ; storage . commit ( ) ; } getById ( java . lang . Long ) { return ( ( T ) ( session . get ( entity . getClass ( ) , id ) ) ) ; }
org . junit . Assert . assertNull ( actor2 )
executeWithImport1 ( ) { mojo . setTargetFolder ( "target/export11" ) ; mojo . setImports ( new java . lang . String [ ] { "com.pck1" , "com.pck2" , "com.Q1" , "com.Q2" } ) ; mojo . execute ( ) ; "<AssertPlaceHolder>" ; } exists ( ) { org . junit . Assert . assertTrue ( ( ( query . where ( title . eq ( "Jurassic<sp>Park" ) ) . fetchCount ( ) ) > 0 ) ) ; org . junit . Assert . assertFalse ( ( ( query . where ( title . eq ( "Jurassic<sp>Park<sp>X" ) ) . fetchCount ( ) ) > 0 ) ) ; }
org . junit . Assert . assertTrue ( new java . io . File ( "target/export11" ) . exists ( ) )
whenlittleNumFactorial ( ) { chapter1 . loop . Factorial fc = new chapter1 . loop . Factorial ( "5" ) ; double result = fc . calcFactorial ( ) ; double control = 120 ; "<AssertPlaceHolder>" ; } calcFactorial ( ) { double result = 1 ; for ( int index = 1 ; index <= ( num ) ; index ++ ) { result *= index ; } return result ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( control ) )
appendIntHexValue ( ) { java . util . Random r = new java . util . Random ( 101 ) ; for ( int i = 0 ; i < ( com . ociweb . pronghorn . pipe . util . AppendablesTest . TEST_SIZE ) ; i ++ ) { int value = r . nextInt ( ) ; java . lang . String actual = com . ociweb . pronghorn . util . Appendables . appendHexDigits ( new java . lang . StringBuilder ( ) , value ) . toString ( ) . toLowerCase ( ) ; java . lang . String expected = "0x" + ( java . lang . Integer . toHexString ( value ) ) ; "<AssertPlaceHolder>" ; } } toString ( ) { return ( ( java . util . Arrays . toString ( data . serviceObjectKeys ) ) + "<sp>" ) + ( java . util . Arrays . toString ( data . serviceObjectValues ) ) ; }
org . junit . Assert . assertEquals ( ( "" + i ) , expected , actual )
buildDownstream_derived_makeDownstream ( ) { java . lang . System . setProperty ( Property . buildDownstream . fullName ( ) , "derived" ) ; when ( mavenExecutionRequestMock . getMakeBehavior ( ) ) . thenReturn ( MavenExecutionRequest . REACTOR_MAKE_DOWNSTREAM ) ; com . vackosar . gitflowincrementalbuild . boundary . Configuration configuration = new com . vackosar . gitflowincrementalbuild . boundary . Configuration . Provider ( mavenSessionMock ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( configuration ) == null ) { configuration = new com . vackosar . gitflowincrementalbuild . boundary . Configuration ( mavenSession ) ; } return configuration ; }
org . junit . Assert . assertTrue ( configuration . buildDownstream )
testClear ( ) { tested . group = group ; tested . clear ( ) ; "<AssertPlaceHolder>" ; verify ( view , times ( 0 ) ) . init ( tested ) ; verify ( view , times ( 0 ) ) . setDeleteButtonVisible ( anyBoolean ( ) ) ; verify ( view , times ( 0 ) ) . show ( anyString ( ) ) ; verify ( view , times ( 1 ) ) . clear ( ) ; } clear ( ) { multiScreenViews . destroyAll ( ) ; parts . values ( ) . forEach ( ( s ) -> content . removeChild ( s . getElement ( ) ) ) ; parts . clear ( ) ; }
org . junit . Assert . assertNull ( tested . group )
cascadeTwoLevelsDuringRecord ( mockit . CascadingWithGenericsTest$Foo ) { final mockit . Date now = new mockit . Date ( ) ; new mockit . Expectations ( ) { { mockFoo . returnTypeWithBoundedTypeVariable ( ) . getDate ( ) ; result = now ; } } ; mockit . CascadingWithGenericsTest . Foo foo = new mockit . CascadingWithGenericsTest . Foo ( ) ; "<AssertPlaceHolder>" ; } returnTypeWithBoundedTypeVariable ( ) { return null ; }
org . junit . Assert . assertSame ( now , foo . returnTypeWithBoundedTypeVariable ( ) . getDate ( ) )
testDebugURLCanBeSet ( ) { configuration . setDebugURL ( "A<sp>URL" ) ; "<AssertPlaceHolder>" ; } getDebugURL ( ) { return debugURL ; }
org . junit . Assert . assertEquals ( "A<sp>URL" , configuration . getDebugURL ( ) )
testRegisterControllerInstance ( ) { controllerRegistry . register ( new ro . pippo . controller . ControllerRegistryTest . WithoutPathController ( ) , new ro . pippo . controller . ControllerRegistryTest . WithPathWithoutValueController ( ) , new ro . pippo . controller . ControllerRegistryTest . WithPathWithSingleValueController ( ) , new ro . pippo . controller . ControllerRegistryTest . WithPathWithMultiValueController ( ) ) ; int expectedTotalRoutes = ( ( ( ro . pippo . controller . ControllerRegistryTest . WithoutPathController . expectedUriPatterns ( ) . length ) + ( ro . pippo . controller . ControllerRegistryTest . WithPathWithoutValueController . expectedUriPatterns ( ) . length ) ) + ( ro . pippo . controller . ControllerRegistryTest . WithPathWithSingleValueController . expectedUriPatterns ( ) . length ) ) + ( ro . pippo . controller . ControllerRegistryTest . WithPathWithMultiValueController . expectedUriPatterns ( ) . length ) ; "<AssertPlaceHolder>" ; } getRoutes ( ) { return routes ; }
org . junit . Assert . assertEquals ( expectedTotalRoutes , controllerRegistry . getRoutes ( ) . size ( ) )
createCollectionWithMinimalParametersIsSuccessful ( ) { java . lang . String uniqueCollectionName = ( uniqueName ) + "-collection" ; com . ibm . watson . discovery . v1 . model . CreateCollectionOptions createOptions = new com . ibm . watson . discovery . v1 . model . CreateCollectionOptions . Builder ( com . ibm . watson . discovery . v1 . DiscoveryServiceIT . environmentId , uniqueCollectionName ) . build ( ) ; com . ibm . watson . discovery . v1 . model . Collection createResponse = createCollection ( createOptions ) ; "<AssertPlaceHolder>" ; } getCollectionId ( ) { return collectionId ; }
org . junit . Assert . assertNotNull ( createResponse . getCollectionId ( ) )
testApply ( ) { com . ccreanga . bitbucket . rest . client . http . responseparsers . PullRequestParser pullRequestParser = new com . ccreanga . bitbucket . rest . client . http . responseparsers . PullRequestParser ( ) ; com . ccreanga . bitbucket . rest . client . model . pull . PullRequest pullRequest = new com . ccreanga . bitbucket . rest . client . model . pull . PullRequest ( 101 , 1 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 2 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." , com . ccreanga . bitbucket . rest . client . model . pull . PullRequestState . OPEN , true , false , new java . util . Date ( 1359075920 ) , new java . util . Date ( 1359085920 ) , new com . ccreanga . bitbucket . rest . client . model . pull . PullRequestBranch ( "refs/heads/feature-ABC-123" , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 4 , null , "PRJ" ) , new com . ccreanga . bitbucket . rest . client . model . pull . PullRequestBranch ( "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 7 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 4 , null , "PRJ" ) , false , new com . ccreanga . bitbucket . rest . client . model . pull . PullRequestParticipant ( new com . ccreanga . bitbucket . rest . client . model . User ( 115026 , "tom" , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 0 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 3 , true , "tom" , com . ccreanga . bitbucket . rest . client . model . UserType . NORMAL ) , com . ccreanga . bitbucket . rest . client . model . pull . PullRequestRole . AUTHOR , true ) , java . util . Collections . singletonList ( new com . ccreanga . bitbucket . rest . client . model . pull . PullRequestParticipant ( new com . ccreanga . bitbucket . rest . client . model . User ( 101 , "jcitizen" , "jane@example.com" , "Jane<sp>Citizen" , true , "jcitizen" , com . ccreanga . bitbucket . rest . client . model . UserType . NORMAL ) , com . ccreanga . bitbucket . rest . client . model . pull . PullRequestRole . REVIEWER , true ) ) , java . util . Arrays . asList ( new com . ccreanga . bitbucket . rest . client . model . pull . PullRequestParticipant ( new com . ccreanga . bitbucket . rest . client . model . User ( 3083181 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 8 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 9 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 1 , true , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 8 , com . ccreanga . bitbucket . rest . client . model . UserType . NORMAL ) , com . ccreanga . bitbucket . rest . client . model . pull . PullRequestRole . PARTICIPANT , false ) , new com . ccreanga . bitbucket . rest . client . model . pull . PullRequestParticipant ( new com . ccreanga . bitbucket . rest . client . model . User ( 99049120 , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 6 , "harry@example.com" , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 5 , true , "Its<sp>a<sp>kludge,<sp>but<sp>put<sp>the<sp>tuple<sp>from<sp>the<sp>database<sp>in<sp>the<sp>cache." 6 , com . ccreanga . bitbucket . rest . client . model . UserType . NORMAL ) , com . ccreanga . bitbucket . rest . client . model . pull . PullRequestRole . PARTICIPANT , true ) ) , "http://link/to/pullrequest" ) ; com . google . gson . JsonElement element = new com . google . gson . JsonParser ( ) . parse ( com . ccreanga . bitbucket . rest . client . http . responseparsers . TestUtil . loadString ( "pull_requests.json" ) ) ; com . ccreanga . bitbucket . rest . client . model . pull . PullRequest parsedPullRequest = pullRequestParser . apply ( element ) ; "<AssertPlaceHolder>" ; } apply ( com . google . gson . JsonElement ) { com . google . gson . JsonObject json = jsonElement . getAsJsonObject ( ) ; return new com . ccreanga . bitbucket . rest . client . http . dto . BitBucketError ( json . get ( "message" ) . getAsString ( ) , com . ccreanga . bitbucket . rest . client . http . responseparsers . ParserUtil . optionalJsonString ( json , "context" ) , com . ccreanga . bitbucket . rest . client . http . responseparsers . ParserUtil . optionalJsonString ( json , "exceptionName" ) ) ; }
org . junit . Assert . assertEquals ( pullRequest , parsedPullRequest )
testHasTax ( ) { com . eclipsesource . tabris . tracking . Order order = new com . eclipsesource . tabris . tracking . Order ( "foo" , java . math . BigDecimal . ONE ) ; order . setTax ( java . math . BigDecimal . valueOf ( 3 ) ) ; java . math . BigDecimal tax = order . getTax ( ) ; "<AssertPlaceHolder>" ; } getTax ( ) { return tax ; }
org . junit . Assert . assertEquals ( java . math . BigDecimal . valueOf ( 3 ) , tax )
testEmptySortAndGroup ( ) { final java . util . List < org . apache . hadoop . mrunit . types . Pair < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > > inputs = new java . util . ArrayList < org . apache . hadoop . mrunit . types . Pair < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > > ( ) ; final java . util . List < org . apache . hadoop . mrunit . types . KeyValueReuseList < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > > outputs = driver2 . sortAndGroup ( inputs ) ; "<AssertPlaceHolder>" ; } sortAndGroup ( org . apache . hadoop . mrunit . mapreduce . List ) { if ( mapOutputs . isEmpty ( ) ) { return org . apache . hadoop . mrunit . mapreduce . Collections . emptyList ( ) ; } if ( ( ( keyValueOrderComparator ) == null ) || ( ( keyGroupComparator ) == null ) ) { org . apache . hadoop . mapred . JobConf conf = new org . apache . hadoop . mapred . JobConf ( org . apache . hadoop . mrunit . mapreduce . MultipleInputsMapReduceDriver . getConfiguration ( ) ) ; conf . setMapOutputKeyClass ( mapOutputs . get ( 0 ) . getFirst ( ) . getClass ( ) ) ; if ( ( keyGroupComparator ) == null ) { keyGroupComparator = conf . getOutputValueGroupingComparator ( ) ; } if ( ( keyValueOrderComparator ) == null ) { keyValueOrderComparator = conf . getOutputKeyComparator ( ) ; } } org . apache . hadoop . mrunit . mapreduce . ReduceFeeder < K1 , V1 > reduceFeeder = new org . apache . hadoop . mrunit . mapreduce . ReduceFeeder < K1 , V1 > ( org . apache . hadoop . mrunit . mapreduce . MultipleInputsMapReduceDriver . getConfiguration ( ) ) ; return reduceFeeder . sortAndGroup ( mapOutputs , keyValueOrderComparator , keyGroupComparator ) ; }
org . junit . Assert . assertEquals ( 0 , outputs . size ( ) )
testDeepUnification ( ) { nl . utwente . viskell . haskell . type . TypeScope scope = new nl . utwente . viskell . haskell . type . TypeScope ( ) ; nl . utwente . viskell . haskell . type . TypeVar a = scope . getVar ( "a" ) ; nl . utwente . viskell . haskell . type . TypeVar b = scope . getVar ( "b" ) ; nl . utwente . viskell . haskell . type . TypeVar x = scope . getVar ( "x" ) ; nl . utwente . viskell . haskell . type . TypeVar y = scope . getVar ( "y" ) ; nl . utwente . viskell . haskell . type . TypeChecker . unify ( "dummy" , a , b ) ; nl . utwente . viskell . haskell . type . TypeChecker . unify ( "dummy" , x , y ) ; nl . utwente . viskell . haskell . type . TypeChecker . unify ( "dummy" , a , x ) ; nl . utwente . viskell . haskell . type . TypeChecker . unify ( "dummy" , b , nl . utwente . viskell . haskell . type . Type . con ( "Int" ) ) ; "<AssertPlaceHolder>" ; } prettyPrint ( ) { return this . prettyPrint ( 0 ) ; }
org . junit . Assert . assertEquals ( "Int" , y . prettyPrint ( ) )
testCoordinateDimensionPointLite1D ( ) { org . locationtech . jts . geom . Geometry geom = org . geotools . geometry . jts . coordinatesequence . CoordinateSequencesTest . geomBuilder . point ( 1 ) ; "<AssertPlaceHolder>" ; } coordinateDimension ( org . locationtech . jts . geom . Geometry ) { if ( g instanceof org . geotools . geometry . jts . CurvedGeometry < ? > ) { return ( ( org . geotools . geometry . jts . CurvedGeometry < ? > ) ( g ) ) . getCoordinatesDimension ( ) ; } if ( g instanceof org . locationtech . jts . geom . Point ) return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( ( ( org . locationtech . jts . geom . Point ) ( g ) ) . getCoordinateSequence ( ) ) ; if ( g instanceof org . locationtech . jts . geom . LineString ) return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( ( ( org . locationtech . jts . geom . LineString ) ( g ) ) . getCoordinateSequence ( ) ) ; if ( g instanceof org . locationtech . jts . geom . Polygon ) return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( ( ( org . locationtech . jts . geom . Polygon ) ( g ) ) . getExteriorRing ( ) . getCoordinateSequence ( ) ) ; org . locationtech . jts . geom . CoordinateSequence cs = org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . CoordinateSequenceFinder . find ( g ) ; return org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( cs ) ; }
org . junit . Assert . assertEquals ( 1 , org . geotools . geometry . jts . coordinatesequence . CoordinateSequences . coordinateDimension ( geom ) )
testParallelVariableValueEqualConditions ( ) { java . util . Map < java . lang . String , java . lang . Object > variables = org . camunda . bpm . engine . variable . Variables . createVariables ( ) ; variables . put ( org . camunda . bpm . engine . test . bpmn . event . conditional . VARIABLE_NAME , 0 ) ; org . camunda . bpm . engine . runtime . ProcessInstance procInst = runtimeService . startProcessInstanceByKey ( org . camunda . bpm . engine . test . bpmn . event . conditional . CONDITIONAL_EVENT_PROCESS_KEY , variables ) ; runtimeService . setVariable ( procInst . getId ( ) , org . camunda . bpm . engine . test . bpmn . event . conditional . VARIABLE_NAME , 1 ) ; procInst = runtimeService . createProcessInstanceQuery ( ) . processDefinitionKey ( org . camunda . bpm . engine . test . bpmn . event . conditional . CONDITIONAL_EVENT_PROCESS_KEY ) . singleResult ( ) ; "<AssertPlaceHolder>" ; } singleResult ( ) { this . resultType = org . camunda . bpm . engine . impl . AbstractQuery . ResultType . SINGLE_RESULT ; if ( ( commandExecutor ) != null ) { return ( ( U ) ( commandExecutor . execute ( this ) ) ) ; } return executeSingleResult ( org . camunda . bpm . engine . impl . context . Context . getCommandContext ( ) ) ; }
org . junit . Assert . assertNull ( procInst )
testFindCurrentByMonthCodeAndGroupNo ( ) { java . lang . String monthCode = "A" ; java . lang . String groupNo = "101" ; java . util . Date updateDateTime = new java . util . Date ( dfm . parse ( "20080101" ) . getTime ( ) ) ; org . oscarehr . billing . CA . model . BillActivity billActivity1 = new org . oscarehr . billing . CA . model . BillActivity ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billActivity1 ) ; java . util . Date date1 = new java . util . Date ( dfm . parse ( "20090101" ) . getTime ( ) ) ; billActivity1 . setUpdateDateTime ( date1 ) ; billActivity1 . setMonthCode ( monthCode ) ; billActivity1 . setGroupNo ( groupNo ) ; billActivity1 . setStatus ( "A" ) ; billActivity1 . setBatchCount ( 10 ) ; org . oscarehr . billing . CA . model . BillActivity billActivity2 = new org . oscarehr . billing . CA . model . BillActivity ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billActivity2 ) ; java . util . Date date2 = new java . util . Date ( dfm . parse ( "20090101" ) . getTime ( ) ) ; billActivity2 . setUpdateDateTime ( date2 ) ; billActivity2 . setMonthCode ( "B" ) ; billActivity2 . setGroupNo ( groupNo ) ; billActivity2 . setStatus ( "A" ) ; org . oscarehr . billing . CA . model . BillActivity billActivity3 = new org . oscarehr . billing . CA . model . BillActivity ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billActivity3 ) ; java . util . Date date3 = new java . util . Date ( dfm . parse ( "20090101" ) . getTime ( ) ) ; billActivity3 . setUpdateDateTime ( date3 ) ; billActivity3 . setMonthCode ( monthCode ) ; billActivity3 . setGroupNo ( "102" ) ; billActivity3 . setStatus ( "A" ) ; org . oscarehr . billing . CA . model . BillActivity billActivity4 = new org . oscarehr . billing . CA . model . BillActivity ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billActivity4 ) ; java . util . Date date4 = new java . util . Date ( dfm . parse ( "20070101" ) . getTime ( ) ) ; billActivity4 . setUpdateDateTime ( date4 ) ; billActivity4 . setMonthCode ( monthCode ) ; billActivity4 . setGroupNo ( groupNo ) ; billActivity4 . setStatus ( "A" ) ; org . oscarehr . billing . CA . model . BillActivity billActivity5 = new org . oscarehr . billing . CA . model . BillActivity ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billActivity5 ) ; java . util . Date date5 = new java . util . Date ( dfm . parse ( "20090101" ) . getTime ( ) ) ; billActivity5 . setUpdateDateTime ( date5 ) ; billActivity5 . setMonthCode ( monthCode ) ; billActivity5 . setGroupNo ( groupNo ) ; billActivity5 . setStatus ( "D" ) ; org . oscarehr . billing . CA . model . BillActivity billActivity6 = new org . oscarehr . billing . CA . model . BillActivity ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billActivity6 ) ; java . util . Date date6 = new java . util . Date ( dfm . parse ( "20090101" ) . getTime ( ) ) ; billActivity6 . setUpdateDateTime ( date6 ) ; billActivity6 . setMonthCode ( monthCode ) ; billActivity6 . setGroupNo ( groupNo ) ; billActivity6 . setStatus ( "A" ) ; billActivity6 . setBatchCount ( 6 ) ; dao . persist ( billActivity1 ) ; dao . persist ( billActivity2 ) ; dao . persist ( billActivity3 ) ; dao . persist ( billActivity4 ) ; dao . persist ( billActivity5 ) ; dao . persist ( billActivity6 ) ; java . util . List < org . oscarehr . billing . CA . model . BillActivity > result = dao . findCurrentByMonthCodeAndGroupNo ( monthCode , groupNo , updateDateTime ) ; java . util . List < org . oscarehr . billing . CA . model . BillActivity > expectedResult = new java . util . ArrayList < org . oscarehr . billing . CA . model . BillActivity > ( java . util . Arrays . asList ( billActivity6 , billActivity1 ) ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( result . size ( ) ) ; i ++ ) { if ( ! ( result . get ( i ) . equals ( expectedResult . get ( i ) ) ) ) { org . junit . Assert . fail ( "Items<sp>not<sp>ordered<sp>by<sp>batch<sp>count." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
testGeldigeDatumWaarde ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . PERSOON_GEBOORTE_DATUM . getId ( ) ) ; final nl . bzk . brp . service . bevraging . zoekpersoongeneriek . AbstractZoekPersoonVerzoek bevragingVerzoek = maakBevragingVerzoek ( attribuutElement , "1910-10-10" , Zoekoptie . EXACT ) ; final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatieBundel = maakAutorisatiebundel ( false , attribuutElement ) ; final java . util . Set < nl . bzk . brp . domain . algemeen . Melding > meldingen = valideerZoekCriteriaService . valideerZoekCriteria ( bevragingVerzoek , autorisatieBundel ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
testAddFieldWithWButtonNullLabel ( ) { com . github . bordertech . wcomponents . WFieldLayout layout = new com . github . bordertech . wcomponents . WFieldLayout ( ) ; com . github . bordertech . wcomponents . WField field = layout . addField ( new com . github . bordertech . wcomponents . WButton ( "Test" ) ) ; "<AssertPlaceHolder>" ; } getLabel ( ) { return label ; }
org . junit . Assert . assertNull ( field . getLabel ( ) )
testShouldFireSyncEvent ( ) { java . util . concurrent . atomic . AtomicInteger moveCounter = com . liferay . document . library . app . service . test . DLAppServiceTestUtil . registerDLSyncEventProcessorMessageListener ( DLSyncConstants . EVENT_MOVE ) ; com . liferay . portal . kernel . repository . model . FileEntry fileEntry = com . liferay . document . library . app . service . test . DLAppServiceTestUtil . addFileEntry ( group . getGroupId ( ) , parentFolder . getFolderId ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ; com . liferay . document . library . kernel . service . DLAppServiceUtil . moveFileEntry ( fileEntry . getFileEntryId ( ) , DLFolderConstants . DEFAULT_PARENT_FOLDER_ID , serviceContext ) ; "<AssertPlaceHolder>" ; } get ( ) { return _byteBuffer . get ( ) ; }
org . junit . Assert . assertEquals ( 1 , moveCounter . get ( ) )
shouldReturnStateBadRequestIfRoleNameIsInvalid ( ) { ch . mobi . itc . mobiliar . rest . dtos . RestrictionDTO restrictionDTO = new ch . mobi . itc . mobiliar . rest . dtos . RestrictionDTO ( null , "invalid" , null , ch . puzzle . itc . mobiliar . business . security . entity . Permission . RESOURCE , null , null , null , null , null ) ; when ( rest . permissionBoundary . createRestriction ( "invalid" , null , ch . puzzle . itc . mobiliar . business . security . entity . Permission . RESOURCE . name ( ) , null , null , null , null , null , false , true ) ) . thenThrow ( new ch . puzzle . itc . mobiliar . common . exception . AMWException ( "bad" ) ) ; javax . ws . rs . core . Response response = rest . addRestriction ( restrictionDTO , false , true ) ; "<AssertPlaceHolder>" ; } addRestriction ( ch . mobi . itc . mobiliar . rest . dtos . RestrictionDTO , boolean , boolean ) { java . lang . Integer id ; if ( ( request . getId ( ) ) != null ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . permissions . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( "Id<sp>must<sp>be<sp>null" ) ) . build ( ) ; } if ( ( request . getPermission ( ) ) == null ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . permissions . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( "Permission<sp>must<sp>not<sp>be<sp>null" ) ) . build ( ) ; } try { id = permissionBoundary . createRestriction ( request . getRoleName ( ) , request . getUserName ( ) , request . getPermission ( ) . getName ( ) , request . getResourceGroupId ( ) , request . getResourceTypeName ( ) , request . getResourceTypePermission ( ) , request . getContextName ( ) , request . getAction ( ) , delegation , reload ) ; } catch ( ch . puzzle . itc . mobiliar . common . exception . AMWException e ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . permissions . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( e . getMessage ( ) ) ) . build ( ) ; } if ( id == null ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . permissions . PRECONDITION_FAILED ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( "A<sp>similar<sp>permission<sp>already<sp>exists" ) ) . build ( ) ; } return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . permissions . CREATED ) . header ( "Location" , ( "/permissions/restrictions/" + id ) ) . build ( ) ; }
org . junit . Assert . assertEquals ( ch . mobi . itc . mobiliar . rest . permissions . BAD_REQUEST . getStatusCode ( ) , response . getStatus ( ) )
testEvaluation ( ) { sg . edu . nus . comp . nsynth . Node n = new sg . edu . nus . comp . nsynth . Add ( sg . edu . nus . comp . nsynth . IntConst . of ( 1 ) , sg . edu . nus . comp . nsynth . IntConst . of ( 2 ) ) ; sg . edu . nus . comp . nsynth . Node s = sg . edu . nus . comp . nsynth . Simplifier . simplify ( n ) ; "<AssertPlaceHolder>" ; } of ( int ) { return new sg . edu . nus . comp . nsynth . ast . theory . IntConst ( value ) ; }
org . junit . Assert . assertEquals ( sg . edu . nus . comp . nsynth . IntConst . of ( 3 ) , s )
testUnion ( ) { org . apache . druid . collections . bitmap . WrappedBitSetBitmap bitSet = new org . apache . druid . collections . bitmap . WrappedBitSetBitmap ( org . apache . druid . collections . IntSetTestUtility . createSimpleBitSet ( org . apache . druid . collections . IntSetTestUtility . getSetBits ( ) ) ) ; java . util . Set < java . lang . Integer > extraBits = com . google . common . collect . Sets . newHashSet ( 6 , 9 ) ; org . apache . druid . collections . bitmap . WrappedBitSetBitmap bitExtraSet = new org . apache . druid . collections . bitmap . WrappedBitSetBitmap ( org . apache . druid . collections . IntSetTestUtility . createSimpleBitSet ( extraBits ) ) ; java . util . Set < java . lang . Integer > union = com . google . common . collect . Sets . union ( extraBits , org . apache . druid . collections . IntSetTestUtility . getSetBits ( ) ) ; "<AssertPlaceHolder>" ; } equalSets ( java . util . Set , org . apache . druid . collections . bitmap . ImmutableBitmap ) { java . util . Set < java . lang . Integer > s3 = new java . util . HashSet ( ) ; for ( java . lang . Integer i : new org . apache . druid . collections . IntSetTestUtility . IntIt ( s2 . iterator ( ) ) ) { s3 . add ( i ) ; } return com . google . common . collect . Sets . difference ( s1 , s3 ) . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( org . apache . druid . collections . IntSetTestUtility . equalSets ( union , ( ( org . apache . druid . collections . bitmap . WrappedBitSetBitmap ) ( bitSet . union ( bitExtraSet ) ) ) ) )
testInvalidData ( ) { queryDNSTestRunner . removeProperty ( QueryDNS . QUERY_PARSER_INPUT ) ; queryDNSTestRunner . setProperty ( QueryDNS . DNS_QUERY_TYPE , "AAAA" ) ; queryDNSTestRunner . setProperty ( QueryDNS . DNS_RETRIES , "1" ) ; queryDNSTestRunner . setProperty ( QueryDNS . DNS_TIMEOUT , "1000<sp>ms" ) ; queryDNSTestRunner . setProperty ( QueryDNS . QUERY_INPUT , "nifi.apache.org" ) ; final java . util . Map < java . lang . String , java . lang . String > attributeMap = new java . util . HashMap ( ) ; attributeMap . put ( "ip_address" , "123.123.123.123" ) ; queryDNSTestRunner . enqueue ( new byte [ 0 ] , attributeMap ) ; queryDNSTestRunner . enqueue ( "teste<sp>teste<sp>teste<sp>chocolate" . getBytes ( ) ) ; queryDNSTestRunner . run ( 1 , true , false ) ; java . util . List < org . apache . nifi . util . MockFlowFile > results = queryDNSTestRunner . getFlowFilesForRelationship ( QueryDNS . REL_NOT_FOUND ) ; "<AssertPlaceHolder>" ; } size ( ) { return bytes . length ; }
org . junit . Assert . assertTrue ( ( ( results . size ( ) ) == 1 ) )
manageOperations_VSERVERS_STOPPING_VSysNotInNormalState ( ) { org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageOperations ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , FlowState . VSERVERS_STOPPING ) ; "<AssertPlaceHolder>" ; } manageOperations ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; if ( ! vSysInNormalState ) { return null ; } org . oscm . app . iaas . data . FlowState newState = null ; switch ( flowState ) { case VSYSTEM_START_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STARTING , paramHandler ) ) { if ( vsysComm . startAllEFMs ( paramHandler ) ) { vsysComm . startAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STARTING ; } } break ; case VSERVERS_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . RUNNING ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; case VSYSTEM_STOP_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { vsysComm . stopAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; } break ; case VSERVERS_STOPPING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testRdfcatConcat ( ) { org . apache . jena . rdf . model . Model source = org . apache . jena . rdf . model . ModelFactory . createDefaultModel ( ) ; source . read ( "file:testing/cmd/rdfcat.xml" , "RDF/XML" ) ; java . io . OutputStream so = new java . io . ByteArrayOutputStream ( ) ; jena . cmd . Test_rdfcat . rdfcatFixture rc = new jena . cmd . Test_rdfcat . rdfcatFixture ( so ) ; rc . testGo ( new java . lang . String [ ] { "file:testing/cmd/rdfcat_1.xml" , "file:testing/cmd/rdfcat_2.xml" } ) ; org . apache . jena . rdf . model . Model output = jena . cmd . Test_rdfcat . asModel ( so , "RDF/XML" ) ; "<AssertPlaceHolder>" ; } isIsomorphicWith ( org . apache . jena . permissions . model . impl . Model ) { checkRead ( ) ; final boolean retval = holder . getBaseItem ( ) . isIsomorphicWith ( g ) ; if ( retval && ( ! ( canRead ( Triple . ANY ) ) ) ) { final org . apache . jena . util . iterator . ExtendedIterator < org . apache . jena . permissions . model . impl . Statement > stmtIter = holder . getBaseItem ( ) . listStatements ( ) ; try { while ( stmtIter . hasNext ( ) ) { if ( ! ( canRead ( stmtIter . next ( ) ) ) ) { return false ; } } } finally { if ( stmtIter != null ) { stmtIter . close ( ) ; } } } return retval ; }
org . junit . Assert . assertTrue ( output . isIsomorphicWith ( source ) )
testIfPresentOrElseWhenValuePresent ( ) { com . annimon . stream . Optional . of ( 10 ) . ifPresentOrElse ( new com . annimon . stream . function . Consumer < java . lang . Integer > ( ) { @ com . annimon . stream . Override public void accept ( java . lang . Integer value ) { "<AssertPlaceHolder>" ; } } , new java . lang . Runnable ( ) { @ com . annimon . stream . Override public void run ( ) { org . junit . Assert . fail ( "Should<sp>not<sp>execute<sp>empty<sp>action<sp>when<sp>value<sp>is<sp>present." ) ; } } ) ; } accept ( int ) { if ( value < ( currentValue ) ) { wrongOrder [ 0 ] = true ; } currentValue = value ; }
org . junit . Assert . assertEquals ( 10 , ( ( int ) ( value ) ) )
testGetMSList ( ) { "<AssertPlaceHolder>" ; } sort ( java . util . List , java . util . List , java . lang . Long ) { if ( ( msList . size ( ) ) < 2 ) { return msList ; } final java . util . List < java . lang . Long > hostList = new java . util . ArrayList ( orderedHostList ) ; java . lang . Long searchId = hostId ; if ( hostId == null ) { searchId = - 1L ; hostList . add ( searchId ) ; } final int pivotIndex = findRRPivotIndex ( msList , hostList , searchId ) ; final java . util . List < java . lang . String > roundRobin = new java . util . ArrayList ( msList . subList ( pivotIndex , msList . size ( ) ) ) ; roundRobin . addAll ( msList . subList ( 0 , pivotIndex ) ) ; return roundRobin ; }
org . junit . Assert . assertEquals ( msList , algorithm . sort ( msList , null , null ) )
testDataset2 ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . Graph . create ( ) ; g . getDataStore ( ) . addDefaultGraph ( ) ; fr . inria . corese . core . load . Load ld = fr . inria . corese . core . load . Load . create ( g ) ; ld . setDefaultGraph ( true ) ; ld . parse ( ( ( fr . inria . corese . test . engine . TestQuery1 . data ) + "test/primerdata.ttl" ) ) ; int size = g . size ( ) ; ld . parse ( ( ( fr . inria . corese . test . engine . TestQuery1 . data ) + "test/primer.owl" ) , ( ( fr . inria . corese . sparql . triple . parser . NSManager . KGRAM ) + "ontology" ) ) ; java . lang . String q = "select<sp>*<sp>where<sp>{" + ( "?x<sp>?p<sp>?y<sp>" + "}" ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; fr . inria . corese . kgram . core . Mappings map = exec . query ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return tests . size ( ) ; }
org . junit . Assert . assertEquals ( size , map . size ( ) )
runTest ( ) { boolean result = checkNoError ( "Social_Communities_Get_Sub_Communities" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
testPredikaatLeeg ( ) { java . util . Set < javax . validation . ConstraintViolation > overtredingen = validate ( bouwGroep ( "-" , "abc" , StatischeObjecttypeBuilder . ADEL_TITEL_BARON , null , null ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , overtredingen . size ( ) )
testProcessMsgNotifInstanceRemoved_invalidInstance ( ) { net . roboconf . messaging . api . messages . from_agent_to_dm . MsgNotifInstanceRemoved msg = new net . roboconf . messaging . api . messages . from_agent_to_dm . MsgNotifInstanceRemoved ( this . app . getName ( ) , new net . roboconf . core . model . beans . Instance ( "whatever" ) ) ; int instancesCount = net . roboconf . core . model . helpers . InstanceHelpers . getAllInstances ( this . app ) . size ( ) ; this . processor . processMessage ( msg ) ; "<AssertPlaceHolder>" ; } getAllInstances ( net . roboconf . core . model . beans . AbstractApplication ) { java . util . List < net . roboconf . core . model . beans . Instance > result = new java . util . ArrayList ( ) ; for ( net . roboconf . core . model . beans . Instance instance : application . getRootInstances ( ) ) result . addAll ( net . roboconf . core . model . helpers . InstanceHelpers . buildHierarchicalList ( instance ) ) ; return result ; }
org . junit . Assert . assertEquals ( instancesCount , net . roboconf . core . model . helpers . InstanceHelpers . getAllInstances ( this . app ) . size ( ) )
testMakeAttachmentText ( ) { com . huffingtonpost . chronos . agent . PersistentResultSet results = com . huffingtonpost . chronos . agent . TestCallableQuery . getPRS ( ) ; java . lang . String actual = com . huffingtonpost . chronos . agent . CallableQuery . makeAttachmentText ( results ) ; java . lang . String expected = java . lang . String . format ( ( "%s(%s)\t%s(%s)\n" + ( "%s\t%s\n" + "%s\t%s\n" ) ) , results . getColumnNames ( ) . get ( 0 ) , results . getColumnTypes ( ) . get ( 0 ) , results . getColumnNames ( ) . get ( 1 ) , results . getColumnTypes ( ) . get ( 1 ) , results . getData ( ) . get ( 0 ) . get ( 0 ) , results . getData ( ) . get ( 0 ) . get ( 1 ) , results . getData ( ) . get ( 1 ) . get ( 0 ) , results . getData ( ) . get ( 1 ) . get ( 1 ) ) ; "<AssertPlaceHolder>" ; } getData ( ) { return data ; }
org . junit . Assert . assertEquals ( expected , actual )
testNonExistingKeyEvalIsNilWithoutDefault ( ) { boolean isNil = ff . isNil ( ff . function ( "env" , ff . literal ( "not<sp>existig<sp>key" ) ) , null ) . evaluate ( null ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { return evaluate ( object , org . locationtech . jts . geom . Point . class ) ; }
org . junit . Assert . assertTrue ( isNil )
whenFillFormCorrectlyEventFired ( ) { org . finance . app . core . domain . Form correctlyFilledForm = fillTheFormAndSave ( ) ; org . finance . app . core . domain . events . customerservice . RequestWasSubmitted event = new org . finance . app . core . domain . events . customerservice . RequestWasSubmitted ( correctlyFilledForm , org . finance . app . core . domain . AggregateId . generate ( ) ) ; org . finance . app . core . domain . events . engine . mocks . BaseEventReceiveNotifier requestSubmittedHandler = registerAndGetSubmittedRequestNotifier ( event ) ; applyForLoan ( correctlyFilledForm ) ; "<AssertPlaceHolder>" ; } isRightEventOccurred ( ) { boolean result = eventOccurred ; cleanUpEventShadow ( ) ; return result ; }
org . junit . Assert . assertTrue ( requestSubmittedHandler . isRightEventOccurred ( ) )
notEquals ( ) { org . apache . taverna . scufl2 . api . container . WorkflowBundle wb1 = new org . apache . taverna . scufl2 . api . container . WorkflowBundle ( ) ; org . apache . taverna . scufl2 . api . container . WorkflowBundle wb2 = new org . apache . taverna . scufl2 . api . container . WorkflowBundle ( ) ; wb1 . setName ( "bob" ) ; wb2 . setName ( "bob" ) ; wb1 . setGlobalBaseURI ( java . net . URI . create ( "http://example.com/bob" ) ) ; wb2 . setGlobalBaseURI ( java . net . URI . create ( "http://example.com/bob" ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . apache . taverna . scufl2 . api . common . AbstractNamed other = ( ( org . apache . taverna . scufl2 . api . common . AbstractNamed ) ( obj ) ) ; if ( ! ( getName ( ) . equals ( other . getName ( ) ) ) ) return false ; if ( ( this ) instanceof org . apache . taverna . scufl2 . api . common . Child ) { org . apache . taverna . scufl2 . api . common . WorkflowBean parent = ( ( org . apache . taverna . scufl2 . api . common . Child < ? > ) ( this ) ) . getParent ( ) ; org . apache . taverna . scufl2 . api . common . WorkflowBean otherParent = ( ( org . apache . taverna . scufl2 . api . common . Child < ? > ) ( other ) ) . getParent ( ) ; if ( parent != null ) return parent . equals ( otherParent ) ; if ( ( parent == null ) && ( otherParent != null ) ) return false ; } if ( ( this ) instanceof org . apache . taverna . scufl2 . api . common . Typed ) { java . net . URI myId = ( ( org . apache . taverna . scufl2 . api . common . Typed ) ( this ) ) . getType ( ) ; java . net . URI otherId = ( ( org . apache . taverna . scufl2 . api . common . Typed ) ( obj ) ) . getType ( ) ; if ( myId != null ) return myId . equals ( otherId ) ; if ( ( myId == null ) && ( otherId != null ) ) return false ; } return true ; }
org . junit . Assert . assertFalse ( wb1 . equals ( wb2 ) )
testGetDateOnDateCell ( ) { final org . simpleflatmapper . reflect . Getter < org . simpleflatmapper . poi . test . impl . Row , java . util . Date > getter = rowGetterFactory . newGetter ( java . util . Date . class , key , CsvColumnDefinition . IDENTITY ) ; java . util . Date now = new java . util . Date ( ) ; cell . setCellValue ( now ) ; "<AssertPlaceHolder>" ; } get ( java . sql . ResultSet ) { return target . getDate ( column ) ; }
org . junit . Assert . assertEquals ( now , getter . get ( row ) )
testReadFromInput ( ) { byte [ ] ar = new byte [ 100 ] ; java . util . Arrays . fill ( ar , ( ( byte ) ( 5 ) ) ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( ar ) ; java . io . DataInputStream dis = new java . io . DataInputStream ( bis ) ; byte [ ] b = new byte [ 100 ] ; dis . read ( b , 0 , 100 ) ; bis . close ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 5 , b [ 0 ] )