input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
getMeid ( ) { java . lang . String testMeid = "4test<sp>meid" ; org . robolectric . Shadows . shadowOf ( telephonyManager ) . setMeid ( testMeid ) ; "<AssertPlaceHolder>" ; } getMeid ( ) { java . lang . String testMeid = "4test<sp>meid" ; org . robolectric . Shadows . shadowOf ( telephonyManager ) . setMeid ( testMeid ) ; org . junit . Assert . assertEquals ( testMeid , telephonyManager . getMeid ( ) ) ; }
org . junit . Assert . assertEquals ( testMeid , telephonyManager . getMeid ( ) )
testScalarPropertyChangedWithSameValueNotDirty ( ) { org . nuxeo . ecm . core . api . model . impl . ScalarProperty property = getScalarProperty ( ) ; property . setValue ( "test1" ) ; property . clearDirtyFlags ( ) ; property . setValue ( "test1" ) ; "<AssertPlaceHolder>" ; } isDirty ( ) { return ( ( listDiff ) != null ) && ( listDiff . isDirty ( ) ) ; }
org . junit . Assert . assertFalse ( property . isDirty ( ) )
testGetApiByURLNoMatch ( ) { java . lang . String resourceURL = "http://somewhereelse.ca/api/projects/2" ; ca . corefacility . bioinformatics . irida . model . RemoteAPI apiForUrl = remoteAPIService . getRemoteAPIForUrl ( resourceURL ) ; "<AssertPlaceHolder>" ; } getRemoteAPIForUrl ( java . lang . String ) { return repository . getRemoteAPIForUrl ( url ) ; }
org . junit . Assert . assertNull ( apiForUrl )
geraCadeiaCertificadoHomologacao ( ) { final byte [ ] cadeia = com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . geraCadeiaCertificados ( DFAmbiente . HOMOLOGACAO , "senha" ) ; "<AssertPlaceHolder>" ; } geraCadeiaCertificados ( com . fincatto . documentofiscal . DFAmbiente , java . lang . String ) { final java . security . KeyStore keyStore = java . security . KeyStore . getInstance ( java . security . KeyStore . getDefaultType ( ) ) ; keyStore . load ( null , senha . toCharArray ( ) ) ; try ( java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ) { for ( final com . fincatto . documentofiscal . nfe310 . classes . NFAutorizador31 aut : com . fincatto . documentofiscal . nfe310 . classes . NFAutorizador31 . values ( ) ) { final java . lang . String urlNF = aut . getNfeStatusServico ( ambiente ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( urlNF ) ) { final java . lang . String host = new java . net . URI ( urlNF ) . getHost ( ) ; com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . get ( keyStore , host ) ; } final java . lang . String urlNFC = aut . getNfceStatusServico ( ambiente ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( urlNFC ) ) { final java . lang . String host = new java . net . URI ( urlNFC ) . getHost ( ) ; com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . get ( keyStore , host ) ; } } for ( final com . fincatto . documentofiscal . nfe400 . classes . NFAutorizador400 aut : com . fincatto . documentofiscal . nfe400 . classes . NFAutorizador400 . values ( ) ) { final java . lang . String urlNF = aut . getNfeStatusServico ( ambiente ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( urlNF ) ) { final java . lang . String host = new java . net . URI ( urlNF ) . getHost ( ) ; com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . get ( keyStore , host ) ; } final java . lang . String urlNFC = aut . getNfceStatusServico ( ambiente ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( urlNFC ) ) { final java . lang . String host = new java . net . URI ( urlNFC ) . getHost ( ) ; com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . get ( keyStore , host ) ; } } for ( final com . fincatto . documentofiscal . mdfe3 . classes . MDFAutorizador3 aut : com . fincatto . documentofiscal . mdfe3 . classes . MDFAutorizador3 . values ( ) ) { final java . lang . String urlMDFe = aut . getMDFeStatusServico ( ambiente ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( urlMDFe ) ) { final java . lang . String host = new java . net . URI ( urlMDFe ) . getHost ( ) ; com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . get ( keyStore , host ) ; } } for ( final com . fincatto . documentofiscal . cte300 . classes . CTAutorizador31 aut : com . fincatto . documentofiscal . cte300 . classes . CTAutorizador31 . values ( ) ) { final java . lang . String urlCTe = aut . getCteStatusServico ( ambiente ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( urlCTe ) ) { final java . lang . String host = new java . net . URI ( urlCTe ) . getHost ( ) ; com . fincatto . documentofiscal . utils . GeraCadeiaCertificados . get ( keyStore , host ) ; } } keyStore . store ( out , senha . toCharArray ( ) ) ; return out . toByteArray ( ) ; } }
org . junit . Assert . assertTrue ( ( ( cadeia . length ) > 0 ) )
testGetDatumReaderForSpecificType ( ) { java . lang . Class < org . kitesdk . data . event . StandardEvent > type = org . kitesdk . data . event . StandardEvent . class ; org . apache . avro . Schema writerSchema = org . kitesdk . data . event . StandardEvent . getClassSchema ( ) ; org . apache . avro . io . DatumReader result = org . kitesdk . data . spi . DataModelUtil . getDatumReaderForType ( type , writerSchema ) ; "<AssertPlaceHolder>" ; } getDatumReaderForType ( java . lang . Class , org . apache . avro . Schema ) { org . apache . avro . Schema readerSchema = org . kitesdk . data . spi . DataModelUtil . getReaderSchema ( type , writerSchema ) ; org . apache . avro . generic . GenericData dataModel = org . kitesdk . data . spi . DataModelUtil . getDataModelForType ( type ) ; if ( dataModel instanceof org . apache . avro . reflect . ReflectData ) { return new org . apache . avro . reflect . ReflectDatumReader < E > ( writerSchema , readerSchema , ( ( org . apache . avro . reflect . ReflectData ) ( dataModel ) ) ) ; } else if ( dataModel instanceof org . apache . avro . specific . SpecificData ) { return new org . apache . avro . specific . SpecificDatumReader < E > ( writerSchema , readerSchema , ( ( org . apache . avro . specific . SpecificData ) ( dataModel ) ) ) ; } else { return new org . apache . avro . generic . GenericDatumReader < E > ( writerSchema , readerSchema , dataModel ) ; } }
org . junit . Assert . assertEquals ( org . apache . avro . specific . SpecificDatumReader . class , result . getClass ( ) )
test_param_string_positional_eligible_1 ( ) { java . lang . String cmdText = "SELECT<sp>*<sp>WHERE<sp>{<sp>?s<sp>?p<sp>?<sp>.<sp>}" ; org . apache . jena . query . ParameterizedSparqlString pss = new org . apache . jena . query . ParameterizedSparqlString ( cmdText ) ; java . util . Iterator < java . lang . Integer > iter = pss . getEligiblePositionalParameters ( ) ; int count = 0 ; while ( iter . hasNext ( ) ) { count ++ ; iter . next ( ) ; } "<AssertPlaceHolder>" ; } next ( ) { if ( ( ( elementsReturned ) ++ ) >= ( trigger ) ) { callback . call ( ) ; } return delegate . next ( ) ; }
org . junit . Assert . assertEquals ( 1 , count )
testOneLineStringParsing ( ) { java . lang . String line = "Lorem<sp>Ipsum<sp>Dolorem" ; com . github . resource4j . ResourceObject file = new com . github . resource4j . objects . ByteArrayResourceObject ( "test.txt" , "test.txt" , line . getBytes ( ) , 0 ) ; java . lang . String result = com . github . resource4j . objects . parsers . StringParser . getInstance ( ) . parse ( file ) ; "<AssertPlaceHolder>" ; } parse ( com . github . resource4j . ResourceObject ) { return ( ( java . util . Map ) ( file . parsedTo ( properties ( ) ) . asIs ( ) ) ) ; }
org . junit . Assert . assertEquals ( line , result )
testSerializeDeserialize ( ) { final com . fasterxml . jackson . databind . ObjectMapper mapper = JsonMapper . INSTANCE . mapper ; final byte [ ] bytes = mapper . writeValueAsBytes ( serverInfo ) ; final io . confluent . ksql . rest . entity . ServerInfo deserializedServerInfo = mapper . readValue ( bytes , io . confluent . ksql . rest . entity . ServerInfo . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( serverInfo , org . hamcrest . CoreMatchers . equalTo ( deserializedServerInfo ) )
testGetConfigurationTemplate ( ) { template = "/VM_files/getconfiguration.vm" ; java . lang . String message = callVelocity ( template , null ) ; "<AssertPlaceHolder>" ; log . info ( message ) ; } callVelocity ( java . lang . String , java . lang . Object ) { java . lang . String velocitycommand = null ; velocityEngine . setParam ( params ) ; velocityEngine . setTemplate ( template ) ; try { velocitycommand = velocityEngine . mergeTemplate ( ) ; } catch ( org . apache . velocity . exception . ResourceNotFoundException e ) { log . error ( e . getLocalizedMessage ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . velocity . exception . ParseErrorException e ) { log . error ( e . getLocalizedMessage ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { log . error ( e . getLocalizedMessage ( ) ) ; org . junit . Assert . fail ( ) ; } return velocitycommand ; }
org . junit . Assert . assertNotNull ( message )
doubleTouch ( ) { final int eventCount = 1000 ; org . os890 . ds . addon . test . uc004 . CountingEvent event = new org . os890 . ds . addon . test . uc004 . CountingEvent ( ) ; for ( int i = 0 ; i < eventCount ; i ++ ) { this . simpleDispatcher . doubleTouch ( event ) ; } java . lang . Thread . sleep ( 50 ) ; "<AssertPlaceHolder>" ; } getTouchCount ( ) { return touchCount . get ( ) ; }
org . junit . Assert . assertEquals ( ( eventCount * 2 ) , event . getTouchCount ( ) )
testVerify ( ) { com . hortonworks . registries . auth . util . Signer signer = new com . hortonworks . registries . auth . util . Signer ( createStringSignerSecretProvider ( ) ) ; java . lang . String t = "test" ; java . lang . String s = signer . sign ( t ) ; java . lang . String e = signer . verifyAndExtract ( s ) ; "<AssertPlaceHolder>" ; } verifyAndExtract ( java . lang . String ) { int index = signedStr . lastIndexOf ( com . hortonworks . registries . auth . util . Signer . SIGNATURE ) ; if ( index == ( - 1 ) ) { throw new com . hortonworks . registries . auth . util . SignerException ( ( "Invalid<sp>signed<sp>text:<sp>" + signedStr ) ) ; } java . lang . String originalSignature = signedStr . substring ( ( index + ( com . hortonworks . registries . auth . util . Signer . SIGNATURE . length ( ) ) ) ) ; java . lang . String rawValue = signedStr . substring ( 0 , index ) ; checkSignatures ( rawValue , originalSignature ) ; return rawValue ; }
org . junit . Assert . assertEquals ( t , e )
testIsExpanded_onVirtual_doesNotResolveItem ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; grid . setItemCount ( 1 ) ; org . eclipse . nebula . widgets . grid . GridItem item = grid . getItem ( 0 ) ; item . isExpanded ( ) ; "<AssertPlaceHolder>" ; } isResolved ( ) { return parent . isVirtual ( ) ? ( data ) != null : true ; }
org . junit . Assert . assertFalse ( item . isResolved ( ) )
testToQueryString ( ) { "<AssertPlaceHolder>" ; } toQueryString ( ) { return ( ( ( ( getPropNameWithAlias ( ) ) + ( operator ) ) + ( ROOT_ALIAS ) ) + "." ) + ( otherPropName ) ; }
org . junit . Assert . assertTrue ( instance . toQueryString ( ) . isEmpty ( ) )
testClearLocal ( ) { System . out . println ( "<sp>clearLocalValues" ) ; final java . lang . String varName = "foo" ; final java . lang . String varValue = "clearLocal" ; org . geotools . filter . function . EnvFunction . setLocalValue ( varName , varValue ) ; org . geotools . filter . function . EnvFunction . clearLocalValues ( ) ; java . lang . Object result = ff . function ( "env" , ff . literal ( varName ) ) . evaluate ( null ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { if ( ( lookup ) == null ) { createLookup ( ) ; } java . lang . Object key = ( ( org . opengis . filter . expression . Expression ) ( params . get ( 0 ) ) ) . evaluate ( feature ) ; java . awt . Color color = lookup . get ( key ) ; if ( color == null ) { color = addColor ( key ) ; } return color ; }
org . junit . Assert . assertNull ( result )
shouldCreatePartitionDistribution ( ) { final cs . bilkent . joker . engine . partition . PartitionDistribution partitionDistribution = partitionService . createPartitionDistribution ( regionId , 1 ) ; "<AssertPlaceHolder>" ; } createPartitionDistribution ( int , int ) { checkReplicaCount ( replicaCount ) ; checkState ( ( ! ( distributions . containsKey ( regionId ) ) ) , "regionId=%s<sp>already<sp>has<sp>a<sp>partition<sp>distribution!<sp>Cannot<sp>create<sp>partition<sp>distribution<sp>with<sp>%s<sp>replicas" , regionId , replicaCount ) ; final java . util . List < java . lang . Integer > replicaIndices = new java . util . ArrayList ( partitionCount ) ; for ( int partitionId = 0 ; partitionId < ( partitionCount ) ; partitionId ++ ) { replicaIndices . add ( ( partitionId % replicaCount ) ) ; } shuffle ( replicaIndices ) ; final int [ ] distribution = new int [ partitionCount ] ; for ( int partitionId = 0 ; partitionId < ( partitionCount ) ; partitionId ++ ) { distribution [ partitionId ] = replicaIndices . get ( partitionId ) ; } checkDistribution ( regionId , distribution ) ; final cs . bilkent . joker . engine . partition . PartitionDistribution partitionDistribution = new cs . bilkent . joker . engine . partition . PartitionDistribution ( distribution ) ; distributions . put ( regionId , partitionDistribution ) ; cs . bilkent . joker . engine . partition . impl . PartitionServiceImpl . LOGGER . debug ( "partition<sp>distribution<sp>is<sp>created<sp>for<sp>regionId={}<sp>replicaCount={}<sp>distribution={}" , regionId , replicaCount , distribution ) ; return partitionDistribution ; }
org . junit . Assert . assertNotNull ( partitionDistribution )
testGetTypeParametersWithReusedTypeParameters ( ) { org . qcri . rheem . core . util . ReflectionUtilsTest . MyParameterizedClassA < java . lang . Integer , java . lang . String > myParameterizedObject = new org . qcri . rheem . core . util . ReflectionUtilsTest . MyParameterizedClassB < java . lang . Integer , java . lang . String > ( ) { } ; java . util . Map < java . lang . String , java . lang . reflect . Type > expectedTypeParameters = new java . util . HashMap ( ) ; expectedTypeParameters . put ( "A" , org . qcri . rheem . core . util . Integer . class ) ; expectedTypeParameters . put ( "B" , java . lang . String . class ) ; final java . util . Map < java . lang . String , java . lang . reflect . Type > typeParameters = org . qcri . rheem . core . util . ReflectionUtils . getTypeParameters ( myParameterizedObject . getClass ( ) , org . qcri . rheem . core . util . ReflectionUtilsTest . MyParameterizedClassA . class ) ; "<AssertPlaceHolder>" ; } getTypeParameters ( java . lang . Class , java . lang . Class ) { org . qcri . rheem . core . util . List < org . qcri . rheem . core . util . Type > genericSupertypes = java . util . stream . Stream . concat ( java . util . stream . Stream . of ( subclass . getGenericSuperclass ( ) ) , java . util . stream . Stream . of ( subclass . getGenericInterfaces ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; for ( org . qcri . rheem . core . util . Type supertype : genericSupertypes ) { if ( supertype instanceof java . lang . Class < ? > ) { java . lang . Class < ? > cls = ( ( java . lang . Class < ? > ) ( supertype ) ) ; if ( ! ( superclass . isAssignableFrom ( cls ) ) ) continue ; return org . qcri . rheem . core . util . ReflectionUtils . getTypeParameters ( cls , superclass ) ; } else if ( supertype instanceof org . qcri . rheem . core . util . ParameterizedType ) { org . qcri . rheem . core . util . ParameterizedType parameterizedType = ( ( org . qcri . rheem . core . util . ParameterizedType ) ( supertype ) ) ; final org . qcri . rheem . core . util . Type rawType = parameterizedType . getRawType ( ) ; if ( ! ( rawType instanceof java . lang . Class < ? > ) ) continue ; java . lang . Class < ? > cls = ( ( java . lang . Class < ? > ) ( rawType ) ) ; if ( ! ( superclass . isAssignableFrom ( cls ) ) ) continue ; final org . qcri . rheem . core . util . Map < java . lang . String , org . qcri . rheem . core . util . Type > localTypeArguments = org . qcri . rheem . core . util . ReflectionUtils . getTypeArguments ( parameterizedType ) ; if ( cls . equals ( superclass ) ) { return localTypeArguments ; } else { final org . qcri . rheem . core . util . Map < java . lang . String , org . qcri . rheem . core . util . Type > preliminaryResult = org . qcri . rheem . core . util . ReflectionUtils . getTypeParameters ( cls , superclass ) ; final org . qcri . rheem . core . util . Map < java . lang . String , org . qcri . rheem . core . util . Type > result = new org . qcri . rheem . core . util . HashMap ( preliminaryResult . size ( ) ) ; for ( Map . Entry < java . lang . String , org . qcri . rheem . core . util . Type > entry : preliminaryResult . entrySet ( ) ) { if ( ( entry . getValue ( ) ) instanceof org . qcri . rheem . core . util . TypeVariable < ? > ) { final org . qcri . rheem . core . util . Type translatedTypeArgument = localTypeArguments . getOrDefault ( ( ( org . qcri . rheem . core . util . TypeVariable ) ( entry . getValue ( ) ) ) . getName ( ) , entry . getValue ( ) ) ; result . put ( entry . getKey ( ) , translatedTypeArgument ) ; } else { result . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } return result ; } } } return org . qcri . rheem . core . util . Collections . emptyMap ( ) ; }
org . junit . Assert . assertEquals ( expectedTypeParameters , typeParameters )
unions ( ) { System . out . println ( "[TestMemoryMapping]<sp>testing<sp>Unions" ) ; for ( int k = 0 ; k < ( ( org . roaringbitmap . buffer . TestMemoryMapping . mappedbitmaps . size ( ) ) - 4 ) ; k += 4 ) { final org . roaringbitmap . buffer . MutableRoaringBitmap rb = org . roaringbitmap . buffer . BufferFastAggregation . or ( org . roaringbitmap . buffer . TestMemoryMapping . mappedbitmaps . get ( k ) , org . roaringbitmap . buffer . TestMemoryMapping . mappedbitmaps . get ( ( k + 1 ) ) , org . roaringbitmap . buffer . TestMemoryMapping . mappedbitmaps . get ( ( k + 3 ) ) , org . roaringbitmap . buffer . TestMemoryMapping . mappedbitmaps . get ( ( k + 4 ) ) ) ; final org . roaringbitmap . buffer . MutableRoaringBitmap rbram = org . roaringbitmap . buffer . BufferFastAggregation . or ( org . roaringbitmap . buffer . TestMemoryMapping . rambitmaps . get ( k ) , org . roaringbitmap . buffer . TestMemoryMapping . rambitmaps . get ( ( k + 1 ) ) , org . roaringbitmap . buffer . TestMemoryMapping . rambitmaps . get ( ( k + 3 ) ) , org . roaringbitmap . buffer . TestMemoryMapping . rambitmaps . get ( ( k + 4 ) ) ) ; "<AssertPlaceHolder>" ; } } equals ( java . lang . Object ) { if ( o instanceof org . roaringbitmap . buffer . ImmutableRoaringBitmap ) { if ( ( this . highLowContainer . size ( ) ) != ( ( ( org . roaringbitmap . buffer . ImmutableRoaringBitmap ) ( o ) ) . highLowContainer . size ( ) ) ) { return false ; } org . roaringbitmap . buffer . MappeableContainerPointer mp1 = this . highLowContainer . getContainerPointer ( ) ; org . roaringbitmap . buffer . MappeableContainerPointer mp2 = ( ( org . roaringbitmap . buffer . ImmutableRoaringBitmap ) ( o ) ) . highLowContainer . getContainerPointer ( ) ; while ( mp1 . hasContainer ( ) ) { if ( ( mp1 . key ( ) ) != ( mp2 . key ( ) ) ) { return false ; } if ( ( mp1 . getCardinality ( ) ) != ( mp2 . getCardinality ( ) ) ) { return false ; } if ( ! ( mp1 . getContainer ( ) . equals ( mp2 . getContainer ( ) ) ) ) { return false ; } mp1 . advance ( ) ; mp2 . advance ( ) ; } return true ; } return false ; }
org . junit . Assert . assertTrue ( rb . equals ( rbram ) )
nestedElements ( ) { final org . apache . commons . lang3 . builder . MultilineRecursiveToStringStyleTest . Customer customer = new org . apache . commons . lang3 . builder . MultilineRecursiveToStringStyleTest . Customer ( "Douglas<sp>Adams" ) ; final org . apache . commons . lang3 . builder . MultilineRecursiveToStringStyleTest . Bank bank = new org . apache . commons . lang3 . builder . MultilineRecursiveToStringStyleTest . Bank ( "ASF<sp>Bank" ) ; customer . bank = bank ; final java . lang . String exp = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( getClassPrefix ( customer ) ) + "[" ) + ( BR ) ) + "<sp>name=Douglas<sp>Adams," ) + ( BR ) ) + "<sp>bank=" ) + ( getClassPrefix ( bank ) ) ) + "[" ) + ( BR ) ) + "<sp>name=ASF<sp>Bank" ) + ( BR ) ) + "<sp>]," ) + ( BR ) ) + "<sp>accounts=<null>" ) + ( BR ) ) + "]" ; "<AssertPlaceHolder>" ; } toString ( java . lang . Class [ ] ) { return java . util . Arrays . asList ( c ) . toString ( ) ; }
org . junit . Assert . assertEquals ( exp , toString ( customer ) )
bepaalLeegAlleenAfgeleidAdministratief ( ) { final java . util . Map < nl . bzk . brp . domain . leveringmodel . MetaModel , nl . bzk . algemeenbrp . dal . domein . brp . enums . Verwerkingssoort > verwerkingssoortMap = new java . util . HashMap ( ) ; final nl . bzk . brp . domain . leveringmodel . MetaObject metaObject = maakPersoon ( ) ; for ( nl . bzk . brp . domain . leveringmodel . MetaGroep metaGroep : metaObject . getGroepen ( ) ) { metaGroep . getRecords ( ) . stream ( ) . filter ( ( metaRecord ) -> Element . PERSOON_AFGELEIDADMINISTRATIEF == ( metaRecord . getParentGroep ( ) . getGroepElement ( ) . getElement ( ) ) ) . forEach ( ( metaRecord ) -> { verwerkingssoortMap . put ( metaRecord , Verwerkingssoort . TOEVOEGING ) ; } ) ; } final nl . bzk . brp . service . maakbericht . algemeen . Berichtgegevens berichtgegevens = getBerichtgegevens ( metaObject ) ; berichtgegevens . getStatischePersoongegevens ( ) . setVerwerkingssoortMap ( verwerkingssoortMap ) ; leegBepalerService . execute ( berichtgegevens ) ; "<AssertPlaceHolder>" ; } isLeegBericht ( ) { return leegBericht ; }
org . junit . Assert . assertTrue ( berichtgegevens . isLeegBericht ( ) )
isFiltered ( ) { final boolean filtered = net . ripe . db . whois . common . rpsl . RpslObjectFilter . isFiltered ( mntner ) ; "<AssertPlaceHolder>" ; } isFiltered ( net . ripe . db . whois . common . rpsl . RpslObject ) { final java . util . List < net . ripe . db . whois . common . rpsl . RpslAttribute > attributes = rpslObject . findAttributes ( AttributeType . SOURCE ) ; return ( ! ( attributes . isEmpty ( ) ) ) && ( attributes . get ( 0 ) . getValue ( ) . contains ( net . ripe . db . whois . common . rpsl . RpslObjectFilter . FILTERED ) ) ; }
org . junit . Assert . assertThat ( filtered , org . hamcrest . Matchers . is ( false ) )
testCreate ( ) { org . eclipse . rap . rwt . remote . RemoteObject remoteObject = org . eclipse . rap . rwt . internal . protocol . RemoteObjectFactory . createRemoteObject ( shell , "type" ) ; "<AssertPlaceHolder>" ; } createRemoteObject ( org . eclipse . swt . widgets . Widget , java . lang . String ) { org . eclipse . rap . rwt . internal . util . ParamCheck . notNull ( widget , "widget" ) ; org . eclipse . rap . rwt . internal . util . ParamCheck . notNull ( type , "type" ) ; return org . eclipse . rap . rwt . internal . protocol . RemoteObjectFactory . createForId ( org . eclipse . rap . rwt . internal . lifecycle . WidgetUtil . getId ( widget ) , type ) ; }
org . junit . Assert . assertNotNull ( remoteObject )
testPSImageHandlerSVG ( ) { org . apache . fop . apps . FOUserAgent ua = org . apache . fop . apps . FopFactory . newInstance ( new java . io . File ( "." ) . toURI ( ) ) . newFOUserAgent ( ) ; java . lang . String svg = ">\n" 4 http : org . apache . batik . anim . dom . SAXSVGDocumentFactory factory = new org . apache . batik . anim . dom . SAXSVGDocumentFactory ( null ) ; org . w3c . dom . Document doc = factory . createDocument ( null , org . apache . commons . io . IOUtils . toInputStream ( svg ) ) ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; new org . apache . fop . render . ps . PSImageHandlerSVG ( ) . handleImage ( new org . apache . fop . render . ps . PSRenderingContext ( ua , new org . apache . xmlgraphics . ps . PSGenerator ( bos ) , new org . apache . fop . fonts . FontInfo ( ) ) , new org . apache . xmlgraphics . image . loader . impl . ImageXMLDOM ( null , doc , ">\n" 5 ) , new java . awt . Rectangle ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "XMLResourceBundle:<sp>" + ( getLocale ( ) ) ; }
org . junit . Assert . assertTrue ( bos . toString ( ) . contains ( ">\n" 1 ) )
upgradeGroupIdToVrc3Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . groupid_rc2 . GroupIdRecords . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . groupid_rc2 . GroupIdRecords . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller = jaxbContext1 . createUnmarshaller ( ) ; java . io . InputStream rc2Stream = org . orcid . record_2_0 . ConvertVrc2ToVrc3Test . class . getClassLoader ( ) . getResourceAsStream ( "test-group-id-2.0_rc2.xml" ) ; java . io . InputStream rc3Stream = org . orcid . record_2_0 . ConvertVrc2ToVrc3Test . class . getClassLoader ( ) . getResourceAsStream ( "test-group-id-2.0_rc3.xml" ) ; org . orcid . jaxb . model . groupid_rc2 . GroupIdRecords rc2Group = ( ( org . orcid . jaxb . model . groupid_rc2 . GroupIdRecords ) ( jaxbUnmarshaller . unmarshal ( rc2Stream ) ) ) ; jaxbUnmarshaller = jaxbContext2 . createUnmarshaller ( ) ; org . orcid . jaxb . model . groupid_rc3 . GroupIdRecords rc3GroupId1 = ( ( org . orcid . jaxb . model . groupid_rc3 . GroupIdRecords ) ( jaxbUnmarshaller . unmarshal ( rc3Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0_rc2ToV2_0_rc3 . upgrade ( new org . orcid . core . version . V2Convertible ( rc2Group , "v2_rc2" ) ) ; org . orcid . jaxb . model . groupid_rc3 . GroupIdRecords rc3GroupId2 = ( ( org . orcid . jaxb . model . groupid_rc3 . GroupIdRecords ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } getObjectToConvert ( ) { return objectToConvert ; }
org . junit . Assert . assertEquals ( rc3GroupId1 , rc3GroupId2 )
testCount ( ) { "<AssertPlaceHolder>" ; } V ( ) { return this ; }
org . junit . Assert . assertEquals ( 6 , graph . V ( ) . count ( ) )
testGetParametersWithDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long enrolmentId = 1L ; org . lnu . is . domain . enrolment . Enrolment enrolment = new org . lnu . is . domain . enrolment . Enrolment ( ) ; enrolment . setId ( enrolmentId ) ; java . lang . Long specOfferWaveId = 2L ; org . lnu . is . domain . specoffer . SpecOfferWave specOfferWave = new org . lnu . is . domain . specoffer . SpecOfferWave ( ) ; specOfferWave . setId ( specOfferWaveId ) ; java . lang . Long enrolmentStatusTypeId = 3L ; org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType enrolmentStatusType = new org . lnu . is . domain . enrolment . status . type . EnrolmentStatusType ( ) ; enrolmentStatusType . setId ( enrolmentStatusTypeId ) ; org . lnu . is . domain . enrolment . status . EnrolmentStatus entity = new org . lnu . is . domain . enrolment . status . EnrolmentStatus ( ) ; entity . setEnrolment ( enrolment ) ; entity . setSpecOfferWave ( specOfferWave ) ; entity . setEnrolmentStatusType ( enrolmentStatusType ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "enrolment" , enrolment ) ; expected . put ( "specOfferWave" , specOfferWave ) ; expected . put ( "enrolmentStatusType" , enrolmentStatusType ) ; when ( enrolmentDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( enrolment ) ; when ( specOfferWaveDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( specOfferWave ) ; when ( enrolmentStatusTypeDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( enrolmentStatusType ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( enrolmentDao ) . getEntityById ( enrolmentId ) ; verify ( specOfferWaveDao ) . getEntityById ( specOfferWaveId ) ; verify ( enrolmentStatusTypeDao ) . getEntityById ( enrolmentStatusTypeId ) ; "<AssertPlaceHolder>" ; } getEntityById ( KEY ) { org . lnu . is . dao . dao . DefaultDao . LOG . info ( "Getting<sp>{}.entity<sp>wit<sp>id" , getEntityClass ( ) . getSimpleName ( ) , id ) ; return persistenceManager . findById ( getEntityClass ( ) , id ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testProcessRowWithInput ( ) { setupReturns ( ) ; setupRowMeta ( ) ; dbOutput . init ( stepMetaInterface , stepDataInterace ) ; "<AssertPlaceHolder>" ; } processRow ( org . pentaho . di . trans . step . StepMetaInterface , org . pentaho . di . trans . step . StepDataInterface ) { java . lang . Object [ ] row = getRow ( ) ; if ( row == null ) { if ( ( ( m_batch ) != null ) && ( ( m_batch . size ( ) ) > 0 ) ) { try { doBatch ( ) ; } catch ( org . pentaho . mongo . MongoDbException e ) { throw new org . pentaho . di . core . exception . KettleException ( e ) ; } } java . util . List < org . pentaho . di . trans . steps . mongodboutput . MongoDbOutputMeta . MongoIndex > indexes = m_meta . getMongoIndexes ( ) ; if ( ( indexes != null ) && ( ( indexes . size ( ) ) > 0 ) ) { logBasic ( org . pentaho . di . i18n . BaseMessages . getString ( org . pentaho . di . trans . steps . mongodboutput . MongoDbOutput . PKG , "MongoDbOutput.Messages.ApplyingIndexOpps" ) ) ; try { m_data . applyIndexes ( indexes , log , m_meta . getTruncate ( ) ) ; } catch ( org . pentaho . mongo . MongoDbException e ) { throw new org . pentaho . di . core . exception . KettleException ( e ) ; } } disconnect ( ) ; setOutputDone ( ) ; return false ; } if ( first ) { first = false ; m_batchInsertSize = 100 ; java . lang . String batchInsert = environmentSubstitute ( m_meta . getBatchInsertSize ( ) ) ; if ( ! ( org . pentaho . di . core . Const . isEmpty ( batchInsert ) ) ) { m_batchInsertSize = java . lang . Integer . parseInt ( batchInsert ) ; } m_batch = new java . util . ArrayList < com . mongodb . DBObject > ( m_batchInsertSize ) ; m_batchRows = new java . util . ArrayList < java . lang . Object [ ] > ( ) ; m_data . setOutputRowMeta ( getInputRowMeta ( ) ) ; m_data . m_hasTopLevelJSONDocInsert = org . pentaho . di . trans . steps . mongodboutput . MongoDbOutputData . scanForInsertTopLevelJSONDoc ( m_meta . getMongoFields ( ) ) ; org . pentaho . di . core . row . RowMetaInterface rmi = getInputRowMeta ( ) ; java . util . List < org . pentaho . di . trans . steps . mongodboutput . MongoDbOutputMeta . MongoField > mongoFields = m_meta . getMongoFields ( ) ; checkInputFieldsMatch ( rmi , mongoFields ) ; m_data . setMongoFields ( m_meta . getMongoFields ( ) ) ; m_data . init ( this ) ; if ( m_meta . getTruncate ( ) ) { try { logBasic ( org . pentaho . di . i18n . BaseMessages . getString ( org . pentaho . di . trans . steps . mongodboutput . MongoDbOutput . PKG , "MongoDbOutput.Messages.TruncatingCollection" ) ) ; m_data . getCollection ( ) . remove ( ) ; } catch ( java . lang . Exception m ) { disconnect ( ) ; throw new org . pentaho . di . core . exception . KettleException ( m . getMessage ( ) , m ) ; } } } if ( ! ( isStopped ( ) ) ) { if ( m_meta . getUpdate ( ) ) { com . mongodb . DBObject updateQuery = org . pentaho . di . trans . steps . mongodboutput . MongoDbOutputData . getQueryObject ( m_data . getMongoFields ( ) , getInputRowMeta ( ) , row , this , m_mongoTopLevelStructure ) ; if ( log . isDebug ( ) ) { logDebug ( org . pentaho . di . i18n . BaseMessages . getString ( org . pentaho . di . trans . steps . mongodboutput . MongoDbOutput . PKG , "MongoDbOutput.Messages.Debug.QueryForUpsert" , updateQuery ) ) ; } if ( updateQuery != null ) { com . mongodb . DBObject insertUpdate = null ; if ( ! ( m_meta . getModifierUpdate ( ) ) ) { insertUpdate = org . pentaho . di . trans . steps . mongodboutput . MongoDbOutputData . kettleRowToMongo ( m_data . getMongoFields ( ) , getInputRowMeta ( ) , row , this , m_mongoTopLevelStructure , m_data . m_hasTopLevelJSONDocInsert ) ; if ( log . isDebug ( ) ) { logDebug ( org . pentaho . di . i18n . BaseMessages . getString ( org . pentaho . di . trans . steps . mongodboutput . MongoDbOutput . PKG , "MongoDbOutput.Messages.Debug.InsertUpsertObject" , insertUpdate ) ) ; } } else { try { insertUpdate = m_data . getModifierUpdateObject ( m_data . getMongoFields ( ) , getInputRowMeta ( ) , row , this , m_mongoTopLevelStructure ) ; } catch ( org . pentaho . mongo . MongoDbException e ) { throw new org . pentaho . di . core . exception . KettleException ( e ) ; } if ( log . isDebug ( ) ) { logDebug ( org . pentaho . di . i18n . BaseMessages . getString ( org . pentaho . di . trans . steps . mongodboutput . MongoDbOutput . PKG , "MongoDbOutput.Messages.Debug.ModifierUpdateObject" , insertUpdate ) ) ; } } if ( insertUpdate != null ) { commitUpdate ( updateQuery , insertUpdate , row ) ; } } } else { com . mongodb . DBObject mongoInsert = org . pentaho . di . trans . steps . mongodboutput . MongoDbOutputData . kettleRowToMongo ( m_data . getMongoFields ( ) , getInputRowMeta ( ) , row , this , m_mongoTopLevelStructure , m_data . m_hasTopLevelJSONDocInsert ) ; if ( mongoInsert != null ) { m_batch . add ( mongoInsert ) ; m_batchRows . add ( row ) ; } if ( ( m_batch
org . junit . Assert . assertTrue ( dbOutput . processRow ( stepMetaInterface , stepDataInterace ) )
testGetProductVersion ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testReleaseLockBestEffort ( ) { final com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient client = new com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient ( this . lockClient1Options ) ; final com . amazonaws . services . dynamodbv2 . LockItem item = client . acquireLock ( com . amazonaws . services . dynamodbv2 . ACQUIRE_LOCK_OPTIONS_TEST_KEY_1 ) ; org . mockito . Mockito . doThrow ( software . amazon . awssdk . core . exception . SdkClientException . builder ( ) . message ( "Client<sp>exception<sp>releasing<sp>lock" ) . build ( ) ) . when ( dynamoDBMock ) . deleteItem ( org . mockito . Mockito . any ( software . amazon . awssdk . services . dynamodb . model . DeleteItemRequest . class ) ) ; final com . amazonaws . services . dynamodbv2 . ReleaseLockOptions options = com . amazonaws . services . dynamodbv2 . ReleaseLockOptions . builder ( item ) . withBestEffort ( true ) . build ( ) ; "<AssertPlaceHolder>" ; client . close ( ) ; } releaseLock ( com . amazonaws . services . dynamodbv2 . ReleaseLockOptions ) { java . util . Objects . requireNonNull ( options , "ReleaseLockOptions<sp>cannot<sp>be<sp>null" ) ; final com . amazonaws . services . dynamodbv2 . LockItem lockItem = options . getLockItem ( ) ; final boolean deleteLock = options . isDeleteLock ( ) ; final boolean bestEffort = options . isBestEffort ( ) ; final java . util . Optional < java . nio . ByteBuffer > data = options . getData ( ) ; java . util . Objects . requireNonNull ( lockItem , "Cannot<sp>release<sp>null<sp>lockItem" ) ; if ( ! ( lockItem . getOwnerName ( ) . equals ( this . ownerName ) ) ) { return false ; } synchronized ( lockItem ) { try { this . locks . remove ( lockItem . getUniqueIdentifier ( ) ) ; final java . lang . String conditionalExpression ; final java . util . Map < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValue > expressionAttributeValues = new java . util . HashMap ( ) ; expressionAttributeValues . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . RVN_VALUE_EXPRESSION_VARIABLE , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . s ( lockItem . getRecordVersionNumber ( ) ) . build ( ) ) ; expressionAttributeValues . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . OWNER_NAME_VALUE_EXPRESSION_VARIABLE , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . s ( lockItem . getOwnerName ( ) ) . build ( ) ) ; final java . util . Map < java . lang . String , java . lang . String > expressionAttributeNames = new java . util . HashMap ( ) ; expressionAttributeNames . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . PK_PATH_EXPRESSION_VARIABLE , partitionKeyName ) ; expressionAttributeNames . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . OWNER_NAME_PATH_EXPRESSION_VARIABLE , com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . OWNER_NAME ) ; expressionAttributeNames . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . RVN_PATH_EXPRESSION_VARIABLE , com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . RECORD_VERSION_NUMBER ) ; if ( this . sortKeyName . isPresent ( ) ) { conditionalExpression = com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . PK_EXISTS_AND_SK_EXISTS_AND_OWNER_NAME_SAME_AND_RVN_SAME_CONDITION ; expressionAttributeNames . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . SK_PATH_EXPRESSION_VARIABLE , sortKeyName . get ( ) ) ; } else { conditionalExpression = com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . PK_EXISTS_AND_OWNER_NAME_SAME_AND_RVN_SAME_CONDITION ; } final java . util . Map < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValue > key = getItemKeys ( lockItem ) ; if ( deleteLock ) { final software . amazon . awssdk . services . dynamodb . model . DeleteItemRequest deleteItemRequest = software . amazon . awssdk . services . dynamodb . model . DeleteItemRequest . builder ( ) . tableName ( tableName ) . key ( key ) . conditionExpression ( conditionalExpression ) . expressionAttributeNames ( expressionAttributeNames ) . expressionAttributeValues ( expressionAttributeValues ) . build ( ) ; this . dynamoDB . deleteItem ( deleteItemRequest ) ; } else { final java . lang . String updateExpression ; expressionAttributeNames . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . IS_RELEASED_PATH_EXPRESSION_VARIABLE , com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . IS_RELEASED ) ; expressionAttributeValues . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . IS_RELEASED_VALUE_EXPRESSION_VARIABLE , com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . IS_RELEASED_ATTRIBUTE_VALUE ) ; if ( data . isPresent ( ) ) { updateExpression = com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . UPDATE_IS_RELEASED_AND_DATA ; expressionAttributeNames . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . DATA_PATH_EXPRESSION_VARIABLE , com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . DATA ) ; expressionAttributeValues . put ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . DATA_VALUE_EXPRESSION_VARIABLE , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . b ( software . amazon . awssdk . core . SdkBytes . fromByteBuffer ( data . get ( ) ) ) . build ( ) ) ; } else { updateExpression = com . amazonaws . services . dynamodbv2 . AmazonDynamoDBLockClient . UPDATE_IS_RELEASED ; } final software . amazon . awssdk . services . dynamodb . model . UpdateItemRequest updateItemRequest = software . amazon . awssdk . services . dynamodb . model . UpdateItemRequest . builder ( ) . tableName ( this . tableName ) . key ( key ) . updateExpression ( updateExpression ) . conditionExpression ( conditionalExpression ) . expressionAttributeNames ( expressionAttributeNames ) . expressionAttributeValues
org . junit . Assert . assertTrue ( client . releaseLock ( options ) )
shouldStreamResultRows ( ) { java . util . List < java . lang . Integer > series = com . github . pgasync . QueryResultTest . dbr . pool ( ) . completeQuery ( "select<sp>generate_series(1,<sp>5)" ) . thenApply ( ( rs ) -> java . util . stream . StreamSupport . stream ( rs . spliterator ( ) , false ) . map ( ( r ) -> r . getInt ( 0 ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ) . get ( ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String ) { com . github . pgasync . PgColumn pgColumn = getColumn ( column ) ; return getInt ( pgColumn . at ( ) ) ; }
org . junit . Assert . assertEquals ( java . util . List . of ( 1 , 2 , 3 , 4 , 5 ) , series )
testArray ( ) { org . nutz . mock . servlet . MockHttpServletRequest req = Mock . servlet . request ( ) ; req . setParameter ( "arrays[1].str" , "a" ) ; org . nutz . mvc . adaptor . injector . ObjectNavlPairInjector onpi = org . nutz . mvc . adaptor . injector . ObjectNavlPairInjectorTest . inj ( "arrays" , org . nutz . lang . util . NutType . array ( org . nutz . mvc . adaptor . injector . MvcTestPojo . class ) ) ; org . nutz . mvc . adaptor . injector . MvcTestPojo [ ] pojo = ( ( org . nutz . mvc . adaptor . injector . MvcTestPojo [ ] ) ( onpi . get ( null , req , null , null ) ) ) ; "<AssertPlaceHolder>" ; } get ( javax . servlet . ServletContext , javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse , java . lang . Object ) { return ( ( org . nutz . mvc . upload . TempFile ) ( ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( refer ) ) . get ( name ) ) ) ; }
org . junit . Assert . assertTrue ( pojo [ 0 ] . str . contains ( "a" ) )
test ( ) { com . comphenix . xp . rewards . ResourceFactory initial = new com . comphenix . xp . rewards . xp . ExperienceFactory ( 10 ) ; com . comphenix . xp . rewards . ResourceFactory same = initial . withMultiplier ( 1 ) ; "<AssertPlaceHolder>" ; } withMultiplier ( double ) { return new com . comphenix . xp . expressions . RangeExpression ( range , newMultiplier ) ; }
org . junit . Assert . assertEquals ( initial , same )
shouldSerialiseBytesByJustReturningTheProvidedBytes ( ) { final byte [ ] bytes = new byte [ ] { 0 , 1 } ; final byte [ ] serialisedBytes = serialiser . serialise ( bytes ) ; "<AssertPlaceHolder>" ; } serialise ( uk . gov . gchq . gaffer . data . element . GroupedProperties ) { if ( null == properties ) { return new byte [ 0 ] ; } if ( ( null == ( properties . getGroup ( ) ) ) || ( properties . getGroup ( ) . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Group<sp>is<sp>required<sp>for<sp>serialising<sp>" + ( uk . gov . gchq . gaffer . data . element . GroupedProperties . class . getSimpleName ( ) ) ) ) ; } final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition elementDefinition = schema . getElement ( properties . getGroup ( ) ) ; if ( null == elementDefinition ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( ( ( "No<sp>SchemaElementDefinition<sp>found<sp>for<sp>group<sp>" + ( properties . getGroup ( ) ) ) + ",<sp>is<sp>this<sp>group<sp>in<sp>your<sp>schema?" ) ) ; } try ( final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ) { uk . gov . gchq . gaffer . serialisation . util . LengthValueBytesSerialiserUtil . serialise ( stringSerialiser , properties . getGroup ( ) , out ) ; serialiseProperties ( properties , elementDefinition , out ) ; return out . toByteArray ( ) ; } catch ( final java . io . IOException e ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( "Unable<sp>to<sp>serialise<sp>entity<sp>into<sp>bytes" , e ) ; } }
org . junit . Assert . assertSame ( bytes , serialisedBytes )
trackClassUsageByDefaultForJavacFromJar ( ) { com . facebook . buck . jvm . java . JavaBuckConfig config = com . facebook . buck . core . config . FakeBuckConfig . builder ( ) . setFilesystem ( defaultFilesystem ) . setSections ( com . google . common . collect . ImmutableMap . of ( "tools" , com . google . common . collect . ImmutableMap . of ( "javac_jar" , temporaryFolder . newExecutableFile ( ) . toString ( ) ) ) ) . build ( ) . getView ( com . facebook . buck . jvm . java . JavaBuckConfig . class ) ; org . junit . Assume . assumeThat ( config . getJavacSpec ( EmptyTargetConfiguration . INSTANCE ) . getJavacSource ( ) , org . hamcrest . Matchers . is ( Javac . Source . JAR ) ) ; "<AssertPlaceHolder>" ; } trackClassUsage ( com . facebook . buck . jvm . java . JavacOptions ) { return javacOptions . trackClassUsage ( ) ; }
org . junit . Assert . assertTrue ( config . trackClassUsage ( EmptyTargetConfiguration . INSTANCE ) )
testIncorrectGetCompletePathName ( ) { System . out . println ( "test:IncorrectGetCompletePathName" ) ; org . glassfish . flashlight . datatree . TreeNode server = setupSimpleTree ( ) ; org . glassfish . flashlight . datatree . TreeNode grandson = server . getNode ( "wto:wtoson.wtograndson" ) ; "<AssertPlaceHolder>" ; } getNode ( java . lang . String ) { return domain . getNodeNamed ( targetName ) ; }
org . junit . Assert . assertNull ( grandson )
isEmoji_for_an_emoji_returns_true ( ) { java . lang . String emoji = "" ; boolean isEmoji = com . vdurmont . emoji . EmojiManager . isEmoji ( emoji ) ; "<AssertPlaceHolder>" ; } isEmoji ( java . lang . String ) { if ( string == null ) return false ; com . vdurmont . emoji . EmojiParser . UnicodeCandidate unicodeCandidate = com . vdurmont . emoji . EmojiParser . getNextUnicodeCandidate ( string . toCharArray ( ) , 0 ) ; return ( ( unicodeCandidate != null ) && ( ( unicodeCandidate . getEmojiStartIndex ( ) ) == 0 ) ) && ( ( unicodeCandidate . getFitzpatrickEndIndex ( ) ) == ( string . length ( ) ) ) ; }
org . junit . Assert . assertTrue ( isEmoji )
testContextualFilterMultipleSelectors ( ) { java . lang . String searchTerm = "cat" ; java . lang . String selectors = "//fileTitle,//nitf" ; org . codice . ddf . opensearch . endpoint . query . OpenSearchQuery query = new org . codice . ddf . opensearch . endpoint . query . OpenSearchQuery ( 0 , 10 , "relevance" , "desc" , 30000 , org . codice . ddf . opensearch . endpoint . query . OpenSearchQueryTest . FILTER_BUILDER ) ; query . addContextualFilter ( searchTerm , selectors ) ; org . opengis . filter . Filter filter = query . getFilter ( ) ; org . codice . ddf . opensearch . endpoint . query . VerificationVisitor verificationVisitor = new org . codice . ddf . opensearch . endpoint . query . VerificationVisitor ( ) ; filter . accept ( verificationVisitor , null ) ; java . util . HashMap < java . lang . String , org . codice . ddf . opensearch . endpoint . query . FilterStatus > map = ( ( java . util . HashMap < java . lang . String , org . codice . ddf . opensearch . endpoint . query . FilterStatus > ) ( verificationVisitor . getMap ( ) ) ) ; printFilterStatusMap ( map ) ; java . util . List < org . opengis . filter . Filter > filters = getFilters ( map , org . geotools . filter . LikeFilterImpl . class . getName ( ) ) ; "<AssertPlaceHolder>" ; java . lang . String [ ] expectedXpathExpressions = selectors . split ( "," ) ; for ( int i = 0 ; i < ( filters . size ( ) ) ; i ++ ) { verifyContextualFilter ( filters . get ( i ) , expectedXpathExpressions [ i ] , searchTerm ) ; } } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , filters . size ( ) )
testGetOrCreateTransportMap ( ) { java . util . Map < java . lang . String , java . util . List < org . apache . servicecomb . serviceregistry . cache . CacheEndpoint > > transportMap = org . apache . servicecomb . serviceregistry . cache . TestInstanceCache . instanceCache . getOrCreateTransportMap ( ) ; "<AssertPlaceHolder>" ; } getOrCreateTransportMap ( ) { if ( ( transportMap ) == null ) { synchronized ( lockObj ) { if ( ( transportMap ) == null ) { transportMap = createTransportMap ( ) ; } } } return transportMap ; }
org . junit . Assert . assertEquals ( 1 , transportMap . size ( ) )
verifyAndFormat_does_trim ( ) { final java . lang . String testValue = "<sp>HELLO<sp>\r\n" ; org . exist . xquery . value . BinaryValueType binaryValueType = new org . exist . xquery . value . BinaryValueTypeTest . TestableBinaryValueType ( Type . BASE64_BINARY , org . apache . commons . codec . binary . Base64OutputStream . class ) ; final java . lang . String result = binaryValueType . verifyAndFormatString ( testValue ) ; "<AssertPlaceHolder>" ; } verifyAndFormatString ( java . lang . String ) { str = str . replaceAll ( "\\s" , "" ) ; verifyString ( str ) ; return formatString ( str ) ; }
org . junit . Assert . assertEquals ( testValue . trim ( ) , result )
testResolutionOfPomWithNoDeps ( ) { org . arquillian . cube . kubernetes . api . Session session = new org . arquillian . cube . kubernetes . impl . DefaultSession ( "test-session" , "test-session-123" , new org . arquillian . cube . kubernetes . impl . log . AnsiLogger ( ) ) ; org . arquillian . cube . kubernetes . api . DependencyResolver resolver = new org . arquillian . cube . kubernetes . impl . resolve . ShrinkwrapResolver ( org . arquillian . cube . kubernetes . api . DependencyResolver . class . getResource ( "/test-pom.xml" ) . getFile ( ) , false ) ; "<AssertPlaceHolder>" ; } resolve ( java . lang . String ) { try { if ( ( content . startsWith ( org . arquillian . cube . kubernetes . impl . resolver . ResourceResolver . URL_PREFIX ) ) || ( content . startsWith ( org . arquillian . cube . kubernetes . impl . resolver . ResourceResolver . FILE_PREFIX ) ) ) { return new java . net . URL ( content ) ; } else if ( content . startsWith ( org . arquillian . cube . kubernetes . impl . resolver . ResourceResolver . CLASSPATH_PREFIX ) ) { java . lang . String classPathLocation = content . substring ( ( ( content . indexOf ( org . arquillian . cube . kubernetes . impl . resolver . ResourceResolver . CLASSPATH_PREFIX ) ) + ( org . arquillian . cube . kubernetes . impl . resolver . ResourceResolver . CLASSPATH_PREFIX . length ( ) ) ) ) ; final java . net . URL resource = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( classPathLocation ) ; if ( resource == null ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "%s<sp>location<sp>couldn't<sp>be<sp>found<sp>inside<sp>classpath." , classPathLocation ) ) ; } return resource ; } else { java . io . File tmp = org . arquillian . cube . kubernetes . impl . resolver . ResourceResolver . createTemporalDefinition ( content ) ; return tmp . toURI ( ) . toURL ( ) ; } } catch ( java . io . IOException e ) { throw new java . lang . IllegalArgumentException ( e ) ; } }
org . junit . Assert . assertTrue ( resolver . resolve ( session ) . isEmpty ( ) )
getRedenEindeRelatieTestOK ( ) { final char rerCode = 'N' ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . RedenBeeindigingRelatie expectedRer = new nl . bzk . algemeenbrp . dal . domein . brp . entity . RedenBeeindigingRelatie ( rerCode , "Nietigverklaring" ) ; final java . lang . String expected = java . lang . String . format ( nl . bzk . migratiebrp . ggo . viewer . service . impl . Lo3StamtabelServiceTest . STRING_FORMAT , expectedRer . getCode ( ) , expectedRer . getOmschrijving ( ) ) ; org . mockito . Mockito . doReturn ( expectedRer ) . when ( dynamischeStamtabelRepository ) . getRedenBeeindigingRelatieByCode ( rerCode ) ; final java . lang . String resultRer = lo3StamtabelService . getRedenEindeRelatie ( java . lang . String . valueOf ( rerCode ) ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { final nl . bzk . brp . domain . expressie . Datumdeel datumdeel = new nl . bzk . brp . domain . expressie . Datumdeel ( ) ; datumdeel . waarde = waarde ; datumdeel . type = nl . bzk . brp . domain . expressie . Datumdeel . Type . WAARDE ; return datumdeel ; }
org . junit . Assert . assertEquals ( expected , resultRer )
evaluateDecisionTreeIris ( ) { org . jpmml . rattle . Batch batch = new org . jpmml . rattle . RattleBatch ( "DecisionTree" , "Iris" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getModel ( ) ) ; org . jpmml . evaluator . PMMLManager pmmlManager = new org . jpmml . evaluator . PMMLManager ( pmml ) ; org . jpmml . evaluator . ModelManager < ? > modelManager = pmmlManager . getModelManager ( null , org . jpmml . evaluator . ModelEvaluatorFactory . getInstance ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > input = org . jpmml . evaluator . CsvUtil . load ( batch . getInput ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > output = org . jpmml . evaluator . CsvUtil . load ( batch . getOutput ( ) ) ; org . jpmml . evaluator . Evaluator evaluator = ( ( org . jpmml . evaluator . Evaluator ) ( modelManager ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > > table = org . jpmml . evaluator . Lists . newArrayList ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > activeFields = evaluator . getActiveFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > groupFields = evaluator . getGroupFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > predictedFields = evaluator . getPredictedFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > outputFields = evaluator . getOutputFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > inputFields = org . jpmml . evaluator . Lists . newArrayList ( ) ; inputFields . addAll ( activeFields ) ; inputFields . addAll ( groupFields ) ; for ( int i = 0 ; i < ( input . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > inputRow = input . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > arguments = org . jpmml . evaluator . Maps . newLinkedHashMap ( ) ; for ( org . jpmml . evaluator . FieldName inputField : inputFields ) { java . lang . String inputCell = inputRow . get ( inputField ) ; java . lang . Object inputValue = evaluator . prepare ( inputField , inputCell ) ; arguments . put ( inputField , inputValue ) ; } table . add ( arguments ) ; } if ( ( groupFields . size ( ) ) == 1 ) { org . jpmml . evaluator . FieldName groupField = groupFields . get ( 0 ) ; table = org . jpmml . evaluator . EvaluatorUtil . groupRows ( groupField , table ) ; } else if ( ( groupFields . size ( ) ) > 1 ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } if ( output . isEmpty ( ) ) { for ( int i = 0 ; i < ( table . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; evaluator . evaluate ( arguments ) ; } return true ; } else { if ( ( table . size ( ) ) != ( output . size ( ) ) ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } boolean success = true ; for ( int i = 0 ; i < ( output . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > outputRow = output . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > result = evaluator . evaluate ( arguments ) ; for ( org . jpmml . evaluator . FieldName predictedField : predictedFields ) { java . lang . String outputCell = outputRow . get ( predictedField ) ; java . lang . Object predictedValue = org . jpmml . evaluator . EvaluatorUtil . decode ( result . get ( predictedField ) ) ; success &= org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , predictedValue ) ; } for ( org . jpmml . evaluator . FieldName outputField : outputFields ) { java . lang . String outputCell = outputRow . get ( outputField ) ; java . lang . Object computedValue = result . get ( outputField ) ; success &= ( outputCell != null ) ? org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , computedValue
org . junit . Assert . assertTrue ( org . jpmml . rattle . BatchUtil . evaluate ( batch ) )
onCreation_readsASingleUriLocationFromDbResult ( ) { org . mockito . Mockito . when ( mockResults . getString ( "urilocation" ) ) . thenReturn ( "SOME_EXTERNAL_LOCATION" ) ; org . jkiss . dbeaver . ext . greenplum . model . GreenplumExternalTable table = new org . jkiss . dbeaver . ext . greenplum . model . GreenplumExternalTable ( mockSchema , mockResults ) ; "<AssertPlaceHolder>" ; } getUriLocations ( ) { return this . uriLocationsHandler . getCommaSeparatedList ( ) ; }
org . junit . Assert . assertEquals ( "SOME_EXTERNAL_LOCATION" , table . getUriLocations ( ) )
testRearrangementLonePairReaction ( ) { org . openscience . cdk . reaction . IReactionProcess type = new org . openscience . cdk . reaction . type . RearrangementLonePairReaction ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( type )
testCompareToBothEqual ( ) { gov . llnl . ontology . util . StringPair pair1 = new gov . llnl . ontology . util . StringPair ( "cat" , "dog" ) ; gov . llnl . ontology . util . StringPair pair2 = new gov . llnl . ontology . util . StringPair ( "cat" , "dog" ) ; "<AssertPlaceHolder>" ; } compareTo ( gov . llnl . ontology . wordnet . builder . TermToAdd ) { if ( compareInWn ) { int inWordNetDiff = ( other . numParentsInWordNet ) - ( this . numParentsInWordNet ) ; return inWordNetDiff == 0 ? ( other . numParentsToAdd ) - ( this . numParentsToAdd ) : inWordNetDiff ; } int inListDiff = ( this . numParentsToAdd ) - ( other . numParentsToAdd ) ; return inListDiff == 0 ? ( other . numParentsInWordNet ) - ( this . numParentsInWordNet ) : inListDiff ; }
org . junit . Assert . assertTrue ( ( ( pair1 . compareTo ( pair2 ) ) == 0 ) )
testRuleRef ( ) { org . antlr . v4 . tool . Grammar g = new org . antlr . v4 . tool . Grammar ( ( "parser<sp>grammar<sp>T;\n" + ( "8:BASIC<sp>1\n" 9 + "8:BASIC<sp>1\n" 4 ) ) ) ; java . lang . String expecting = "max<sp>type<sp>1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "8:BASIC<sp>1\n" 6 + "1:RULE_STOP<sp>0\n" ) + "7->3<sp>EPSILON<sp>0,0,0\n" 0 ) + "8:BASIC<sp>1\n" 0 ) + "8:BASIC<sp>1\n" 7 ) + "8:BASIC<sp>1\n" 8 ) + "6:BASIC<sp>1\n" ) + "8:BASIC<sp>1\n" 2 ) + "8:BASIC<sp>1\n" ) + "rule<sp>0:0\n" ) + "rule<sp>1:2\n" ) + "0->4<sp>EPSILON<sp>0,0,0\n" ) + "8:BASIC<sp>1\n" 1 ) + "4->5<sp>RULE<sp>2,1,0\n" ) + "8:BASIC<sp>1\n" 3 ) + "8:BASIC<sp>1\n" 5 ) + "7->3<sp>EPSILON<sp>0,0,0\n" ) ; org . antlr . v4 . runtime . atn . ATN atn = createATN ( g , true ) ; java . lang . String result = org . antlr . v4 . runtime . atn . ATNSerializer . getDecoded ( atn , java . util . Arrays . asList ( g . getTokenNames ( ) ) ) ; "<AssertPlaceHolder>" ; } getTokenNames ( ) { return org . antlr . v4 . runtime . tree . xpath . XPathLexer . tokenNames ; }
org . junit . Assert . assertEquals ( expecting , result )
shouldNotFindProviderWhenNoneIsAvailable ( ) { victim = new ro . isdc . wro . util . provider . ProviderFinder < ro . isdc . wro . model . resource . processor . support . ProcessorProvider > ( ro . isdc . wro . model . resource . processor . support . ProcessorProvider . class ) { @ ro . isdc . wro . util . provider . Override < F > java . util . Iterator < F > lookupProviders ( final java . lang . Class < F > clazz ) { return new java . util . ArrayList < F > ( ) . iterator ( ) ; } } ; "<AssertPlaceHolder>" ; } find ( ) { final java . util . List < T > providers = new java . util . ArrayList < T > ( ) ; try { final java . util . Iterator < T > iterator = lookupProviders ( type ) ; for ( ; iterator . hasNext ( ) ; ) { final T provider = iterator . next ( ) ; ro . isdc . wro . util . provider . ProviderFinder . LOG . debug ( "found<sp>provider:<sp>{}" , provider ) ; providers . add ( provider ) ; } collectConfigurableProviders ( providers ) ; } catch ( final java . lang . Exception e ) { ro . isdc . wro . util . provider . ProviderFinder . LOG . error ( "Failed<sp>to<sp>discover<sp>providers<sp>using<sp>ServiceRegistry.<sp>Cannot<sp>continue..." , e ) ; throw ro . isdc . wro . WroRuntimeException . wrap ( e ) ; } java . util . Collections . sort ( providers , Ordered . ASCENDING_COMPARATOR ) ; return providers ; }
org . junit . Assert . assertTrue ( victim . find ( ) . isEmpty ( ) )
testSetGetConfigurations ( ) { org . apache . ambari . server . orm . entities . BlueprintEntity entity = new org . apache . ambari . server . orm . entities . BlueprintEntity ( ) ; java . util . Collection < org . apache . ambari . server . orm . entities . BlueprintConfigEntity > configurations = java . util . Collections . emptyList ( ) ; entity . setConfigurations ( configurations ) ; "<AssertPlaceHolder>" ; } getConfigurations ( ) { return configurations ; }
org . junit . Assert . assertSame ( configurations , entity . getConfigurations ( ) )
testJUnitHamcrestMatcherFailureWorks ( ) { try { "<AssertPlaceHolder>" ; } catch ( java . lang . NoSuchMethodError e ) { org . junit . Assert . fail ( ( ( "Class<sp>search<sp>path<sp>seems<sp>broken<sp>re<sp>new<sp>JUnit<sp>and<sp>old<sp>Hamcrest." + "<sp>Got<sp>NoSuchMethodError;<sp>e:<sp>" ) + e ) ) ; } catch ( java . lang . AssertionError e ) { org . apache . drill . jdbc . test . Drill2130JavaJdbcHamcrestConfigurationTest . logger . info ( "Class<sp>path<sp>seems<sp>fine<sp>re<sp>new<sp>JUnit<sp>vs.<sp>old<sp>Hamcrest.<sp>(Got<sp>AssertionError,<sp>not<sp>NoSuchMethodError.)" ) ; } }
org . junit . Assert . assertThat ( 1 , org . hamcrest . CoreMatchers . equalTo ( 2 ) )
testEqualsObject ( ) { org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlow obj = target ; boolean result = target . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
shouldReturnCustomMessage ( ) { parserConfiguredFor ( com . google . common . collect . Lists . newArrayList ( com . github . valdr . model . c . TestModelWithASingleAnnotatedMemberWithCustomMessageKey . class . getPackage ( ) . getName ( ) ) , emptyStringList ( ) ) ; java . lang . String json = parser . parse ( ) ; java . lang . String expected = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "{" + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>\"" ) + ( com . github . valdr . model . c . TestModelWithASingleAnnotatedMemberWithCustomMessageKey . class . getSimpleName ( ) ) ) + "\"<sp>:<sp>{" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>:<sp>\"0notNullString\"<sp>:<sp>{" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>:<sp>\"1required\"<sp>:<sp>{" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>\"message\"<sp>:<sp>\"paul\"" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>}" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>}" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "<sp>}" ) + ( com . github . valdr . ConstraintParserTest . LS ) ) + "}" ; "<AssertPlaceHolder>" ; } parse ( ) { java . util . Map < java . lang . String , com . github . valdr . ClassConstraints > classNameToValidationRulesMap = new java . util . HashMap ( ) ; for ( java . lang . Class clazz : classpathScanner . findClassesToParse ( ) ) { if ( clazz != null ) { com . github . valdr . ClassConstraints classValidationRules = new com . github . valdr . AnnotatedClass ( clazz , options . getExcludedFields ( ) , allRelevantAnnotationClasses ) . extractValidationRules ( ) ; if ( ( classValidationRules . size ( ) ) > 0 ) { java . lang . String name = ( options . getOutputFullTypeName ( ) ) ? clazz . getName ( ) : clazz . getSimpleName ( ) ; classNameToValidationRulesMap . put ( name , classValidationRules ) ; } } } return toJson ( classNameToValidationRulesMap ) ; }
org . junit . Assert . assertThat ( json , org . hamcrest . Matchers . is ( expected ) )
testCreateValue_null ( ) { "<AssertPlaceHolder>" ; } createValue ( java . lang . Object ) { if ( value instanceof com . google . api . ads . admanager . jaxws . v201805 . Value ) { return ( ( com . google . api . ads . admanager . jaxws . v201805 . Value ) ( value ) ) ; } else if ( value == null ) { return new com . google . api . ads . admanager . jaxws . v201805 . TextValue ( ) ; } else { if ( value instanceof java . lang . Boolean ) { com . google . api . ads . admanager . jaxws . v201805 . BooleanValue booleanValue = new com . google . api . ads . admanager . jaxws . v201805 . BooleanValue ( ) ; booleanValue . setValue ( ( ( java . lang . Boolean ) ( value ) ) ) ; return booleanValue ; } else if ( ( ( value instanceof java . lang . Double ) || ( value instanceof java . lang . Long ) ) || ( value instanceof java . lang . Integer ) ) { com . google . api . ads . admanager . jaxws . v201805 . NumberValue numberValue = new com . google . api . ads . admanager . jaxws . v201805 . NumberValue ( ) ; numberValue . setValue ( value . toString ( ) ) ; return numberValue ; } else if ( value instanceof java . lang . String ) { com . google . api . ads . admanager . jaxws . v201805 . TextValue textValue = new com . google . api . ads . admanager . jaxws . v201805 . TextValue ( ) ; textValue . setValue ( ( ( java . lang . String ) ( value ) ) ) ; return textValue ; } else if ( value instanceof com . google . api . ads . admanager . jaxws . v201805 . DateTime ) { com . google . api . ads . admanager . jaxws . v201805 . DateTimeValue dateTimeValue = new com . google . api . ads . admanager . jaxws . v201805 . DateTimeValue ( ) ; dateTimeValue . setValue ( ( ( com . google . api . ads . admanager . jaxws . v201805 . DateTime ) ( value ) ) ) ; return dateTimeValue ; } else if ( value instanceof com . google . api . ads . admanager . jaxws . v201805 . Date ) { com . google . api . ads . admanager . jaxws . v201805 . DateValue dateValue = new com . google . api . ads . admanager . jaxws . v201805 . DateValue ( ) ; dateValue . setValue ( ( ( com . google . api . ads . admanager . jaxws . v201805 . Date ) ( value ) ) ) ; return dateValue ; } else if ( value instanceof com . google . api . ads . admanager . jaxws . v201805 . Targeting ) { com . google . api . ads . admanager . jaxws . v201805 . TargetingValue targetingValue = new com . google . api . ads . admanager . jaxws . v201805 . TargetingValue ( ) ; targetingValue . setValue ( ( ( com . google . api . ads . admanager . jaxws . v201805 . Targeting ) ( value ) ) ) ; return targetingValue ; } else if ( value instanceof java . util . Set < ? > ) { com . google . api . ads . admanager . jaxws . v201805 . SetValue setValue = new com . google . api . ads . admanager . jaxws . v201805 . SetValue ( ) ; java . util . Set < com . google . api . ads . admanager . jaxws . v201805 . Value > values = new java . util . LinkedHashSet < com . google . api . ads . admanager . jaxws . v201805 . Value > ( ) ; for ( java . lang . Object entry : ( ( java . util . Set < ? > ) ( value ) ) ) { com . google . api . ads . admanager . jaxws . utils . v201805 . Pql . validateSetValueEntryForSet ( com . google . api . ads . admanager . jaxws . utils . v201805 . Pql . createValue ( entry ) , values ) ; values . add ( com . google . api . ads . admanager . jaxws . utils . v201805 . Pql . createValue ( entry ) ) ; } setValue . getValues ( ) . addAll ( values ) ; return setValue ; } else { throw new java . lang . IllegalArgumentException ( ( ( "Unsupported<sp>Value<sp>type<sp>[" + ( value . getClass ( ) ) ) + "]" ) ) ; } } }
org . junit . Assert . assertEquals ( null , ( ( com . google . api . ads . admanager . jaxws . v201805 . TextValue ) ( com . google . api . ads . admanager . jaxws . utils . v201805 . Pql . createValue ( null ) ) ) . getValue ( ) )
whenUpdateUserInUserStorageThatUserShouldChange ( ) { ru . szhernovoy . store . User andrew = new ru . szhernovoy . store . User ( ) ; ru . szhernovoy . store . User sergey = new ru . szhernovoy . store . User ( ) ; ru . szhernovoy . store . UserStore userStore = new ru . szhernovoy . store . UserStore ( 1 ) ; userStore . add ( andrew ) ; sergey . setId ( andrew . getId ( ) ) ; userStore . update ( sergey ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . lang . String text = null ; if ( this . cache . containsKey ( key ) ) { text = this . cache . get ( key ) . get ( ) ; if ( text == null ) { addValueInCache ( key ) ; } } else { addValueInCache ( key ) ; text = this . cache . get ( key ) . get ( ) ; } return text ; }
org . junit . Assert . assertThat ( sergey , org . hamcrest . core . Is . is ( userStore . get ( andrew . getId ( ) ) ) )
test ( ) { org . tests . model . basic . ResetBasicData . reset ( ) ; io . ebean . EbeanServer server = io . ebean . Ebean . getServer ( null ) ; io . ebean . Query < org . tests . model . basic . Customer > query = server . find ( org . tests . model . basic . Customer . class ) . setAutoTune ( false ) . fetch ( "contacts" , new io . ebean . FetchConfig ( ) . query ( 2 ) ) . where ( ) . gt ( "id" , 0 ) . orderBy ( "id" ) . setMaxRows ( 2 ) ; final java . util . concurrent . atomic . AtomicInteger counter = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; query . findEach ( ( customer ) -> { counter . incrementAndGet ( ) ; customer . getName ( ) ; } ) ; "<AssertPlaceHolder>" ; } get ( ) { return io . ebean . metric . MetricServiceProvider . metricFactory ; }
org . junit . Assert . assertEquals ( 2 , counter . get ( ) )
getRootConfigClassesTest ( ) { System . out . print ( "-><sp>getRootConfigClasses()<sp>-<sp>" ) ; ua . com . alexcoffee . config . AppInitializer appInitializer = new ua . com . alexcoffee . config . AppInitializer ( ) ; "<AssertPlaceHolder>" ; System . out . println ( "OK!" ) ; } getRootConfigClasses ( ) { return new java . lang . Class < ? > [ ] { ua . com . alexcoffee . config . RootConfig . class , ua . com . alexcoffee . config . DatabaseConfig . class , ua . com . alexcoffee . config . SecurityConfig . class } ; }
org . junit . Assert . assertNotNull ( appInitializer . getRootConfigClasses ( ) )
testBroadcastStrides ( ) { int [ ] mShape = new int [ ] { 2 , 3 } ; int [ ] shape = new int [ ] { 3 } ; org . eclipse . january . dataset . Dataset view = org . eclipse . january . dataset . DatasetFactory . zeros ( org . eclipse . january . dataset . ByteDataset . class , shape ) ; java . util . List < int [ ] > nShapes = org . eclipse . january . dataset . BroadcastUtils . broadcastShapesToMax ( mShape , shape ) ; view . setShape ( nShapes . get ( 0 ) ) ; int [ ] strides = org . eclipse . january . dataset . BroadcastUtils . createBroadcastStrides ( view , mShape ) ; "<AssertPlaceHolder>" ; } createBroadcastStrides ( org . eclipse . january . dataset . Dataset , int [ ] ) { return org . eclipse . january . dataset . BroadcastUtils . createBroadcastStrides ( a . getElementsPerItem ( ) , a . getShapeRef ( ) , a . getStrides ( ) , broadcastShape ) ; }
org . junit . Assert . assertArrayEquals ( new int [ ] { 0 , 1 } , strides )
testItemXMLContentWhitespace ( ) { java . lang . String activityResult = "\n" + ( ( "<sp><processid>2000</processid>\n" + "<sp><items>_subject|_parentsubject,$workflowsummary|_parentworkflowsummary</items>\n" ) + "<sp><activityid>100</activityid>" ) ; try { org . imixs . workflow . ItemCollection result = org . imixs . workflow . util . XMLParser . parseItemStructure ( activityResult ) ; java . lang . String s = result . getItemValueString ( "processid" ) ; "<AssertPlaceHolder>" ; } catch ( org . imixs . workflow . exceptions . PluginException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } } isEmpty ( ) { return itemCollection . getAllItems ( ) . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( s . isEmpty ( ) )
shouldApplyLabelTokenCommandToTheStore ( ) { final org . neo4j . kernel . impl . api . BatchTransactionApplier applier = newApplier ( false ) ; final org . neo4j . kernel . impl . store . record . LabelTokenRecord before = new org . neo4j . kernel . impl . store . record . LabelTokenRecord ( 42 ) ; final org . neo4j . kernel . impl . store . record . LabelTokenRecord after = new org . neo4j . kernel . impl . store . record . LabelTokenRecord ( 42 ) ; after . setInUse ( true ) ; after . setNameId ( 323 ) ; final org . neo4j . kernel . impl . transaction . command . Command command = new org . neo4j . kernel . impl . transaction . command . Command . LabelTokenCommand ( before , after ) ; boolean result = apply ( applier , command :: handle , transactionToApply ) ; "<AssertPlaceHolder>" ; verify ( labelTokenStore , times ( 1 ) ) . updateRecord ( after ) ; } apply ( org . neo4j . kernel . api . proc . Context , java . lang . Object [ ] , org . neo4j . kernel . api . ResourceTracker ) { try { java . lang . Thread . sleep ( 50 ) ; } catch ( java . lang . InterruptedException e ) { throw new org . neo4j . internal . kernel . api . exceptions . ProcedureException ( Status . General . UnknownError , e , "Interrupted" ) ; } return org . neo4j . collection . RawIterator . empty ( ) ; }
org . junit . Assert . assertFalse ( result )
shouldReturnResultsFromDelegate ( ) { when ( delegate . forName ( "a<sp>name" ) ) . thenReturn ( lookup ) ; "<AssertPlaceHolder>" ; } forName ( java . lang . String ) { try { return cacheHolder . get ( ) . get ( fqdn , new java . util . concurrent . Callable < org . xbill . DNS . Lookup > ( ) { @ com . spotify . dns . Override public org . xbill . DNS . Lookup call ( ) { return delegate . forName ( fqdn ) ; } } ) ; } catch ( java . util . concurrent . ExecutionException e ) { throw new com . spotify . dns . DnsException ( e ) ; } catch ( com . google . common . util . concurrent . UncheckedExecutionException e ) { throw new com . spotify . dns . DnsException ( e ) ; } }
org . junit . Assert . assertThat ( factory . forName ( "a<sp>name" ) , org . hamcrest . CoreMatchers . equalTo ( lookup ) )
testRandomFFWithBias ( ) { long seed = 123456789 ; com . github . neuralnetworks . tensor . Tensor seqResult = testRandomFFWithBias ( Runtime . CPU_SEQ , seed ) ; com . github . neuralnetworks . tensor . Tensor openclResult = testRandomFFWithBias ( Runtime . OPENCL , seed ) ; "<AssertPlaceHolder>" ; } isEqual ( com . github . neuralnetworks . tensor . Tensor , com . github . neuralnetworks . tensor . Tensor ) { if ( ( t1 == null ) || ( t2 == null ) ) return false ; if ( t1 . equals ( t2 ) ) return true ; if ( ( t1 . getDimensions ( ) . length ) != ( t2 . getDimensions ( ) . length ) ) return false ; for ( int d = 0 ; d < ( t1 . getDimensions ( ) . length ) ; d ++ ) { if ( ( t1 . getDimensions ( ) [ d ] ) != ( t2 . getDimensions ( ) [ d ] ) ) return false ; } com . github . neuralnetworks . tensor . Tensor . TensorIterator it1 = t1 . iterator ( ) ; com . github . neuralnetworks . tensor . Tensor . TensorIterator it2 = t2 . iterator ( ) ; while ( ( it1 . hasNext ( ) ) && ( it2 . hasNext ( ) ) ) { float v1 = t1 . getElements ( ) [ it1 . next ( ) ] ; float v2 = t2 . getElements ( ) [ it2 . next ( ) ] ; if ( ( java . lang . Math . abs ( ( v1 - v2 ) ) ) > 1.0E-6 ) return false ; } return true ; }
org . junit . Assert . assertTrue ( isEqual ( seqResult , openclResult ) )
runTest ( ) { boolean result = checkNoError ( "Social_Forums_Create_Forum" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
testUpdateCore_WithModeNotUpdateAllProperties ( ) { final java . lang . String VALUE = "value" ; com . thinkbiganalytics . nifi . rest . model . NifiProperty propertyToUpdate = new com . thinkbiganalytics . nifi . rest . model . NifiProperty ( ) ; propertyToUpdate . setValue ( null ) ; com . thinkbiganalytics . nifi . rest . model . NifiProperty property = new com . thinkbiganalytics . nifi . rest . model . NifiProperty ( ) ; property . setKey ( "key" ) ; property . setTemplateValue ( "templateValue" ) ; property . setValue ( VALUE ) ; property . setUserEditable ( true ) ; property . setSelected ( true ) ; property . setRenderType ( "text" ) ; property . setRequired ( true ) ; property . setPropertyDescriptor ( null ) ; property . setRenderOptions ( null ) ; com . thinkbiganalytics . nifi . rest . support . NifiPropertyUtil . PropertyUpdateMode propertyUpdateMode = NifiPropertyUtil . PropertyUpdateMode . FEED_DETAILS_MATCH_TEMPLATE ; NifiPropertyUtil . NiFiPropertyUpdater . updateCore ( propertyToUpdate , property , propertyUpdateMode ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( null , propertyToUpdate . getValue ( ) )
deveObterUriComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . assinatura . NFReference reference = new com . fincatto . documentofiscal . nfe310 . classes . nota . assinatura . NFReference ( ) ; final java . lang . String uri = "uri" ; reference . setUri ( uri ) ; "<AssertPlaceHolder>" ; } getUri ( ) { return this . uri ; }
org . junit . Assert . assertEquals ( uri , reference . getUri ( ) )
syncInvokeNormalAndGetMethodAndContentIsNotEmptyTest ( ) { com . aliyuncs . http . clients . HttpClientConfig config = mock ( com . aliyuncs . http . clients . HttpClientConfig . class ) ; when ( config . isIgnoreSSLCerts ( ) ) . thenReturn ( true ) ; com . aliyuncs . http . clients . CompatibleUrlConnClient client0 = new com . aliyuncs . http . clients . CompatibleUrlConnClient ( config ) ; com . aliyuncs . http . clients . CompatibleUrlConnClient client = org . powermock . api . mockito . PowerMockito . spy ( client0 ) ; com . aliyuncs . http . clients . HttpRequest request = mock ( com . aliyuncs . http . clients . HttpRequest . class ) ; when ( request . getSysMethod ( ) ) . thenReturn ( MethodType . GET ) ; when ( request . getHttpContent ( ) ) . thenReturn ( "http<sp>content" . getBytes ( ) ) ; java . net . HttpURLConnection connection = mock ( java . net . HttpURLConnection . class ) ; doNothing ( ) . when ( connection ) . connect ( ) ; org . powermock . api . mockito . PowerMockito . doReturn ( connection ) . when ( client , "buildHttpConnection" , request ) ; java . net . URL url = org . powermock . api . mockito . PowerMockito . mock ( java . net . URL . class ) ; when ( url . toString ( ) ) . thenReturn ( "http://www.aliyun.com" ) ; when ( connection . getURL ( ) ) . thenReturn ( url ) ; java . io . OutputStream outputStream = mock ( java . io . OutputStream . class ) ; doNothing ( ) . when ( outputStream ) . write ( "http<sp>content" . getBytes ( ) ) ; when ( connection . getOutputStream ( ) ) . thenReturn ( outputStream ) ; when ( connection . getInputStream ( ) ) . thenReturn ( mock ( java . io . InputStream . class ) ) ; org . powermock . api . mockito . PowerMockito . doNothing ( ) . when ( client , "parseHttpConn" , any ( com . aliyuncs . http . clients . HttpResponse . class ) , any ( java . net . HttpURLConnection . class ) , any ( java . io . InputStream . class ) ) ; com . aliyuncs . http . clients . HttpResponse response = client . syncInvoke ( request ) ; verifyPrivate ( client , times ( 1 ) ) . invoke ( "parseHttpConn" , any ( com . aliyuncs . http . clients . HttpResponse . class ) , any ( java . net . HttpURLConnection . class ) , any ( java . io . InputStream . class ) ) ; "<AssertPlaceHolder>" ; verify ( outputStream , times ( 0 ) ) . write ( "http<sp>content" . getBytes ( ) ) ; } getSysUrl ( ) { return url ; }
org . junit . Assert . assertEquals ( "http://www.aliyun.com" , response . getSysUrl ( ) )
testBrowseNoBrowseFlag ( ) { net . holmes . core . business . configuration . ConfigurationManager configurationManager = createMock ( net . holmes . core . business . configuration . ConfigurationManager . class ) ; net . holmes . core . business . media . MediaManager mediaManager = createMock ( net . holmes . core . business . media . MediaManager . class ) ; net . holmes . core . business . streaming . StreamingManager streamingManager = createMock ( net . holmes . core . business . streaming . StreamingManager . class ) ; org . fourthline . cling . model . profile . RemoteClientInfo remoteClientInfo = createMock ( org . fourthline . cling . model . profile . RemoteClientInfo . class ) ; net . holmes . core . service . upnp . directory . ContentDirectoryService contentDirectoryService = new net . holmes . core . service . upnp . directory . ContentDirectoryService ( ) ; contentDirectoryService . setConfigurationManager ( configurationManager ) ; contentDirectoryService . setMediaManager ( mediaManager ) ; contentDirectoryService . setStreamingManager ( streamingManager ) ; expect ( remoteClientInfo . getConnection ( ) ) . andReturn ( null ) ; expect ( mediaManager . getNode ( eq ( "0" ) ) ) . andReturn ( java . util . Optional . of ( new net . holmes . core . business . media . model . FolderNode ( "0" , "-1" , "root" ) ) ) ; replay ( mediaManager , streamingManager , remoteClientInfo , configurationManager ) ; org . fourthline . cling . support . model . BrowseResult result = contentDirectoryService . browse ( "0" , null , 0 , 100 , remoteClientInfo ) ; "<AssertPlaceHolder>" ; verify ( mediaManager , streamingManager , remoteClientInfo , configurationManager ) ; } browse ( java . lang . String , org . fourthline . cling . support . model . BrowseFlag , long , long , org . fourthline . cling . model . profile . RemoteClientInfo ) { net . holmes . core . business . media . model . MediaNode browseNode = mediaManager . getNode ( objectID ) . orElseThrow ( ( ) -> new < net . holmes . core . service . upnp . directory . NO_SUCH_OBJECT > org . fourthline . cling . support . contentdirectory . ContentDirectoryException ( objectID ) ) ; net . holmes . core . service . upnp . directory . List < java . lang . String > availableMimeTypes = getAvailableMimeType ( remoteClientInfo ) ; net . holmes . core . service . upnp . directory . DirectoryBrowseResult result ; if ( ( DIRECT_CHILDREN ) == browseFlag ) { result = new net . holmes . core . service . upnp . directory . DirectoryBrowseResult ( firstResult , maxResults ) ; net . holmes . core . service . upnp . directory . Collection < net . holmes . core . business . media . model . MediaNode > searchResult = mediaManager . searchChildNodes ( new net . holmes . core . business . media . MediaSearchRequest ( browseNode , availableMimeTypes ) ) ; for ( net . holmes . core . business . media . model . MediaNode childNode : searchResult ) { addNode ( objectID , childNode , result , availableMimeTypes ) ; } } else if ( ( METADATA ) == browseFlag ) { result = new net . holmes . core . service . upnp . directory . DirectoryBrowseResult ( 0 , 1 ) ; addNode ( browseNode . getParentId ( ) , browseNode , result , availableMimeTypes ) ; } else { result = new net . holmes . core . service . upnp . directory . DirectoryBrowseResult ( 0 , 1 ) ; } return result . buildBrowseResult ( new org . fourthline . cling . support . contentdirectory . DIDLParser ( ) ) ; }
org . junit . Assert . assertNotNull ( result )
testUpdateAttachmentUsage ( ) { org . eclipse . sw360 . datahandler . thrift . attachments . AttachmentUsage usage1 = new org . eclipse . sw360 . datahandler . thrift . attachments . AttachmentUsage ( ) ; usage1 . setOwner ( org . eclipse . sw360 . datahandler . thrift . Source . projectId ( "r1" ) ) ; usage1 . setUsedBy ( org . eclipse . sw360 . datahandler . thrift . Source . projectId ( "p1" ) ) ; usage1 . setAttachmentContentId ( "a1" ) ; handler . makeAttachmentUsage ( usage1 ) ; usage1 . setUsageData ( org . eclipse . sw360 . datahandler . thrift . attachments . UsageData . licenseInfo ( new org . eclipse . sw360 . datahandler . thrift . attachments . LicenseInfoUsage ( com . google . common . collect . Sets . newHashSet ( "l1" , "l2" ) ) ) ) ; handler . updateAttachmentUsage ( usage1 ) ; "<AssertPlaceHolder>" ; } getAttachmentUsage ( java . lang . String ) { assertNotNull ( id ) ; assertNotEmpty ( id ) ; org . eclipse . sw360 . datahandler . thrift . attachments . AttachmentUsage attachmentUsage = attachmentUsageRepository . get ( id ) ; assertNotNull ( attachmentUsage ) ; return attachmentUsage ; }
org . junit . Assert . assertThat ( handler . getAttachmentUsage ( usage1 . getId ( ) ) , org . hamcrest . Matchers . is ( usage1 ) )
testRecursiveReadFeatureMaxDepth ( ) { org . jboss . dmr . ModelNode op = org . wildfly . core . test . standalone . mgmt . api . ReadFeatureDescriptionTestCase . createOp ( ) ; op . get ( org . wildfly . core . test . standalone . mgmt . api . RECURSIVE_DEPTH ) . set ( 1 ) ; org . jboss . dmr . ModelNode result = executeForResult ( op ) ; int maxDepth = org . wildfly . core . test . standalone . mgmt . api . ReadFeatureDescriptionTestCase . validateBaseFeature ( result , 1 ) ; "<AssertPlaceHolder>" ; } toString ( ) { return xmlFile . getAbsolutePath ( ) ; }
org . junit . Assert . assertEquals ( result . toString ( ) , 1 , maxDepth )
testReverseShortArray ( ) { short [ ] array = new short [ ] { 111 , 222 , 333 } ; com . liferay . portal . kernel . util . ArrayUtil . reverse ( array ) ; "<AssertPlaceHolder>" ; } reverse ( boolean [ ] ) { com . liferay . portal . kernel . util . ArrayUtil . reverse ( array ) ; }
org . junit . Assert . assertArrayEquals ( new short [ ] { 333 , 222 , 111 } , array )
shouldFindUserByNameUsingSpElWithIndexColon ( ) { executeUpdate ( "CREATE<sp>(m:User<sp>{name:'Michal'})" ) ; transactionTemplate . execute ( new org . springframework . transaction . support . TransactionCallbackWithoutResult ( ) { @ org . springframework . data . neo4j . queries . Override public void doInTransactionWithoutResult ( org . springframework . transaction . TransactionStatus status ) { org . springframework . data . neo4j . examples . movies . domain . User user = userRepository . findUserByNameUsingSpElWithIndexColon ( "Michal" ) ; "<AssertPlaceHolder>" ; } } ) ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "Michal" , user . getName ( ) )
resolveEntityReturnsNullWhenRepositoryDoesNotHaveEntity ( ) { "<AssertPlaceHolder>" ; verify ( this . familyResolver , never ( ) ) . get ( anyString ( ) ) ; verify ( this . securePatientResolver , times ( 1 ) ) . get ( org . phenotips . entities . internal . SecurePrimaryEntityResolverTest . PATIENT_2_ID ) ; } resolveEntity ( java . lang . String ) { if ( org . apache . commons . lang3 . StringUtils . isBlank ( entityId ) ) { return null ; } final org . xwiki . model . reference . DocumentReference entityDoc = this . referenceParser . resolve ( entityId ) ; if ( entityDoc == null ) { return null ; } final java . lang . String prefix = entityDoc . getName ( ) . replaceAll ( "^(\\D+)\\d+$" , "$1" ) ; if ( ( org . apache . commons . lang3 . StringUtils . isBlank ( prefix ) ) || ( prefix . equals ( entityId ) ) ) { return null ; } final java . util . List < org . phenotips . entities . PrimaryEntityManager > managers = getAvailableManagers ( ) ; return managers . isEmpty ( ) ? null : performSearch ( managers , prefix , entityId ) ; }
org . junit . Assert . assertNull ( this . component . resolveEntity ( org . phenotips . entities . internal . SecurePrimaryEntityResolverTest . PATIENT_2_ID ) )
testBuildWithParametersAndDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "Diablo" ; java . lang . String name = "fdsfds" ; org . lnu . is . domain . reason . Reason context = new org . lnu . is . domain . reason . Reason ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>Reason<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . reason . Reason > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testMergeVoorkomens ( ) { createConversieBericht ( ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Lo3Bericht ontvangenBericht = createLoggingBericht ( ) ; "<AssertPlaceHolder>" ; ontvangenBericht . mergeVoorkomensUitAnderBericht ( persoon . getLo3Berichten ( ) . iterator ( ) . next ( ) ) ; verifieerUitkomstVanMerge ( ) ; } getLo3Berichten ( ) { return lo3Berichten ; }
org . junit . Assert . assertEquals ( 1 , persoon . getLo3Berichten ( ) . size ( ) )
testSimpleRnn ( ) { int nOut = 5 ; double [ ] l1s = new double [ ] { 0.0 , 0.4 } ; double [ ] l2s = new double [ ] { 0.0 , 0.6 } ; java . util . Random r = new java . util . Random ( 12345 ) ; for ( int mb : new int [ ] { 1 , 3 } ) { for ( int tsLength : new int [ ] { 1 , 4 } ) { for ( int nIn : new int [ ] { 3 , 1 } ) { for ( int layerSize : new int [ ] { 4 , 1 } ) { for ( boolean inputMask : new boolean [ ] { false , true } ) { for ( boolean hasLayerNorm : new boolean [ ] { true , false } ) { for ( int l = 0 ; l < ( l1s . length ) ; l ++ ) { org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { mb , nIn , tsLength } ) ; org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory . Nd4j . create ( mb , nOut , tsLength ) ; for ( int i = 0 ; i < mb ; i ++ ) { for ( int j = 0 ; j < tsLength ; j ++ ) { labels . putScalar ( i , r . nextInt ( nOut ) , j , 1.0 ) ; } } java . lang . String maskType = ( inputMask ) ? "inputMask" : "none" ; org . nd4j . linalg . api . ndarray . INDArray inMask = null ; if ( inputMask ) { inMask = org . nd4j . linalg . factory . Nd4j . ones ( mb , tsLength ) ; for ( int i = 0 ; i < mb ; i ++ ) { int firstMaskedStep = ( tsLength - 1 ) - i ; if ( firstMaskedStep == 0 ) { firstMaskedStep = tsLength ; } for ( int j = firstMaskedStep ; j < tsLength ; j ++ ) { inMask . putScalar ( i , j , 0.0 ) ; } } } java . lang . String name = ( ( ( ( ( ( ( ( ( ( "testSimpleRnn()<sp>-<sp>mb=" + mb ) + ",<sp>tsLength<sp>=<sp>" ) + tsLength ) + ",<sp>maskType=" ) + maskType ) + ",<sp>l1=" ) + ( l1s [ l ] ) ) + ",<sp>l2=" ) + ( l2s [ l ] ) ) + ",<sp>hasLayerNorm=" ) + hasLayerNorm ; System . out . println ( ( "Starting<sp>test:<sp>" + name ) ) ; org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . weightInit ( WeightInit . XAVIER ) . activation ( Activation . TANH ) . l1 ( l1s [ l ] ) . l2 ( l2s [ l ] ) . list ( ) . layer ( new org . deeplearning4j . nn . conf . layers . recurrent . SimpleRnn . Builder ( ) . nIn ( nIn ) . nOut ( layerSize ) . hasLayerNorm ( hasLayerNorm ) . build ( ) ) . layer ( new org . deeplearning4j . nn . conf . layers . recurrent . SimpleRnn . Builder ( ) . nIn ( layerSize ) . nOut ( layerSize ) . hasLayerNorm ( hasLayerNorm ) . build ( ) ) . layer ( new org . deeplearning4j . nn . conf . layers . RnnOutputLayer . Builder ( ) . nIn ( layerSize ) . nOut ( nOut ) . activation ( Activation . SOFTMAX ) . lossFunction ( LossFunctions . LossFunction . MCXENT ) . build ( ) ) . build ( ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork net = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf ) ; net . init ( ) ; boolean gradOK = org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( net , org . deeplearning4j . gradientcheck . RnnGradientChecks . DEFAULT_EPS , org . deeplearning4j . gradientcheck . RnnGradientChecks . DEFAULT_MAX_REL_ERROR , org . deeplearning4j . gradientcheck . RnnGradientChecks . DEFAULT_MIN_ABS_ERROR , org . deeplearning4j . gradientcheck . RnnGradientChecks . PRINT_RESULTS , org . deeplearning4j . gradientcheck . RnnGradientChecks . RETURN_ON_FIRST_FAILURE , in , labels , inMask , null ) ; "<AssertPlaceHolder>" ; org . deeplearning4j . TestUtils . testModelSerialization ( net ) ; } } } } } } } } checkGradients ( org . deeplearning4j . nn . multilayer . MultiLayerNetwork , double , double , double , boolean , boolean , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { return org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , epsilon , maxRelError , minAbsoluteError , print , exitOnFirstError , input , labels , inputMask , labelMask , false , ( - 1 ) ) ; }
org . junit . Assert . assertTrue ( gradOK )
getValueAsString_shouldReturnLocalizedCodedConcept ( ) { org . openmrs . ConceptDatatype cdt = new org . openmrs . ConceptDatatype ( ) ; cdt . setHl7Abbreviation ( "CWE" ) ; org . openmrs . Concept cn = new org . openmrs . Concept ( ) ; cn . setDatatype ( cdt ) ; cn . addName ( new org . openmrs . ConceptName ( org . openmrs . ObsTest . VERO , java . util . Locale . ITALIAN ) ) ; org . openmrs . Obs obs = new org . openmrs . Obs ( ) ; obs . setValueCoded ( cn ) ; obs . setConcept ( cn ) ; obs . setValueCodedName ( new org . openmrs . ConceptName ( "True" , java . util . Locale . US ) ) ; "<AssertPlaceHolder>" ; } getValueAsString ( java . util . Locale ) { java . text . NumberFormat nf = java . text . NumberFormat . getNumberInstance ( locale ) ; java . text . DecimalFormat df = ( ( java . text . DecimalFormat ) ( nf ) ) ; df . applyPattern ( "SN" 2 ) ; if ( ( getConcept ( ) ) != null ) { java . lang . String abbrev = getConcept ( ) . getDatatype ( ) . getHl7Abbreviation ( ) ; if ( "BIT" . equals ( abbrev ) ) { return ( getValueAsBoolean ( ) ) == null ? "SN" 0 : getValueAsBoolean ( ) . toString ( ) ; } else if ( "CWE" . equals ( abbrev ) ) { if ( ( getValueCoded ( ) ) == null ) { return "SN" 0 ; } if ( ( getValueDrug ( ) ) != null ) { return getValueDrug ( ) . getFullName ( locale ) ; } else { org . openmrs . ConceptName codedName = getValueCodedName ( ) ; if ( codedName != null ) { return getValueCoded ( ) . getName ( locale , false ) . getName ( ) ; } else { org . openmrs . ConceptName fallbackName = getValueCoded ( ) . getName ( ) ; if ( fallbackName != null ) { return fallbackName . getName ( ) ; } else { return "SN" 0 ; } } } } else if ( ( "NM" . equals ( abbrev ) ) || ( "SN" . equals ( abbrev ) ) ) { if ( ( getValueNumeric ( ) ) == null ) { return "SN" 0 ; } else { if ( ( getConcept ( ) ) instanceof org . openmrs . ConceptNumeric ) { org . openmrs . ConceptNumeric cn = ( ( org . openmrs . ConceptNumeric ) ( getConcept ( ) ) ) ; if ( ! ( cn . getAllowDecimal ( ) ) ) { double d = getValueNumeric ( ) ; int i = ( ( int ) ( d ) ) ; return java . lang . Integer . toString ( i ) ; } else { df . format ( getValueNumeric ( ) ) ; } } } } else if ( "SN" 1.e quals ( abbrev ) ) { java . text . DateFormat dateFormat = new java . text . SimpleDateFormat ( org . openmrs . Obs . DATE_PATTERN ) ; return ( getValueDatetime ( ) ) == null ? "SN" 0 : dateFormat . format ( getValueDatetime ( ) ) ; } else if ( "TM" . equals ( abbrev ) ) { return ( getValueDatetime ( ) ) == null ? "SN" 0 : org . openmrs . util . Format . format ( getValueDatetime ( ) , locale , FORMAT_TYPE . TIME ) ; } else if ( "TS" . equals ( abbrev ) ) { return ( getValueDatetime ( ) ) == null ? "SN" 0 : org . openmrs . util . Format . format ( getValueDatetime ( ) , locale , FORMAT_TYPE . TIMESTAMP ) ; } else if ( "ST" . equals ( abbrev ) ) { return getValueText ( ) ; } else if ( ( "ED" . equals ( abbrev ) ) && ( ( getValueComplex ( ) ) != null ) ) { java . lang . String [ ] valuesComplex = getValueComplex ( ) . split ( "\\|" ) ; for ( java . lang . String value : valuesComplex ) { if ( org . apache . commons . lang3 . StringUtils . isNotEmpty ( value ) ) { return value . trim ( ) ; } } } } if ( ( getValueNumeric ( ) ) != null ) { return df . format ( getValueNumeric ( ) ) ; } else if ( ( getValueCoded ( ) ) != null ) { if ( ( getValueDrug ( ) ) != null ) { return getValueDrug ( ) . getFullName ( locale ) ; } else { org . openmrs . ConceptName valudeCodedName = getValueCodedName ( ) ; if ( valudeCodedName != null ) { return valudeCodedName . getName ( ) ; } else { return "SN" 0 ; } } } else if ( ( getValueDatetime ( ) ) != null ) { return org . openmrs . util . Format . format ( getValueDatetime ( ) , locale , FORMAT_TYPE . DATE ) ; } else if ( ( getValueText ( ) ) != null ) { return getValueText ( ) ; } else if ( hasGroupMembers ( ) ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( org . openmrs . Obs groupMember : getGroupMembers ( ) ) { if ( ( sb . length ( ) ) > 0 ) { sb . append ( ",<sp>" ) ; } sb . append ( groupMember . getValueAsString ( locale ) ) ; } return sb . toString ( ) ; } if ( ( getValueComplex ( ) ) != null ) { java . lang
org . junit . Assert . assertEquals ( org . openmrs . ObsTest . VERO , obs . getValueAsString ( Locale . ITALIAN ) )
testPortCreationInTestingConsumer ( ) { checkPortsCreator ( new eu . dnetlib . iis . common . java . jsonworkflownodes . PortsCreator ( ) { @ eu . dnetlib . iis . common . java . jsonworkflownodes . Override public java . util . Map < java . lang . String , eu . dnetlib . iis . common . java . porttype . PortType > getPorts ( java . lang . String [ ] specificationStrings ) { eu . dnetlib . iis . common . java . jsonworkflownodes . TestingConsumer consumer = new eu . dnetlib . iis . common . java . jsonworkflownodes . TestingConsumer ( specificationStrings ) ; "<AssertPlaceHolder>" ; return consumer . getInputPorts ( ) ; } } ) ; } getOutputPorts ( ) { return outputPorts ; }
org . junit . Assert . assertEquals ( 0 , consumer . getOutputPorts ( ) . size ( ) )
testHostWithoutPath ( ) { java . lang . String host = "http://www.google.com:8080" ; org . r10r . doctester . testbrowser . Url url = org . r10r . doctester . testbrowser . Url . host ( host ) ; "<AssertPlaceHolder>" ; } toString ( ) { return uri ( ) . toString ( ) ; }
org . junit . Assert . assertThat ( url . toString ( ) , org . hamcrest . CoreMatchers . equalTo ( "http://www.google.com:8080" ) )
testShouldTransform_does_filter_correctly_a_mimic_annotation ( ) { addMimicAnnotation ( dst , src . getName ( ) , true , true , true , true ) ; boolean filter = mimicProcessor . shouldTransform ( dst ) ; "<AssertPlaceHolder>" ; } shouldTransform ( javassist . CtClass ) { if ( ( ( candidateClass . getDeclaringClass ( ) ) != null ) && ( ( ( candidateClass . getModifiers ( ) ) & ( java . lang . reflect . Modifier . STATIC ) ) == 0 ) ) { return false ; } return candidateClass . hasAnnotation ( com . github . stephanenicolas . mimic . annotations . Mimic . class ) ; }
org . junit . Assert . assertTrue ( filter )
testCreateWithoutType ( ) { java . net . URI datasetUri = new org . kitesdk . data . URIBuilder ( repoUri , "ns" , "test" ) . build ( ) ; org . kitesdk . data . DatasetDescriptor descriptor = new org . kitesdk . data . DatasetDescriptor . Builder ( ) . schemaLiteral ( "\"string\"" ) . build ( ) ; org . kitesdk . data . Dataset < org . apache . avro . generic . GenericRecord > expected = mock ( org . kitesdk . data . Dataset . class ) ; when ( repo . create ( "ns" , "test" , descriptor , org . apache . avro . generic . GenericRecord . class ) ) . thenReturn ( expected ) ; org . kitesdk . data . Dataset < org . apache . avro . generic . GenericRecord > ds = org . kitesdk . data . Datasets . create ( datasetUri , descriptor ) ; verify ( repo ) . create ( "ns" , "test" , descriptor , org . apache . avro . generic . GenericRecord . class ) ; verifyNoMoreInteractions ( repo ) ; verifyNoMoreInteractions ( expected ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , java . lang . String , org . kitesdk . data . DatasetDescriptor , java . lang . Class ) { return null ; }
org . junit . Assert . assertEquals ( expected , ds )
coordsEtOH ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder bldr = org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) ; org . openscience . cdk . smiles . SmilesParser smipar = new org . openscience . cdk . smiles . SmilesParser ( bldr ) ; org . openscience . cdk . interfaces . IAtomContainer mol = smipar . parseSmiles ( "CCO<sp>|(,,;1,1,;2,2,)|" ) ; org . openscience . cdk . smiles . SmilesGenerator smigen = new org . openscience . cdk . smiles . SmilesGenerator ( SmiFlavor . CxCoordinates ) ; java . lang . String smi = smigen . create ( mol ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String ) { return new org . openscience . cdk . smarts . SmartsPattern ( smarts , null ) ; }
org . junit . Assert . assertThat ( smi , org . hamcrest . CoreMatchers . is ( "CCO<sp>|(,,;1,1,;2,2,)|" ) )
testCreateWithId ( ) { eu . trentorise . opendata . jackan . test . ckan . CkanDataset dataset = createRandomDataset ( ) ; eu . trentorise . opendata . jackan . test . ckan . CkanResourceBase resource = new eu . trentorise . opendata . jackan . test . ckan . CkanResourceBase ( JACKAN_URL , dataset . getId ( ) ) ; resource . setId ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; eu . trentorise . opendata . jackan . test . ckan . CkanResource retRes = client . createResource ( resource ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( resource . getId ( ) , retRes . getId ( ) )
testResultSummaryWriter ( ) { java . lang . String output = captureOutput ( this :: writeTestOutput ) ; "<AssertPlaceHolder>" ; } captureOutput ( java . util . function . Consumer ) { java . io . ByteArrayOutputStream byteArrayOutputStream = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintWriter printWriter = null ; try { printWriter = new java . io . PrintWriter ( byteArrayOutputStream ) ; java . util . function . Consumer < java . lang . String > println = printWriter :: println ; writeOutputMethod . accept ( println ) ; printWriter . flush ( ) ; } finally { if ( printWriter != null ) { printWriter . close ( ) ; } } return byteArrayOutputStream . toString ( ) . replaceAll ( "\r\n" , "\n" ) ; }
org . junit . Assert . assertEquals ( expected , output )
testVectorCastDoubleToLong ( ) { org . apache . hadoop . hive . ql . exec . vector . VectorizedRowBatch b = org . apache . hadoop . hive . ql . exec . vector . expressions . TestVectorMathFunctions . getVectorizedRowBatchDoubleInLongOut ( ) ; org . apache . hadoop . hive . ql . exec . vector . LongColumnVector resultV = ( ( org . apache . hadoop . hive . ql . exec . vector . LongColumnVector ) ( b . cols [ 1 ] ) ) ; b . cols [ 0 ] . noNulls = true ; org . apache . hadoop . hive . ql . exec . vector . expressions . VectorExpression expr = new org . apache . hadoop . hive . ql . exec . vector . expressions . CastDoubleToLong ( 0 , 1 ) ; expr . evaluate ( b ) ; "<AssertPlaceHolder>" ; } evaluate ( org . apache . hadoop . hive . ql . exec . vector . VectorizedRowBatch ) { if ( ( childExpressions ) != null ) { this . evaluateChildren ( batch ) ; } }
org . junit . Assert . assertEquals ( 1 , resultV . vector [ 6 ] )
testGetSetObjectGroupId ( ) { fr . gouv . vitam . storage . engine . common . model . response . StoredInfoResultTest . storedInfoResult . setObjectGroupId ( "id" ) ; "<AssertPlaceHolder>" ; } getObjectGroupId ( ) { return objectGroupId ; }
org . junit . Assert . assertEquals ( "id" , fr . gouv . vitam . storage . engine . common . model . response . StoredInfoResultTest . storedInfoResult . getObjectGroupId ( ) )
testToString ( ) { java . lang . String expected = org . apache . commons . io . IOUtils . toString ( new java . io . FileInputStream ( "src/test/resources/Real1_expected_toString.txt" ) , StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } getToStringOnRootElementWrapper ( ) { sortpom . parameter . PluginParameters pluginParameters = sortpom . parameter . PluginParameters . builder ( ) . setPomFile ( null ) . setFileOutput ( false , ".bak" , null ) . setEncoding ( "UTF-8" ) . setFormatting ( "\r\n" , true , true ) . setIndent ( 2 , false ) . setSortOrder ( "default_0_4_0.xml" , null ) . setSortEntities ( "scope,groupId,artifactId" , "groupId,artifactId" , true , true ) . build ( ) ; sortpom . util . FileUtil fileUtil = new sortpom . util . FileUtil ( ) ; fileUtil . setup ( pluginParameters ) ; java . lang . String xml = org . apache . commons . io . IOUtils . toString ( new java . io . FileInputStream ( ( "src/test/resources/" + "Real1_input.xml" ) ) , StandardCharsets . UTF_8 ) ; org . jdom . input . SAXBuilder parser = new org . jdom . input . SAXBuilder ( ) ; org . jdom . Document document = parser . build ( new java . io . ByteArrayInputStream ( xml . getBytes ( StandardCharsets . UTF_8 ) ) ) ; sortpom . wrapper . WrapperFactoryImpl wrapperFactory = new sortpom . wrapper . WrapperFactoryImpl ( fileUtil ) ; wrapperFactory . setup ( pluginParameters ) ; sortpom . wrapper . operation . HierarchyRootWrapper rootWrapper = wrapperFactory . createFromRootElement ( document . getRootElement ( ) ) ; rootWrapper . createWrappedStructure ( wrapperFactory ) ; return rootWrapper . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , getToStringOnRootElementWrapper ( ) )
noArgReturnsSpecifiedImplIfPropertySpecified ( ) { java . lang . System . setProperty ( "log4j2.ContextData" , org . apache . logging . log4j . core . impl . FactoryTestStringMap . class . getName ( ) ) ; "<AssertPlaceHolder>" ; java . lang . System . clearProperty ( "log4j2.ContextData" ) ; } createContextData ( ) { if ( ( org . apache . logging . log4j . core . impl . ContextDataFactory . DEFAULT_CONSTRUCTOR ) == null ) { return new org . apache . logging . log4j . util . SortedArrayStringMap ( ) ; } try { return ( ( org . apache . logging . log4j . util . IndexedStringMap ) ( org . apache . logging . log4j . core . impl . ContextDataFactory . DEFAULT_CONSTRUCTOR . invoke ( ) ) ) ; } catch ( final java . lang . Throwable ignored ) { return new org . apache . logging . log4j . util . SortedArrayStringMap ( ) ; } }
org . junit . Assert . assertTrue ( ( ( org . apache . logging . log4j . core . impl . ContextDataFactory . createContextData ( ) ) instanceof org . apache . logging . log4j . core . impl . FactoryTestStringMap ) )
testCreateSpace ( ) { org . apache . stanbol . ontologymanager . servicesapi . scope . OntologySpace space = org . apache . stanbol . ontologymanager . multiplexer . clerezza . scope . TestOntologySpaces . factory . createCustomOntologySpace ( "testCreateSpace" , org . apache . stanbol . ontologymanager . multiplexer . clerezza . scope . TestOntologySpaces . dropSrc ) ; org . semanticweb . owlapi . model . IRI logicalId = org . apache . stanbol . ontologymanager . multiplexer . clerezza . scope . TestOntologySpaces . dropSrc . getRootOntology ( ) . getOntologyID ( ) . getOntologyIRI ( ) ; "<AssertPlaceHolder>" ; } hasOntology ( org . semanticweb . owlapi . model . OWLOntologyID ) { org . apache . stanbol . ontologymanager . multiplexer . clerezza . ontology . Status stat = getStatus ( id ) ; if ( stat == ( Status . ORPHAN ) ) throw new org . apache . stanbol . ontologymanager . servicesapi . ontology . OrphanOntologyKeyException ( id ) ; return ( getStatus ( id ) ) == ( Status . MATCH ) ; }
org . junit . Assert . assertTrue ( space . hasOntology ( logicalId ) )
testChildUpdatableColumnNames ( ) { try { java . lang . String [ ] columnNames = getUpdatableColumnNames ( childClass ) ; java . util . List < java . lang . String > actualColumnNames = java . util . Arrays . asList ( columnNames ) ; java . util . Collections . sort ( actualColumnNames ) ; java . util . List < java . lang . String > expectedColumnNames = getExpectedColumnNamesOfChild ( ) ; java . util . Collections . sort ( expectedColumnNames ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ) ; } } getExpectedColumnNamesOfChild ( ) { java . util . List < java . lang . String > expectedNames = new java . util . ArrayList ( ) ; expectedNames . addAll ( getExpectedColumnNamesOfParent ( ) ) ; expectedNames . add ( "childId" ) ; expectedNames . add ( "childName" ) ; return expectedNames ; }
org . junit . Assert . assertEquals ( actualColumnNames , expectedColumnNames )
testVersionableRoundTrip ( ) { org . sagebionetworks . repo . model . FileEntity code = new org . sagebionetworks . repo . model . FileEntity ( ) ; code . setVersionComment ( "version<sp>comment" ) ; code . setVersionNumber ( new java . lang . Long ( 134 ) ) ; code . setVersionLabel ( "1.133.0" ) ; code . setName ( "mame" ) ; org . sagebionetworks . repo . model . FileEntity clone = org . sagebionetworks . repo . manager . NodeTranslationUtilsTest . cloneUsingNodeTranslation ( code ) ; "<AssertPlaceHolder>" ; } cloneUsingNodeTranslation ( T extends org . sagebionetworks . repo . model . Entity ) { org . sagebionetworks . repo . model . Node dsNode = org . sagebionetworks . repo . manager . NodeTranslationUtils . createFromEntity ( toClone ) ; org . sagebionetworks . repo . model . Annotations annos = new org . sagebionetworks . repo . model . Annotations ( ) ; org . sagebionetworks . repo . manager . NodeTranslationUtils . updateNodeSecondaryFieldsFromObject ( toClone , annos ) ; @ org . sagebionetworks . repo . manager . SuppressWarnings ( "unchecked" ) T clone = ( ( T ) ( toClone . getClass ( ) . newInstance ( ) ) ) ; org . sagebionetworks . repo . manager . NodeTranslationUtils . updateObjectFromNodeSecondaryFields ( clone , annos ) ; org . sagebionetworks . repo . manager . NodeTranslationUtils . updateObjectFromNode ( clone , dsNode ) ; return clone ; }
org . junit . Assert . assertEquals ( code , clone )
persistInDefaultGraphQuerySubGraphTest ( ) { com . github . anno4j . model . Annotation annotation = anno4j . createObject ( com . github . anno4j . model . Annotation . class ) ; com . github . anno4j . querying . GraphContextQueryTest . TestBody body = anno4j . createObject ( com . github . anno4j . querying . GraphContextQueryTest . TestBody . class ) ; body . setValue ( "Example<sp>Value" ) ; annotation . addBody ( body ) ; com . github . anno4j . querying . QueryService queryService = anno4j . createQueryService ( subgraph ) ; java . util . List < com . github . anno4j . model . Annotation > defaultList = queryService . addPrefix ( "ex" , "http://www.example.com/schema#" ) . addCriteria ( "oa:hasBody/ex:value" , "Example<sp>Value" ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { try { if ( ( _size ) < 0 ) { synchronized ( this ) { if ( ( _size ) < 0 ) { int index = findSize ( ) ; _size = index ; } } } return _size ; } catch ( org . openrdf . repository . RepositoryException e ) { throw new org . openrdf . repository . object . exceptions . ObjectStoreException ( e ) ; } }
org . junit . Assert . assertEquals ( 0 , defaultList . size ( ) )
GIVEN_an_IterationParameter_for_batch_size_exists_in_a_given_iteration_WHEN_a_value_is_set_in_the_table_for_batch_size_for_that_iteration_AND_the_WorkflowModel_is_asked_for_simulator_configuration_THEN_the_corresponding_IterationParameter_has_only_the_new_value ( ) { int expectedBatchSize = 10 ; int firstBatchSizeValue = 5 ; com . bigvisible . kanbansimulator . app . WorkflowModel workflowModel = new com . bigvisible . kanbansimulator . app . WorkflowModel ( ) ; workflowModel . addIteration ( ) ; workflowModel . getIterationParameterTableModel ( ) . setValueAt ( firstBatchSizeValue , 0 , 1 ) ; workflowModel . getIterationParameterTableModel ( ) . setValueAt ( expectedBatchSize , 0 , 1 ) ; com . bigvisible . kanbansimulator . IterationParameter iterationParameter = workflowModel . getIterationParameters ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getBatchSize ( ) { return batchSize ; }
org . junit . Assert . assertThat ( iterationParameter . getBatchSize ( ) , is ( expectedBatchSize ) )
execute ( ) { org . apache . maven . project . MavenProject mavenProject = new org . apache . maven . project . MavenProject ( ) ; mavenProject . getBuild ( ) . setOutputDirectory ( "target/classes" ) ; com . querydsl . maven . JPAExporterMojo mojo = new com . querydsl . maven . JPAExporterMojo ( ) ; mojo . setTargetFolder ( new java . io . File ( "target/generated-test-data2" ) ) ; mojo . setPackages ( new java . lang . String [ ] { "com.querydsl.maven" } ) ; mojo . setProject ( mavenProject ) ; mojo . execute ( ) ; java . io . File file = new java . io . File ( "target/generated-test-data2/com/querydsl/maven/QEntity.java" ) ; "<AssertPlaceHolder>" ; } exists ( ) { org . junit . Assert . assertTrue ( ( ( query ( ) . where ( user . emailAddress . eq ( "bob@example.com" ) ) . fetchCount ( ) ) > 0 ) ) ; org . junit . Assert . assertFalse ( ( ( query ( ) . where ( user . emailAddress . eq ( "bobby@example.com" ) ) . fetchCount ( ) ) > 0 ) ) ; }
org . junit . Assert . assertTrue ( file . exists ( ) )
test41setUserRolesByName ( ) { destroySession ( ) ; setup ( ) ; org . apache . ranger . db . XXPortalUserRoleDao xPortalUserRoleDao = org . mockito . Mockito . mock ( org . apache . ranger . db . XXPortalUserRoleDao . class ) ; org . apache . ranger . view . VXPortalUser userProfile = userProfile ( ) ; java . util . List < org . apache . ranger . view . VXString > vStringRolesList = new java . util . ArrayList < org . apache . ranger . view . VXString > ( ) ; org . apache . ranger . view . VXString vXStringObj = new org . apache . ranger . view . VXString ( ) ; vXStringObj . setValue ( "ROLE_USER" ) ; vStringRolesList . add ( vXStringObj ) ; java . util . List < org . apache . ranger . entity . XXPortalUserRole > xPortalUserRoleList = new java . util . ArrayList < org . apache . ranger . entity . XXPortalUserRole > ( ) ; org . apache . ranger . entity . XXPortalUserRole XXPortalUserRole = new org . apache . ranger . entity . XXPortalUserRole ( ) ; XXPortalUserRole . setId ( org . apache . ranger . biz . TestXUserMgr . userId ) ; XXPortalUserRole . setUserId ( org . apache . ranger . biz . TestXUserMgr . userId ) ; XXPortalUserRole . setUserRole ( "ROLE_USER" ) ; xPortalUserRoleList . add ( XXPortalUserRole ) ; java . util . List < org . apache . ranger . entity . XXUserPermission > xUserPermissionsList = new java . util . ArrayList < org . apache . ranger . entity . XXUserPermission > ( ) ; org . apache . ranger . entity . XXUserPermission xUserPermissionObj = xxUserPermission ( ) ; xUserPermissionsList . add ( xUserPermissionObj ) ; java . util . List < org . apache . ranger . entity . XXGroupPermission > xGroupPermissionList = new java . util . ArrayList < org . apache . ranger . entity . XXGroupPermission > ( ) ; org . apache . ranger . entity . XXGroupPermission xGroupPermissionObj = xxGroupPermission ( ) ; xGroupPermissionList . add ( xGroupPermissionObj ) ; java . util . List < org . apache . ranger . view . VXGroupPermission > groupPermList = new java . util . ArrayList < org . apache . ranger . view . VXGroupPermission > ( ) ; org . apache . ranger . view . VXGroupPermission groupPermission = vxGroupPermission ( ) ; groupPermList . add ( groupPermission ) ; org . mockito . Mockito . when ( daoManager . getXXPortalUserRole ( ) ) . thenReturn ( xPortalUserRoleDao ) ; org . mockito . Mockito . when ( xPortalUserRoleDao . findByUserId ( org . apache . ranger . biz . TestXUserMgr . userId ) ) . thenReturn ( xPortalUserRoleList ) ; org . mockito . Mockito . when ( userMgr . getUserProfileByLoginId ( userProfile . getLoginId ( ) ) ) . thenReturn ( userProfile ) ; org . apache . ranger . view . VXStringList vXStringList = xUserMgr . setUserRolesByName ( userProfile . getLoginId ( ) , vStringRolesList ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . when ( restErrorUtil . createRESTException ( "Login<sp>ID<sp>doesn't<sp>exist." , MessageEnums . INVALID_INPUT_DATA ) ) . thenThrow ( new javax . ws . rs . WebApplicationException ( ) ) ; thrown . expect ( javax . ws . rs . WebApplicationException . class ) ; xUserMgr . setUserRolesByName ( null , vStringRolesList ) ; } getLoginId ( ) { return loginId ; }
org . junit . Assert . assertNotNull ( vXStringList )
testReadHeader ( ) { final org . neo4j . batchimport . csv . BufferedReader reader = new org . neo4j . batchimport . csv . BufferedReader ( new org . neo4j . batchimport . csv . StringReader ( file ) ) ; final java . lang . String [ ] header = reader . readLine ( ) . split ( "\t" ) ; final org . neo4j . batchimport . utils . Chunker chunker = new org . neo4j . batchimport . utils . Chunker ( reader , '\t' ) ; readLine ( header , chunker , "FOO" , "42" ) ; readLine ( header , chunker , "" , "42" ) ; "<AssertPlaceHolder>" ; } nextWord ( ) { int count = 0 ; int ch ; if ( ( lastChar ) == ( org . neo4j . batchimport . utils . Chunker . EOF_CHAR ) ) return org . neo4j . batchimport . utils . Chunker . EOF ; if ( ( lastChar ) == ( org . neo4j . batchimport . utils . Chunker . EOL_CHAR ) ) { lastChar = org . neo4j . batchimport . utils . Chunker . PREV_EOL_CHAR ; return org . neo4j . batchimport . utils . Chunker . EOL ; } if ( ( pos ) == ( org . neo4j . batchimport . utils . Chunker . BUFSIZE ) ) { int available = reader . read ( buffer ) ; pos = 0 ; if ( available == ( - 1 ) ) { available = 0 ; } if ( available < ( org . neo4j . batchimport . utils . Chunker . BUFSIZE ) ) { buffer [ available ] = org . neo4j . batchimport . utils . Chunker . EOF_CHAR ; } } int start = pos ; while ( ( ( ( ch = buffer [ ( ( pos ) ++ ) ] ) != ( delim ) ) && ( ch != ( org . neo4j . batchimport . utils . Chunker . EOL_CHAR ) ) ) && ( ch != ( org . neo4j . batchimport . utils . Chunker . EOF_CHAR ) ) ) { count ++ ; if ( ( pos ) == ( org . neo4j . batchimport . utils . Chunker . BUFSIZE ) ) { java . lang . System . arraycopy ( buffer , start , buffer , 0 , count ) ; int available = reader . read ( buffer , count , ( ( org . neo4j . batchimport . utils . Chunker . BUFSIZE ) - count ) ) ; pos = count ; start = 0 ; if ( available == ( - 1 ) ) { available = 0 ; } if ( available < ( ( org . neo4j . batchimport . utils . Chunker . BUFSIZE ) - count ) ) { buffer [ ( available + count ) ] = org . neo4j . batchimport . utils . Chunker . EOF_CHAR ; } } } if ( count == 0 ) { if ( ( ( lastChar ) == ( org . neo4j . batchimport . utils . Chunker . PREV_EOL_CHAR ) ) && ( ch == ( org . neo4j . batchimport . utils . Chunker . EOF_CHAR ) ) ) { lastChar = org . neo4j . batchimport . utils . Chunker . EOF_CHAR ; return org . neo4j . batchimport . utils . Chunker . EOF ; } lastChar = ch ; if ( ch == ( org . neo4j . batchimport . utils . Chunker . EOF_CHAR ) ) return org . neo4j . batchimport . utils . Chunker . NO_VALUE ; if ( ch == ( org . neo4j . batchimport . utils . Chunker . EOL_CHAR ) ) return org . neo4j . batchimport . utils . Chunker . NO_VALUE ; return org . neo4j . batchimport . utils . Chunker . NO_VALUE ; } lastChar = ch ; if ( ( buffer [ ( ( start + count ) - 1 ) ] ) == ( org . neo4j . batchimport . utils . Chunker . EOL_CHAR2 ) ) count -- ; return java . lang . String . valueOf ( buffer , start , count ) ; }
org . junit . Assert . assertEquals ( Chunker . EOF , chunker . nextWord ( ) )
whenProblemStateIsSet_itMustBeSetCorrectly ( ) { jsprit . core . algorithm . state . StateManager stateManager = new jsprit . core . algorithm . state . StateManager ( vrpMock ) ; jsprit . core . algorithm . state . StateId id = stateManager . createStateId ( "problemState" ) ; stateManager . putProblemState ( id , jsprit . core . algorithm . state . Boolean . class , true ) ; boolean problemState = stateManager . getProblemState ( id , jsprit . core . algorithm . state . Boolean . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( problemState )
testMetadataInjestion_emptyMetadata ( ) { java . lang . String topoId = "testMetadataInjection" ; com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . load ( ) ; java . util . concurrent . atomic . AtomicBoolean validated = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; org . apache . eagle . alert . engine . spout . CorrelationSpout spout = new org . apache . eagle . alert . engine . spout . CorrelationSpout ( config , topoId , null , 1 ) { @ org . apache . eagle . alert . engine . topology . Override protected storm . kafka . KafkaSpoutWrapper createKafkaSpout ( com . typesafe . config . Config config , java . util . Map conf , backtype . storm . task . TopologyContext context , backtype . storm . spout . SpoutOutputCollector collector , java . lang . String topic , java . lang . String schemeClsName , org . apache . eagle . alert . coordination . model . SpoutSpec streamMetadatas , java . util . Map < java . lang . String , org . apache . eagle . alert . engine . coordinator . StreamDefinition > sds ) throws org . apache . eagle . alert . engine . topology . Exception { validated . set ( true ) ; return null ; } } ; org . apache . eagle . alert . coordination . model . Kafka2TupleMetadata ds = new org . apache . eagle . alert . coordination . model . Kafka2TupleMetadata ( ) ; ds . setName ( "ds-name" ) ; ds . setType ( "KAFKA" ) ; ds . setProperties ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) ) ; ds . setTopic ( "name-of-topic1" ) ; ds . setSchemeCls ( "PlainStringScheme" ) ; ds . setCodec ( new org . apache . eagle . alert . coordination . model . Tuple2StreamMetadata ( ) ) ; java . util . Map < java . lang . String , org . apache . eagle . alert . coordination . model . Kafka2TupleMetadata > dsMap = new java . util . HashMap < java . lang . String , org . apache . eagle . alert . coordination . model . Kafka2TupleMetadata > ( ) ; dsMap . put ( ds . getName ( ) , ds ) ; org . apache . eagle . alert . coordination . model . StreamRepartitionMetadata m1 = new org . apache . eagle . alert . coordination . model . StreamRepartitionMetadata ( ds . getName ( ) , "s1" ) ; java . util . Map < java . lang . String , java . util . List < org . apache . eagle . alert . coordination . model . StreamRepartitionMetadata > > dataSources = new java . util . HashMap < java . lang . String , java . util . List < org . apache . eagle . alert . coordination . model . StreamRepartitionMetadata > > ( ) ; dataSources . put ( ds . getName ( ) , java . util . Arrays . asList ( m1 ) ) ; org . apache . eagle . alert . coordination . model . SpoutSpec newMetadata = new org . apache . eagle . alert . coordination . model . SpoutSpec ( topoId , dataSources , null , dsMap ) ; spout . onReload ( newMetadata , null ) ; "<AssertPlaceHolder>" ; } get ( ) { return new org . apache . eagle . app . environment . impl . SparkExecutionRuntime ( ) ; }
org . junit . Assert . assertTrue ( validated . get ( ) )
testTransformConditionLocationExceptionExit ( ) { org . hawkular . apm . api . model . config . instrumentation . jvm . JVM ir = new org . hawkular . apm . api . model . config . instrumentation . jvm . JVM ( ) ; org . hawkular . apm . api . model . config . instrumentation . jvm . FreeFormAction im = new org . hawkular . apm . api . model . config . instrumentation . jvm . FreeFormAction ( ) ; ir . setRuleName ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_RULE ) ; ir . setClassName ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_CLASS ) ; ir . setMethodName ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_METHOD ) ; ir . setLocation ( "EXCEPTION<sp>EXIT" ) ; ir . setCondition ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_CONDITION_1 ) ; ir . getParameterTypes ( ) . add ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_PARAM1 ) ; ir . getParameterTypes ( ) . add ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_PARAM2 ) ; ir . getActions ( ) . add ( im ) ; im . setAction ( ")\r\n" 4 ) ; org . hawkular . apm . api . model . config . instrumentation . Instrumentation in = new org . hawkular . apm . api . model . config . instrumentation . Instrumentation ( ) ; in . getRules ( ) . add ( ir ) ; org . hawkular . apm . instrumenter . rules . RuleTransformer transformer = new org . hawkular . apm . instrumenter . rules . RuleTransformer ( ) ; java . lang . String transformed = transformer . transform ( "test" , in , null ) ; java . lang . String expected = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ")\r\n" 0 + "RULE<sp>test(1)<sp>" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_RULE ) ) + "\r\nCLASS<sp>" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_CLASS ) ) + "\r\n" ) + "METHOD<sp>" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_METHOD ) ) + "(" ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_PARAM1 ) ) + ")\r\n" 3 ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_PARAM2 ) ) + ")\r\n" ) + ")\r\n" 1 ) + ( org . hawkular . apm . instrumenter . RuleHelper . class . getName ( ) ) ) + "\r\n" ) + ")\r\n" 2 ) + ( org . hawkular . apm . instrumenter . rules . TransformerTest . TEST_CONDITION_1 ) ) + "\r\n" ) + "DO\r\n<sp>" ) + ( im . getAction ( ) ) ) + "\r\n" ) + "ENDRULE\r\n\r\n" ; "<AssertPlaceHolder>" ; } getAction ( ) { return action ; }
org . junit . Assert . assertEquals ( expected , transformed )
testEquals_emptyObject ( ) { java . lang . Object obj = new java . lang . Object ( ) ; boolean result = fixture . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( getClass ( ) . equals ( obj . getClass ( ) ) ) ) { return false ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } org . eclipse . tracecompass . lttng2 . ust . core . analysis . debuginfo . UstDebugInfoLoadedBinaryFile other = ( ( org . eclipse . tracecompass . lttng2 . ust . core . analysis . debuginfo . UstDebugInfoLoadedBinaryFile ) ( obj ) ) ; return java . util . Objects . equals ( fBaseAddress , other . fBaseAddress ) ; }
org . junit . Assert . assertFalse ( result )
showSummaryOptionCanBeSetWithLongOpt ( ) { java . lang . String [ ] args = makeArgs ( "-summary" ) ; options = createOptions ( args ) ; "<AssertPlaceHolder>" ; } showSummary ( ) { return showSummary ; }
org . junit . Assert . assertEquals ( true , options . showSummary ( ) )
zipRequestWrapperTest_shouldReturnTrueIfUnzippedContentReadFromWrapperIsTheSameAsContentBeforeZipping ( ) { org . openmrs . GlobalProperty property = new org . openmrs . GlobalProperty ( "gzip.acceptCompressedRequestsForPaths" , ".*" ) ; org . openmrs . api . context . Context . getAdministrationService ( ) . saveGlobalProperty ( property ) ; org . springframework . mock . web . MockHttpServletRequest req = new org . springframework . mock . web . MockHttpServletRequest ( ) ; req . setContextPath ( "http://gzipservletpath" ) ; req . addHeader ( "Content-encoding" , "gzip" ) ; java . io . ByteArrayOutputStream stream = new java . io . ByteArrayOutputStream ( ) ; java . util . zip . GZIPOutputStream gzOutput = new java . util . zip . GZIPOutputStream ( stream ) ; java . io . PrintWriter pwriter = new java . io . PrintWriter ( gzOutput ) ; pwriter . write ( "message<sp>string" ) ; pwriter . flush ( ) ; gzOutput . finish ( ) ; req . setContent ( stream . toByteArray ( ) ) ; org . springframework . mock . web . MockHttpServletResponse resp = new org . springframework . mock . web . MockHttpServletResponse ( ) ; javax . servlet . FilterChain fil = mock ( javax . servlet . FilterChain . class ) ; org . openmrs . web . filter . GZIPFilter gzipFilter = new org . openmrs . web . filter . GZIPFilter ( ) ; gzipFilter . doFilterInternal ( req , resp , fil ) ; final org . mockito . ArgumentCaptor < javax . servlet . http . HttpServletRequest > argumentCaptor = org . mockito . ArgumentCaptor . forClass ( javax . servlet . http . HttpServletRequest . class ) ; org . mockito . Mockito . verify ( fil ) . doFilter ( argumentCaptor . capture ( ) , org . mockito . Mockito . any ( javax . servlet . http . HttpServletResponse . class ) ) ; javax . servlet . http . HttpServletRequest requestArgument = argumentCaptor . getValue ( ) ; try { java . io . InputStream iStream = requestArgument . getInputStream ( ) ; java . io . InputStreamReader iReader = new java . io . InputStreamReader ( iStream ) ; java . io . BufferedReader bufReader = new java . io . BufferedReader ( iReader ) ; java . lang . String outputMessage = bufReader . readLine ( ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( ) ; } } getInputStream ( ) { return stream ; }
org . junit . Assert . assertThat ( outputMessage , org . hamcrest . Matchers . is ( "message<sp>string" ) )
testRegionOverrideRefSuperRegion2Levels ( ) { java . lang . String g = "a()<sp>::=<sp>\"X<@r()>Y\"\n" + "@a.r()<sp>::=<sp>\"foo\"\n" ; org . stringtemplate . v4 . test . STGroup group = new org . stringtemplate . v4 . test . STGroupString ( g ) ; java . lang . String sub = "@a.r()<sp>::=<sp>\"<@super.r()>2\"\n" ; org . stringtemplate . v4 . test . STGroup subGroup = new org . stringtemplate . v4 . test . STGroupString ( sub ) ; subGroup . importTemplates ( group ) ; org . stringtemplate . v4 . test . ST st = subGroup . getInstanceOf ( "a" ) ; java . lang . String result = st . render ( ) ; java . lang . String expecting = "Xfoo2Y" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testNotEmpty ( ) { when ( stack . isEmpty ( ) ) . thenReturn ( false ) ; boolean empty = tested . isEmpty ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return dayTimeValues ( ) . allMatch ( this :: isNone ) ; }
org . junit . Assert . assertFalse ( empty )