input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testShowMessageDialog1 ( ) { org . evosuite . testsuite . TestSuiteChromosome suite = new org . evosuite . testsuite . TestSuiteChromosome ( ) ; org . evosuite . instrumentation . InstrumentingClassLoader cl = new org . evosuite . instrumentation . InstrumentingClassLoader ( ) ; org . evosuite . testcase . TestCase t0 = org . evosuite . runtime . mock . javax . swing . MockJOptionPaneShowMessageDialogTest . buildTestCase1TrueBranch ( cl ) ; org . evosuite . testcase . TestCase t1 = org . evosuite . runtime . mock . javax . swing . MockJOptionPaneShowMessageDialogTest . buildTestCase1FalseBranch ( cl ) ; suite . addTest ( t0 ) ; suite . addTest ( t1 ) ; org . evosuite . coverage . branch . BranchCoverageSuiteFitness ff = new org . evosuite . coverage . branch . BranchCoverageSuiteFitness ( cl ) ; ff . getFitness ( suite ) ; java . util . Set < org . evosuite . testcase . TestFitnessFunction > coveredGoals = suite . getCoveredGoals ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , coveredGoals . size ( ) )
testOrder ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "brown" , "dog" , "fox" , "jumps" , "lazy" , "over" , "quick" , "the" } ; for ( int i = 0 ; i < ( expected . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } idToSortPosition ( int , boolean ) { return sensitive ? sortPositionPerId [ id ] : sortPositionPerIdInsensitive [ id ] ; }
org . junit . Assert . assertEquals ( expected [ t . idToSortPosition ( i , true ) ] , t . get ( i ) )
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 ( ( bean ) -> counter . incrementAndGet ( ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return io . ebean . metric . MetricServiceProvider . metricFactory ; }
org . junit . Assert . assertEquals ( 2 , counter . get ( ) )
testAddCluster ( ) { java . lang . String className = "testAddCluster" ; com . orientechnologies . orient . core . metadata . schema . OSchema schema = com . orientechnologies . orient . core . sql . executor . OAlterClassStatementExecutionTest . db . getMetadata ( ) . getSchema ( ) ; schema . createClass ( className ) ; com . orientechnologies . orient . core . sql . executor . OResultSet result = com . orientechnologies . orient . core . sql . executor . OAlterClassStatementExecutionTest . db . command ( ( ( ( ( "alter<sp>class<sp>" + className ) + "<sp>addcluster<sp>" ) + className ) + "_new" ) ) ; schema . reload ( ) ; com . orientechnologies . orient . core . metadata . schema . OClass clazz = schema . getClass ( className ) ; boolean found = false ; for ( int i : clazz . getClusterIds ( ) ) { java . lang . String clusterName = com . orientechnologies . orient . core . sql . executor . OAlterClassStatementExecutionTest . db . getClusterNameById ( i ) ; if ( clusterName . equalsIgnoreCase ( ( className + "_new" ) ) ) { found = true ; } } result . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { if ( ( graph ) != null ) graph . shutdown ( ) ; }
org . junit . Assert . assertTrue ( found )
testExonOverlapNoFrameshiftOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t58946844\t.\tN\t<DEL:ME>\t.\t.\tSVTYPE=DEL;END=58946946" ) ; final java . lang . String expected = "1\t58946844\t.\tN\t<DEL:ME>\t.\t.\tEND=58946946;" + ( "SVANN=feature_truncation&mobile_element_deletion&coding_transcript_variant|HIGH|OMA1|115209|transcript|NM_145243.3|Coding|;" + "SVTYPE=DEL" ) ; final java . lang . String actual = loadVcfBody ( outPath ) ; "<AssertPlaceHolder>" ; } loadVcfBody ( java . lang . String ) { return java . util . Arrays . asList ( com . google . common . io . Files . asCharSource ( new de . charite . compbio . jannovar . cmd . annotate_vcf . File ( outPath ) , Charsets . UTF_8 ) . read ( ) . split ( "\r?\n" ) ) . stream ( ) . filter ( ( line ) -> ! ( line . startsWith ( "#" ) ) ) . collect ( java . util . stream . Collectors . joining ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
readWithEmptyDataDoesNothing ( ) { final org . json . JSONObject json = new org . json . JSONObject ( ) ; json . put ( org . phenotips . data . internal . controller . LabeledExternalIdentifiersControllerTest . CONTROLLER_NAME , new org . json . JSONArray ( ) ) ; final org . phenotips . data . PatientData < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > result = this . component . readJSON ( json ) ; "<AssertPlaceHolder>" ; } readJSON ( org . json . JSONObject ) { return null ; }
org . junit . Assert . assertNull ( result )
testFailingWithException ( ) { java . lang . String nullString = null ; "<AssertPlaceHolder>" ; new java . util . ArrayList ( ) . get ( ( - 100 ) ) ; }
org . junit . Assert . assertEquals ( ( - 1 ) , nullString . length ( ) )
getValueFromJsonObject_input_key_empty ( ) { java . lang . String jsonString = "{\"deviceId\":\"xxx-device\",\"generationId\":\"111111111111111111\",\"etag\":\"MA==\",\"connectionState\":\"Disconnected\",\"status\":\"Disabled\",\"statusReason\":null,\"connectionStateUpdatedTime\":\"0001-01-01T00:00:00\",\"statusUpdatedTime\":\"0001-01-01T00:00:00\",\"lastActivityTime\":\"0001-01-01T00:00:00\",\"cloudToDeviceMessageCount\":0,\"authentication\":{\"symmetricKey\":{\"primaryKey\":\"AAABBBCCC111222333444000\",\"secondaryKey\":\"111222333444555AAABBBCCC\"}}}" ; java . io . StringReader stringReader = new java . io . StringReader ( jsonString ) ; javax . json . JsonReader jsonReader = javax . json . Json . createReader ( stringReader ) ; javax . json . JsonObject jsonObject = jsonReader . readObject ( ) ; java . lang . String key = "" ; java . lang . String expResult = "" ; java . lang . String result = com . microsoft . azure . sdk . iot . provisioning . service . Tools . getValueFromJsonObject ( jsonObject , key ) ; "<AssertPlaceHolder>" ; } getValueFromJsonObject ( javax . json . JsonObject , java . lang . String ) { java . lang . String retVal ; if ( ( ( ( jsonObject == null ) || ( jsonObject == ( javax . json . JsonObject . NULL ) ) ) || ( key == null ) ) || ( ( key . length ( ) ) == 0 ) ) { retVal = "" ; } else { javax . json . JsonValue jsonValue = jsonObject . get ( key ) ; if ( jsonValue != ( javax . json . JsonValue . NULL ) ) { retVal = com . microsoft . azure . sdk . iot . provisioning . service . Tools . getValueFromJsonString ( jsonObject . getJsonString ( key ) ) ; } else { retVal = "" ; } } return retVal ; }
org . junit . Assert . assertEquals ( expResult , result )
withAbsolutePath ( ) { final com . azure . common . implementation . http . UrlBuilder builder = new com . azure . common . implementation . http . UrlBuilder ( ) . withScheme ( "http" ) . withHost ( "www.example.com" ) . withPath ( "http://www.othersite.com" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; }
org . junit . Assert . assertEquals ( "http://www.othersite.com" , builder . toString ( ) )
validate_idTagIsNull_returnFalse ( ) { boolean isValid = request . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; }
org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( false ) )
testSetRow ( ) { org . apache . commons . math . linear . FieldMatrix < org . apache . commons . math . fraction . Fraction > m = new org . apache . commons . math . linear . BlockFieldMatrix < org . apache . commons . math . fraction . Fraction > ( subTestData ) ; "<AssertPlaceHolder>" ; m . setRow ( 0 , subRow3 [ 0 ] ) ; checkArrays ( subRow3 [ 0 ] , m . getRow ( 0 ) ) ; try { m . setRow ( ( - 1 ) , subRow3 [ 0 ] ) ; org . junit . Assert . fail ( "Expecting<sp>OutOfRangeException" ) ; } catch ( org . apache . commons . math . exception . OutOfRangeException ex ) { } try { m . setRow ( 0 , new org . apache . commons . math . fraction . Fraction [ 5 ] ) ; org . junit . Assert . fail ( "Expecting<sp>MatrixDimensionMismatchException" ) ; } catch ( org . apache . commons . math . linear . MatrixDimensionMismatchException ex ) { } } getRow ( int ) { if ( ! ( isValidCoordinate ( row , 0 ) ) ) { throw new org . apache . commons . math . linear . MatrixIndexException ( "illegal<sp>row<sp>argument" ) ; } int ncols = this . getColumnDimension ( ) ; double [ ] out = new double [ ncols ] ; java . lang . System . arraycopy ( data [ row ] , 0 , out , 0 , ncols ) ; return out ; }
org . junit . Assert . assertTrue ( ( ( subRow3 [ 0 ] [ 0 ] ) != ( m . getRow ( 0 ) [ 0 ] ) ) )
WhenPawnDoStepItCanMovInNewBox ( ) { ru . szhernovoy . model . Pawn pawn = new ru . szhernovoy . model . Pawn ( Color . Black ) ; ru . szhernovoy . model . Point a = new ru . szhernovoy . model . Point ( 0 , 0 ) ; ru . szhernovoy . model . Point b = new ru . szhernovoy . model . Point ( 1 , 0 ) ; boolean message = true ; boolean result = pawn . chekMove ( a , b ) ; "<AssertPlaceHolder>" ; } chekMove ( ru . szhernovoy . model . Point , ru . szhernovoy . model . Point ) { boolean chek = false ; int subX = ( ( ( B . getX ( ) ) - ( A . getX ( ) ) ) > 0 ) ? ( B . getX ( ) ) - ( A . getX ( ) ) : ( A . getX ( ) ) - ( B . getX ( ) ) ; int subY = ( ( ( B . getY ( ) ) - ( A . getY ( ) ) ) > 0 ) ? ( B . getY ( ) ) - ( A . getY ( ) ) : ( B . getY ( ) ) - ( A . getY ( ) ) ; if ( ( subY == 0 ) && ( subX == 1 ) ) { chek = true ; } if ( ! chek ) { System . out . println ( "Uncorrect<sp>move<sp>for<sp>this<sp>figure" ) ; } return chek ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( message ) )
shouldReturnTheValueAsIsGivenNonEmptyValue ( ) { java . lang . String result = org . flips . utils . ValidationUtils . requireNonEmpty ( "test" , "Expected<sp>argument<sp>can<sp>not<sp>be<sp>null" ) ; "<AssertPlaceHolder>" ; } requireNonEmpty ( java . lang . String , java . lang . String ) { boolean isEmpty = org . flips . utils . Utils . isEmpty ( str ) ; if ( isEmpty ) throw new java . lang . IllegalArgumentException ( message ) ; return str ; }
org . junit . Assert . assertEquals ( result , "test" )
mulitpleFilterTest ( ) { org . geotoolkit . index . LogicalFilterType [ ] filterType5 = new org . geotoolkit . index . LogicalFilterType [ ] { org . geotoolkit . index . LogicalFilterType . AND , org . geotoolkit . index . LogicalFilterType . NOT } ; serialFilter = new org . geotoolkit . lucene . filter . SerialChainFilter ( filters4 , filterType5 ) ; sQuery = new org . geotoolkit . lucene . filter . SpatialQuery ( "" , serialFilter , org . geotoolkit . index . LogicalFilterType . AND ) ; results = org . geotoolkit . lucene . LuceneSearcherTest . searcher . doSearch ( sQuery ) ; nbResults = results . size ( ) ; org . geotoolkit . lucene . LuceneSearcherTest . LOGGER . log ( Level . FINER , "point<sp>5" 5 , nbResults ) ; "<AssertPlaceHolder>" ; } log ( java . util . logging . Level , java . lang . String , java . lang . String ) { final java . util . logging . LogRecord record = new java . util . logging . LogRecord ( level , message ) ; record . setSourceClassName ( org . geotoolkit . internal . sql . Synchronizer . class . getName ( ) ) ; record . setSourceMethodName ( method ) ; org . apache . sis . util . logging . Logging . getLogger ( "org.geotoolkit.sql" ) . log ( record ) ; }
org . junit . Assert . assertEquals ( nbResults , 0 )
retrievesMatrixParamValueFromLastPathSegment ( ) { when ( typeProducer . createValue ( "foo" , matrixParameters , null ) ) . thenReturn ( matrixParameters . getFirst ( "foo" ) ) ; java . lang . Object resolvedMatrixParameter = matrixParameterResolver . resolve ( parameter , applicationContext ) ; "<AssertPlaceHolder>" ; } getFirst ( java . lang . String ) { return m . getFirst ( new org . everrest . core . util . CaselessStringWrapper ( key ) ) ; }
org . junit . Assert . assertEquals ( matrixParameters . getFirst ( "foo" ) , resolvedMatrixParameter )
testDeleteUploadPreset ( ) { api . uploadPreset ( com . cloudinary . test . AbstractApiTest . API_TEST_UPLOAD_PRESET_4 , com . cloudinary . utils . ObjectUtils . emptyMap ( ) ) ; api . deleteUploadPreset ( com . cloudinary . test . AbstractApiTest . API_TEST_UPLOAD_PRESET_4 , com . cloudinary . utils . ObjectUtils . emptyMap ( ) ) ; boolean error = false ; try { api . uploadPreset ( com . cloudinary . test . AbstractApiTest . API_TEST_UPLOAD_PRESET_4 , com . cloudinary . utils . ObjectUtils . emptyMap ( ) ) ; } catch ( java . lang . Exception e ) { error = true ; } "<AssertPlaceHolder>" ; } emptyMap ( ) { return Collections . EMPTY_MAP ; }
org . junit . Assert . assertTrue ( error )
testSerialization ( ) { org . jfree . data . xy . YIntervalSeriesCollection c1 = new org . jfree . data . xy . YIntervalSeriesCollection ( ) ; org . jfree . data . xy . YIntervalSeries s1 = new org . jfree . data . xy . YIntervalSeries ( "Series" ) ; s1 . add ( 1.0 , 1.1 , 1.2 , 1.3 ) ; org . jfree . data . xy . YIntervalSeriesCollection c2 = ( ( org . jfree . data . xy . YIntervalSeriesCollection ) ( org . jfree . chart . TestUtilities . serialised ( c1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( c1 , c2 )
testNaturalIdload ( ) { sfsb . setupConfig ( ) ; try { org . jboss . as . test . integration . hibernate . naturalid . Person s1 = sfsb . createPerson ( "MADHUMITA" , "SADHUKHAN" , "99<sp>Purkynova<sp>REDHAT<sp>BRNO<sp>CZ" , 123 , 1 ) ; org . jboss . as . test . integration . hibernate . naturalid . Person s2 = sfsb . createPerson ( "REDHAT" , "LINUX" , "Worldwide" , 435 , 3 ) ; org . jboss . as . test . integration . hibernate . naturalid . Person p1 = sfsb . getPersonReference ( "REDHAT" , 435 ) ; org . jboss . as . test . integration . hibernate . naturalid . Person p2 = sfsb . loadPerson ( "MADHUMITA" , 123 ) ; "<AssertPlaceHolder>" ; } finally { sfsb . cleanup ( ) ; } } getAddress ( ) { return address ; }
org . junit . Assert . assertEquals ( p2 . getAddress ( ) , "99<sp>Purkynova<sp>REDHAT<sp>BRNO<sp>CZ" )
testDeserialize ( ) { com . liferay . data . engine . io . DEDataLayoutDeserializerApplyRequest deDataLayoutDeserializerApplyRequest = DEDataLayoutDeserializerApplyRequest . Builder . of ( read ( "data-layout-page-serializer.json" ) ) ; com . liferay . data . engine . io . DEDataLayoutDeserializerApplyResponse deDataLayoutDeserializerApplyResponse = _deDataLayoutJSONDeserializer . apply ( deDataLayoutDeserializerApplyRequest ) ; com . liferay . data . engine . model . DEDataLayout deDataLayout = deDataLayoutDeserializerApplyResponse . getDEDataLayout ( ) ; java . util . Queue < com . liferay . data . engine . model . DEDataLayoutPage > deDataLayoutPages = deDataLayout . getDEDataLayoutPages ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( deDataLayoutPages . isEmpty ( ) )
testToString ( ) { ch . puzzle . itc . mobiliar . business . property . entity . FreeMarkerProperty p = new ch . puzzle . itc . mobiliar . business . property . entity . FreeMarkerProperty ( "$${test}" , "key" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( "Info<sp>[resource=" + ( appServer . getName ( ) ) ) + "(" ) + ( appServer . getId ( ) ) ) + ")<sp>" ) + ",<sp>context=" ) + ( context . getName ( ) ) ) + "(" ) + ( context . getId ( ) ) ) + "),<sp>firstApp:<sp>" ) + ( apps . get ( 0 ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( "$${test}" , p . toString ( ) )
newBeanClassIsManagedBeanReRunTestOnlyAfterMvnClean ( ) { try { WeldPlugin . isTestEnvironment = true ; java . util . Collection < org . hotswap . agent . plugin . weld . command . BeanClassRefreshAgent > instances = org . hotswap . agent . plugin . weld . command . BeanClassRefreshAgent . getInstances ( ) ; for ( org . hotswap . agent . plugin . weld . command . BeanClassRefreshAgent instance : instances ) { java . lang . Class newClass = org . hotswap . agent . plugin . hotswapper . HotSwapper . newClass ( "NewClass" , instance . getBdaId ( ) , getClass ( ) . getClassLoader ( ) ) ; java . net . URL resource = newClass . getClassLoader ( ) . getResource ( "NewClass.class" ) ; java . lang . Thread . sleep ( 1000 ) ; java . lang . Object bean = getBeanInstance ( newClass ) ; "<AssertPlaceHolder>" ; break ; } } finally { WeldPlugin . isTestEnvironment = false ; } } getBeanInstance ( java . lang . Class ) { javax . enterprise . inject . spi . BeanManager beanManager = javax . enterprise . inject . spi . CDI . current ( ) . getBeanManager ( ) ; javax . enterprise . inject . spi . Bean < T > bean = ( ( javax . enterprise . inject . spi . Bean < T > ) ( beanManager . resolve ( beanManager . getBeans ( beanClass ) ) ) ) ; T result = beanManager . getContext ( bean . getScope ( ) ) . get ( bean , beanManager . createCreationalContext ( bean ) ) ; return result ; }
org . junit . Assert . assertNotNull ( bean )
testSerialization ( ) { org . jfree . chart . entity . PieSectionEntity e1 = new org . jfree . chart . entity . PieSectionEntity ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , new org . jfree . data . general . DefaultPieDataset ( ) , 1 , 2 , "Key" , "ToolTip" , "URL" ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( e1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . entity . PieSectionEntity e2 = ( ( org . jfree . chart . entity . PieSectionEntity ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( e1 , e2 )
testDefaultBigEndian ( ) { org . codehaus . preon . codec . Codec < org . codehaus . preon . codec . IntegrationTest . Test49 > codec = org . codehaus . preon . codec . Codecs . create ( org . codehaus . preon . codec . IntegrationTest . Test49 . class ) ; org . codehaus . preon . codec . IntegrationTest . Test49 value = org . codehaus . preon . codec . Codecs . decode ( codec , new byte [ ] { 0 , 0 , 0 , 1 } ) ; "<AssertPlaceHolder>" ; } create ( java . lang . reflect . Constructor ) { try { return ( ( T ) ( constructor . newInstance ( ) ) ) ; } catch ( java . lang . InstantiationException ie ) { throw new org . codehaus . preon . reflect . RuntimeInstantiationException ( ie ) ; } catch ( java . lang . IllegalAccessException iae ) { throw new org . codehaus . preon . reflect . RuntimeIllegalAccessException ( iae ) ; } catch ( java . lang . reflect . InvocationTargetException ite ) { throw new org . codehaus . preon . reflect . RuntimeInvocationTargetException ( ite ) ; } }
org . junit . Assert . assertEquals ( 1 , value . value )
toStringIsCorrect ( ) { final java . lang . String iotHubHostname = "test.iothub" ; final java . lang . String deviceId = "test-deviceid" ; final java . lang . String eTag = "test-etag" ; final java . lang . String uriStr = "test-uri-str" ; new mockit . NonStrictExpectations ( ) { { mockIotHubUri . toString ( ) ; result = uriStr ; } } ; com . microsoft . azure . sdk . iot . device . net . IotHubAbandonUri abandonUri = new com . microsoft . azure . sdk . iot . device . net . IotHubAbandonUri ( iotHubHostname , deviceId , eTag , null ) ; java . lang . String testUriStr = abandonUri . toString ( ) ; final java . lang . String expectedUriStr = uriStr ; "<AssertPlaceHolder>" ; } toString ( ) { com . google . gson . Gson gson = new com . google . gson . GsonBuilder ( ) . disableHtmlEscaping ( ) . setPrettyPrinting ( ) . create ( ) ; return gson . toJson ( this ) ; }
org . junit . Assert . assertThat ( testUriStr , org . hamcrest . CoreMatchers . is ( expectedUriStr ) )
testGetRemoveMultiLineComment ( ) { classUnderTest . setRemoveMultiLineComment ( true ) ; "<AssertPlaceHolder>" ; } getRemoveMultiLineComment ( ) { return _removeMultiLineComment ; }
org . junit . Assert . assertEquals ( true , classUnderTest . getRemoveMultiLineComment ( ) )
testPreviousValueBeforeStart ( ) { org . roaringbitmap . buffer . MappeableBitmapContainer container = new org . roaringbitmap . buffer . MappeableArrayContainer ( java . nio . ShortBuffer . wrap ( new short [ ] { 10 , 20 , 30 } ) , 3 ) . toBitmapContainer ( ) ; "<AssertPlaceHolder>" ; } previousValue ( int ) { short key = highbits ( fromValue ) ; int containerIndex = highLowContainer . advanceUntil ( key , ( - 1 ) ) ; long prevSetBit = - 1L ; while ( ( ( containerIndex != ( - 1 ) ) && ( containerIndex < ( highLowContainer . size ( ) ) ) ) && ( prevSetBit == ( - 1L ) ) ) { short containerKey = highLowContainer . getKeyAtIndex ( containerIndex ) ; org . roaringbitmap . buffer . MappeableContainer container = highLowContainer . getContainerAtIndex ( containerIndex ) ; int bit = ( ( org . roaringbitmap . buffer . Util . compareUnsigned ( containerKey , key ) ) < 0 ) ? container . last ( ) : container . previousValue ( lowbits ( fromValue ) ) ; prevSetBit = ( bit == ( - 1 ) ) ? - 1L : org . roaringbitmap . Util . toUnsignedLong ( ( ( containerKey << 16 ) | bit ) ) ; -- containerIndex ; } assert prevSetBit <= 4294967295L ; assert prevSetBit <= ( org . roaringbitmap . Util . toUnsignedLong ( fromValue ) ) ; return prevSetBit ; }
org . junit . Assert . assertEquals ( ( - 1 ) , container . previousValue ( ( ( short ) ( 5 ) ) ) )
testWhitespaceExtIsNotIgnored ( ) { c = b . ext ( "<sp>" ) . build ( ) ; "<AssertPlaceHolder>" ; } getExt ( ) { return ext ; }
org . junit . Assert . assertEquals ( "<sp>" , c . getExt ( ) )
test_success_older_message_existing_entity ( ) { org . ikasan . filter . EntityAgeFilter < java . lang . String > filter = new org . ikasan . filter . EntityAgeFilter < java . lang . String > ( this . defaultEntityAgeFilterService , "client-d" ) ; org . ikasan . filter . configuration . EntityAgeFilterConfiguration configuration = new org . ikasan . filter . configuration . EntityAgeFilterConfiguration ( ) ; configuration . setEntityIdentifierXpath ( "/message/businessIdentifier/text()" ) ; configuration . setEntityLastUpdatedXpath ( "/message/lastUpdated/text()" ) ; configuration . setLastUpdatedDatePattern ( "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" ) ; filter . setConfiguration ( configuration ) ; filter . startManagedResource ( ) ; java . lang . String result = filter . filter ( xmlVeryOld ) ; filter . stopManagedResource ( ) ; "<AssertPlaceHolder>" ; } stopManagedResource ( ) { this . entityAgeFilterService . destroy ( ) ; }
org . junit . Assert . assertNull ( result )
testComplexItemDocumentBuild ( ) { org . wikidata . wdtk . datamodel . interfaces . MonolingualTextValue mtv = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeMonolingualTextValue ( "Test" , "de" ) ; org . wikidata . wdtk . datamodel . interfaces . SiteLink sl = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeSiteLink ( "Test" , "frwiki" , java . util . Collections . singletonList ( org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataItemIdValue ( "Q42" ) ) ) ; org . wikidata . wdtk . datamodel . interfaces . ItemDocument id1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeItemDocument ( i , java . util . Collections . singletonList ( mtv ) , java . util . Collections . singletonList ( mtv ) , java . util . Collections . singletonList ( mtv ) , java . util . Collections . singletonList ( sg ) , java . util . Collections . singletonMap ( "frwiki" , sl ) , 1234 ) ; org . wikidata . wdtk . datamodel . interfaces . ItemDocument id2 = org . wikidata . wdtk . datamodel . helpers . ItemDocumentBuilder . forItemId ( i ) . withLabel ( "Test" , "de" ) . withDescription ( "Test" , "de" ) . withAlias ( "Test" , "de" ) . withSiteLink ( "Test" , "frwiki" , org . wikidata . wdtk . datamodel . helpers . Datamodel . makeWikidataItemIdValue ( "Q42" ) ) . withStatement ( s1 ) . withStatement ( s2 ) . withRevisionId ( 1234 ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { prepareBuild ( ) ; return factory . getPropertyDocument ( ( ( org . wikidata . wdtk . datamodel . interfaces . PropertyIdValue ) ( this . entityIdValue ) ) , this . labels , this . descriptions , this . aliases , getStatementGroups ( ) , this . datatype , this . revisionId ) ; }
org . junit . Assert . assertEquals ( id1 , id2 )
testNext ( ) { assumeUsbTestsEnabled ( ) ; while ( this . iterator . hasNext ( ) ) { "<AssertPlaceHolder>" ; } } next ( ) { if ( ! ( hasNext ( ) ) ) throw new java . util . NoSuchElementException ( ) ; return this . pollfds . get ( ( ( this . nextIndex ) ++ ) ) ; }
org . junit . Assert . assertNotNull ( this . iterator . next ( ) )
testGetVDiskId ( ) { parameters . put ( PropertyHandler . VDISK_ID , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . VDISK_ID , "vdiskid" ) ) ; propertyHandler = new org . oscm . app . iaas . PropertyHandler ( settings ) ; java . lang . String id = propertyHandler . getVDiskId ( ) ; "<AssertPlaceHolder>" ; } getVDiskId ( ) { return props . getValidatedProperty ( org . oscm . app . iaas . PropertyHandler . VDISK_ID ) ; }
org . junit . Assert . assertEquals ( "vdiskid" , id )
retrieveNonExitingResource ( ) { java . lang . String uri = "http://localhost/dummy" ; java . util . List < org . eclipse . rdf4j . model . Statement > statements = testStoreManager . retrieveResource ( f . createIRI ( uri ) ) ; "<AssertPlaceHolder>" ; } retrieveResource ( org . eclipse . rdf4j . model . IRI ) { com . google . common . base . Preconditions . checkNotNull ( uri , "URI<sp>must<sp>not<sp>be<sp>null." ) ; nl . dtls . fairdatapoint . repository . impl . StoreManagerImpl . LOGGER . info ( ( ( "Get<sp>statements<sp>for<sp>the<sp>URI<sp><" + ( uri . toString ( ) ) ) + ">" ) ) ; try ( org . eclipse . rdf4j . repository . RepositoryConnection conn = getRepositoryConnection ( ) ) { org . eclipse . rdf4j . repository . RepositoryResult < org . eclipse . rdf4j . model . Statement > queryResult = conn . getStatements ( uri , null , null , false ) ; java . util . List < org . eclipse . rdf4j . model . Statement > statements = new java . util . ArrayList ( ) ; while ( queryResult . hasNext ( ) ) { statements . add ( queryResult . next ( ) ) ; } return statements ; } catch ( org . eclipse . rdf4j . repository . RepositoryException e ) { throw new nl . dtls . fairdatapoint . repository . StoreManagerException ( ( "Error<sp>retrieve<sp>resource<sp>:" + ( e . getMessage ( ) ) ) ) ; } }
org . junit . Assert . assertTrue ( statements . isEmpty ( ) )
encoding ( ) { java . lang . String [ ] configArray = new java . lang . String [ ] { "UTF8" , "UTF-16LE" 4 , "UTF_8" , "UTF16" , "UTF-16LE" 2 , "UTF_16" , "UTF_16LE" , "UTF-16LE" , "UTF16_LITTLE_ENDIAN" , "UTF_16BE" , "UTF-16BE" , "UTF-16LE" 0 } ; java . lang . String [ ] encodingArray = new java . lang . String [ ] { "UTF-16LE" 4 , "UTF-16le" , "UTF-16le" , "UTF-16LE" 1 } ; for ( int i = 0 ; i < ( configArray . length ) ; i ++ ) { org . sqlite . SQLiteDataSource ds = new org . sqlite . SQLiteDataSource ( ) ; ds . setEncoding ( configArray [ i ] ) ; java . sql . Connection conn = ds . getConnection ( ) ; java . sql . Statement stat = conn . createStatement ( ) ; try { java . sql . ResultSet rs = stat . executeQuery ( "UTF-16LE" 3 ) ; "<AssertPlaceHolder>" ; } finally { stat . close ( ) ; conn . close ( ) ; } } } getString ( java . lang . String ) { return getString ( findColumn ( col ) ) ; }
org . junit . Assert . assertEquals ( encodingArray [ ( i / 3 ) ] , rs . getString ( 1 ) )
testEmpty ( ) { org . openscience . cdk . ringsearch . CyclicVertexSearch search = new org . openscience . cdk . ringsearch . RegularCyclicVertexSearch ( new int [ 0 ] [ 0 ] ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( search )
testIoNewList ( ) { int id = 0 ; try { org . isf . priceslist . model . PriceList pricelist = org . isf . priceslist . test . Tests . testPriceList . setup ( false ) ; priceListIoOperation . newList ( pricelist ) ; id = _getListMax ( ) ; org . isf . priceslist . model . PriceList foundPriceList = ( ( org . isf . priceslist . model . PriceList ) ( org . isf . priceslist . test . Tests . jpa . find ( org . isf . priceslist . model . PriceList . class , id ) ) ) ; _checkPriceListIntoDb ( foundPriceList . getId ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( true , false )
simpleRunWithRawApi ( ) { java . lang . String clazz = ( this . getClass ( ) . getName ( ) . replaceAll ( "\\." , "/" ) ) + ".class" ; org . ops4j . pax . url . dir . internal . FileTail loc = new org . ops4j . pax . url . dir . internal . FileTailImpl ( new java . io . File ( "." ) , clazz ) ; org . ops4j . pax . url . dir . internal . bundle . BundleBuilder b = new org . ops4j . pax . url . dir . internal . bundle . BundleBuilder ( new java . util . Properties ( ) , new org . ops4j . pax . url . dir . internal . bundle . ResourceWriter ( loc . getParentOfTail ( ) ) ) ; java . io . InputStream in = b . build ( ) ; "<AssertPlaceHolder>" ; org . ops4j . pax . url . dir . internal . FunctionalTest . dumpToConsole ( in , 16 ) ; } build ( ) { try { final java . io . PipedOutputStream pout = new java . io . PipedOutputStream ( ) ; java . io . PipedInputStream fis = new java . io . PipedInputStream ( pout ) ; new java . lang . Thread ( ) { public void run ( ) { java . util . jar . JarOutputStream jos ; try { jos = new org . ops4j . pax . url . dir . internal . bundle . DuplicateAwareJarOutputStream ( pout ) ; m_resourceLocator . write ( jos ) ; jos . close ( ) ; } catch ( java . io . IOException e ) { } finally { try { pout . close ( ) ; } catch ( java . lang . Exception e ) { } } } } . start ( ) ; if ( ( m_refs . getProperty ( org . osgi . framework . Constants . BUNDLE_SYMBOLICNAME ) ) == null ) { m_refs . setProperty ( org . osgi . framework . Constants . BUNDLE_SYMBOLICNAME , "BuiltByDirUrlHandler" ) ; } java . io . InputStream result = org . ops4j . pax . swissbox . bnd . BndUtils . createBundle ( fis , m_refs , m_resourceLocator . toString ( ) ) ; fis . close ( ) ; pout . close ( ) ; return result ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertNotNull ( in )
testImportDefaultWithFileExtensionPropertiesFiles ( ) { org . pentaho . platform . api . repository2 . unified . IUnifiedRepository mockUnifiedRepository = mock ( org . pentaho . platform . api . repository2 . unified . IUnifiedRepository . class ) ; org . pentaho . platform . plugin . services . importer . RepositoryFileImportBundle mockLocale = mock ( org . pentaho . platform . plugin . services . importer . RepositoryFileImportBundle . class ) ; java . util . Properties mockProperties = mock ( java . util . Properties . class ) ; setInternalState ( localeImportHandler , "unifiedRepository" , mockUnifiedRepository ) ; when ( mockLocale . getName ( ) ) . thenReturn ( "Some<sp>File<sp>Name" ) ; when ( mockLocale . getFile ( ) ) . thenReturn ( mock ( org . pentaho . platform . api . repository2 . unified . RepositoryFile . class ) ) ; when ( mockLocale . getFile ( ) . getName ( ) ) . thenReturn ( "someFile.xaction.properties" ) ; java . lang . String propertiesContent = "description=Some<sp>Description\n" + "title=Some<sp>Title" ; org . pentaho . platform . plugin . services . importer . RepositoryFileImportBundle importBundle = createBundle ( propertiesContent , "someFile.xaction" ) ; when ( mockUnifiedRepository . getFile ( anyString ( ) ) ) . thenReturn ( importBundle . getFile ( ) ) ; java . util . List < org . pentaho . platform . api . repository2 . unified . RepositoryFile > localeFolderChildren = new java . util . ArrayList ( ) ; localeFolderChildren . add ( importBundle . getFile ( ) ) ; when ( mockUnifiedRepository . getChildren ( anyInt ( ) ) ) . thenReturn ( localeFolderChildren ) ; org . pentaho . platform . api . repository2 . unified . RepositoryFile localeParent = localeImportHandler . getLocaleParent ( mockLocale , mockProperties ) ; verify ( mockUnifiedRepository , times ( 1 ) ) . getFile ( anyString ( ) ) ; verify ( mockUnifiedRepository , times ( 1 ) ) . getChildren ( anyInt ( ) ) ; "<AssertPlaceHolder>" ; } getChildren ( org . pentaho . platform . api . repository2 . unified . RepositoryRequest ) { return getChildren ( repositoryRequest . getPath ( ) , repositoryRequest . getChildNodeFilter ( ) , repositoryRequest . isShowHidden ( ) ) ; }
org . junit . Assert . assertNotNull ( localeParent )
whenReprIsBigInteger ( ) { allowingObjectSpecHas ( org . apache . isis . core . metamodel . facets . object . encodeable . EncodableFacet . class , mockEncodableFacet ) ; allowingObjectSpecCorrespondingClassAndSpecIdIs ( java . math . BigInteger . class ) ; final java . math . BigInteger value = java . math . BigInteger . valueOf ( 123 ) ; representation = new org . apache . isis . viewer . restfulobjects . applib . JsonRepresentation ( com . fasterxml . jackson . databind . node . BigIntegerNode . valueOf ( value ) ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockAdapterManager ) . adapterFor ( value ) ; will ( returnValue ( mockObjectAdapter ) ) ; } } ) ; final org . apache . isis . core . metamodel . adapter . ObjectAdapter adapter = org . apache . isis . viewer . restfulobjects . rendering . domainobjects . JsonValueEncoder . asAdapter ( mockObjectSpec , representation , null ) ; "<AssertPlaceHolder>" ; } adapterFor ( java . lang . Object ) { return obj != null ? getPersistenceSessionService ( ) . adapterFor ( obj ) : null ; }
org . junit . Assert . assertSame ( mockObjectAdapter , adapter )
testConstructor ( ) { java . util . Map < org . matsim . api . core . v01 . Id < org . matsim . core . utils . collections . IdentifiableArrayMapTest . TO > , org . matsim . core . utils . collections . IdentifiableArrayMapTest . TO > map = new org . matsim . core . utils . collections . IdentifiableArrayMap < org . matsim . core . utils . collections . IdentifiableArrayMapTest . TO , org . matsim . core . utils . collections . IdentifiableArrayMapTest . TO > ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return hm . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , map . size ( ) )
testNN_AtmCorrCheckInputNode ( ) { int numNodesInput = 11 ; int numNodesOutput = 1 ; int checkOutputNode = org . esa . s3tbx . fub . wew . util . NN_YellowSubstance . compute ( in , numNodesInput , out , numNodesOutput , width , mask , 0 , a ) ; "<AssertPlaceHolder>" ; } compute ( float [ ] [ ] , int , float [ ] [ ] , int , int , int [ ] , int , float [ ] ) { final int [ ] rcheck ; final int nodes_input = 18 ; final int nodes_output = 1 ; final int nodes_input_bias = 1 ; final int nodes_input_pca = 1 ; final int nodes_hidden = 40 ; final int nodes_hidden_bias = 1 ; final double nodes_hidden_temperature = 1.0 ; final double t_input = nodes_hidden_temperature / ( ( double ) ( nodes_input ) ) ; final double t_hidden = nodes_hidden_temperature / ( ( double ) ( nodes_hidden ) ) ; final double [ ] vt ; final double [ ] vt1 ; if ( getNumNodesInput <= 0 ) { return nodes_input ; } if ( getNumNodesOutput <= 0 ) { return nodes_output ; } if ( getNumNodesInput != nodes_input ) { return - 1 ; } if ( getNumNodesOutput != nodes_output ) { return - 2 ; } vt = new double [ nodes_input + nodes_input_bias ] ; vt1 = new double [ nodes_hidden + nodes_hidden_bias ] ; rcheck = new int [ width ] ; for ( int x = 0 ; x < width ; x ++ ) { rcheck [ x ] = 0 ; if ( ( a [ x ] ) < 0.0F ) { rcheck [ x ] = 1 ; } a [ x ] = 1.0F ; } for ( int x = 0 ; x < width ; x ++ ) { if ( ( mask [ x ] ) == 0 ) { if ( ( rcheck [ x ] ) != 0 ) { for ( int i = 0 ; ( i < nodes_input ) && ( ( a [ x ] ) > 0.0F ) ; i ++ ) { if ( ( ( in [ i ] [ x ] ) < ( ( float ) ( NN_General . NODES_INPUT_SCALE_LIMITS [ i ] [ 0 ] ) ) ) || ( ( in [ i ] [ x ] ) > ( ( float ) ( NN_General . NODES_INPUT_SCALE_LIMITS [ i ] [ 1 ] ) ) ) ) { a [ x ] -= 3.0F ; } } if ( ( a [ x ] ) < 0.0F ) { mask [ x ] |= errmask ; } } for ( int i = 0 ; i < nodes_input ; i ++ ) { if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ i ] ) == ( - 1 ) ) { in [ i ] [ x ] = ( ( float ) ( java . lang . Math . log ( ( ( double ) ( in [ i ] [ x ] ) ) ) ) ) ; } if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ i ] ) == ( - 2 ) ) { in [ i ] [ x ] = ( ( float ) ( java . lang . Math . exp ( ( ( double ) ( in [ i ] [ x ] ) ) ) ) ) ; } } for ( int i = 0 ; i < nodes_input ; i ++ ) { in [ i ] [ x ] = ( ( float ) ( NN_General . NODES_INPUT_SCALE_OFF [ i ] ) ) + ( ( ( in [ i ] [ x ] ) - ( ( float ) ( org . esa . s3tbx . fub . wew . util . NN_YellowSubstance . nodes_input_scale_run38 [ i ] [ 0 ] ) ) ) / ( ( float ) ( org . esa . s3tbx . fub . wew . util . NN_YellowSubstance . nodes_input_scale_run38 [ i ] [ 1 ] ) ) ) ; } if ( nodes_input_pca != 0 ) { for ( int i = 0 ; i < nodes_input ; i ++ ) { vt [ i ] = ( ( double ) ( in [ i ] [ x ] ) ) ; if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ i ] ) == 1 ) { vt [ i ] = 0.0 ; for ( int j = 0 ; j < nodes_input ; j ++ ) { if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ j ] ) == 1 ) { vt [ i ] += ( ( double ) ( in [ j ] [ x ] ) ) * ( org . esa . s3tbx . fub . wew . util . NN_YellowSubstance . nodes_input_pca_evec_run38 [ j ] [ i ] ) ; } } } } for ( int i = 0 ; i < nodes_input ; i ++ ) { in [ i ] [ x ] = ( ( float ) ( vt [ i ] ) ) ; } } for ( int i = 0 ; i < nodes_input ; i ++ ) { vt [ i ] = ( ( double ) ( in [ i ] [ x ] ) ) ; } for ( int i = nodes_input ; i < ( nodes_input + nodes_input_bias ) ; i ++ ) { vt [ i ] = 1.0 ; } for ( int i = 0 ; i < nodes_hidden ; i ++ ) { vt1 [ i ] = 0.0 ; for ( int j = 0 ; j < ( nodes_input + nodes_input_bias ) ; j ++ ) { vt1 [ i ] += ( vt [ j ] ) * ( org . esa . s3tbx . fub . wew .
org . junit . Assert . assertEquals ( ( - 1 ) , checkOutputNode )
testForwardRequestInClientInterceptor ( ) { ForwardInterceptor . protocols = new org . omg . RTCORBA . Protocol [ ] { new org . omg . RTCORBA . Protocol ( new org . jacorb . test . orb . etf . wiop . WIOPFactories ( ) . profile_tag ( ) , null , null ) } ; server . ping ( ) ; "<AssertPlaceHolder>" ; } isTransportInUse ( ) { return org . jacorb . test . orb . etf . wiop . WIOPFactories . transportInUse ; }
org . junit . Assert . assertTrue ( org . jacorb . test . orb . etf . wiop . WIOPFactories . isTransportInUse ( ) )
testValideerNietIngeschreven ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoonView = maakHuidigeSituatie ( SoortPersoon . NIET_INGESCHREVENE ) ; final nl . bzk . brp . business . regels . context . HuidigeSituatieRegelContext context = new nl . bzk . brp . business . regels . context . HuidigeSituatieRegelContext ( persoonView ) ; final boolean resultaat = brlv0006 . valideer ( context ) ; "<AssertPlaceHolder>" ; } valideer ( nl . bzk . brp . model . logisch . kern . Actie ) { final java . util . List < nl . bzk . brp . bijhouding . business . stappen . resultaat . ResultaatMelding > resultaatMeldingen = new java . util . ArrayList ( ) ; final javax . validation . Validator validator = javax . validation . Validation . buildDefaultValidatorFactory ( ) . getValidator ( ) ; final java . util . Set < javax . validation . ConstraintViolation < nl . bzk . brp . model . logisch . kern . Actie > > violations = validator . validate ( actie , javax . validation . groups . Default . class ) ; for ( final javax . validation . ConstraintViolation < nl . bzk . brp . model . logisch . kern . Actie > violation : violations ) { final nl . bzk . brp . model . algemeen . stamgegeven . kern . Regel regel = ( ( nl . bzk . brp . model . algemeen . stamgegeven . kern . Regel ) ( violation . getConstraintDescriptor ( ) . getAttributes ( ) . get ( nl . bzk . brp . bijhouding . business . stappen . bijhouding . BijhoudingGegevensValidatieStap . CONSTRAINT_CODE ) ) ) ; final nl . bzk . brp . model . basis . BerichtEntiteit objectDatDeRegelOvertreedt = bepaalBerichtEntiteitDieDeRegelOvertreedt ( violation ) ; final nl . bzk . brp . model . algemeen . stamgegeven . kern . DatabaseObjectKern databaseObject = ( ( nl . bzk . brp . model . algemeen . stamgegeven . kern . DatabaseObjectKern ) ( violation . getConstraintDescriptor ( ) . getAttributes ( ) . get ( nl . bzk . brp . bijhouding . business . stappen . bijhouding . BijhoudingGegevensValidatieStap . CONSTRAINT_DATABASEOBJECT ) ) ) ; final nl . bzk . brp . bijhouding . business . stappen . resultaat . ResultaatMelding toegevoegdeMelding = meldingFactory . maakResultaatMelding ( regel , objectDatDeRegelOvertreedt , databaseObject , getAttribuutNaam ( violation ) ) ; resultaatMeldingen . add ( toegevoegdeMelding ) ; } return resultaatMeldingen ; }
org . junit . Assert . assertFalse ( resultaat )
testGetVar ( ) { final java . lang . String dbName = ( ( ( "schema" + ( org . xenei . jdbc4sparql . impl . NameUtils . SPARQL_DOT ) ) + "table" ) + ( org . xenei . jdbc4sparql . impl . NameUtils . SPARQL_DOT ) ) + "column" ; final com . hp . hpl . jena . sparql . core . Var v = columnInfo . getVar ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( dbName , v . getName ( ) )
testToThriftType ( ) { final org . apache . parquet . thrift . struct . ThriftType . StructType converted = org . apache . parquet . thrift . ThriftSchemaConverter . toStructType ( com . twitter . data . proto . tutorial . thrift . AddressBook . class ) ; final java . lang . String json = converted . toJSON ( ) ; final org . apache . parquet . thrift . struct . ThriftType fromJSON = org . apache . parquet . thrift . struct . ThriftType . StructType . fromJSON ( json ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { return org . apache . parquet . thrift . struct . JSON . toJSON ( this ) ; }
org . junit . Assert . assertEquals ( json , fromJSON . toJSON ( ) )
itAllowsWorkerToServiceTransitionIfNotLoadBalanced ( ) { com . hubspot . singularity . SingularityRequest request = new com . hubspot . singularity . SingularityRequestBuilder ( "test" , com . hubspot . singularity . RequestType . WORKER ) . build ( ) ; com . hubspot . singularity . SingularityRequest newRequest = new com . hubspot . singularity . SingularityRequestBuilder ( "test" , com . hubspot . singularity . RequestType . SERVICE ) . build ( ) ; com . hubspot . singularity . SingularityRequest result = validator . checkSingularityRequest ( newRequest , com . google . common . base . Optional . of ( request ) , com . google . common . base . Optional . absent ( ) , com . google . common . base . Optional . absent ( ) ) ; "<AssertPlaceHolder>" ; } getRequestType ( ) { return requestType ; }
org . junit . Assert . assertEquals ( newRequest . getRequestType ( ) , result . getRequestType ( ) )
testIsCheckerDisabledWhenSettingUserToForbiddenRole ( ) { com . liferay . portal . kernel . model . User user = com . liferay . portal . kernel . test . util . UserTestUtil . addUser ( ) ; com . liferay . portlet . sites . search . UserGroupRoleRoleChecker userGroupRoleRoleChecker = new com . liferay . portlet . sites . search . UserGroupRoleRoleChecker ( com . liferay . portal . security . membership . policy . site . test . SiteMembershipPolicyRowCheckerTest . _renderResponse , user , group ) ; com . liferay . portal . kernel . model . Role role = com . liferay . portal . kernel . service . RoleLocalServiceUtil . getRole ( addForbiddenRoles ( ) [ 0 ] ) ; "<AssertPlaceHolder>" ; } isDisabled ( java . lang . Object ) { com . liferay . portal . kernel . model . UserNotificationEvent userNotificationEvent = ( ( com . liferay . portal . kernel . model . UserNotificationEvent ) ( obj ) ) ; if ( userNotificationEvent . isActionRequired ( ) ) { return true ; } return super . isDisabled ( obj ) ; }
org . junit . Assert . assertTrue ( userGroupRoleRoleChecker . isDisabled ( role ) )
testSubList ( ) { java . util . List < java . lang . String > subList = getCollection ( ) . subList ( 0 , 0 ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return false ; }
org . junit . Assert . assertTrue ( subList . isEmpty ( ) )
shouldConnectWithDefault ( ) { final java . nio . channels . ServerSocketChannel serverSocketChannel = java . nio . channels . ServerSocketChannel . open ( ) ; try { serverSocketChannel . bind ( new java . net . InetSocketAddress ( kieker . monitoring . writer . tcp . SingleSocketTcpWriterTest . HOSTNAME , kieker . monitoring . writer . tcp . SingleSocketTcpWriterTest . PORT ) ) ; serverSocketChannel . configureBlocking ( false ) ; serverSocketChannel . accept ( ) ; final kieker . monitoring . writer . tcp . SingleSocketTcpWriter writer = new kieker . monitoring . writer . tcp . SingleSocketTcpWriter ( this . configuration ) ; try { writer . onStarting ( ) ; } finally { writer . onTerminating ( ) ; } } finally { serverSocketChannel . close ( ) ; } "<AssertPlaceHolder>" ; } close ( ) { this . writer . close ( ) ; }
org . junit . Assert . assertTrue ( true )
toSimpleValue_emptyNS ( ) { java . util . Set < java . math . BigDecimal > numset = software . amazon . awssdk . services . dynamodb . document . internal . InternalUtils . toSimpleValue ( software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . ns ( new java . util . ArrayList < java . lang . String > ( ) ) . build ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( numset . size ( ) ) == 0 ) )
testMillisSerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . LocalDateTime . class , TimestampFormat . MILLIS ) ; java . lang . Long millis = 4534654564653L ; java . time . LocalDateTime dt = java . time . LocalDateTime . ofInstant ( java . time . Instant . ofEpochMilli ( millis ) , defaultZoneId ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . owlike . genson . ext . jsr353 . JSR353Bundle . toString ( this ) ; }
org . junit . Assert . assertEquals ( millis . toString ( ) , genson . serialize ( dt ) )
testWithSimpleGraph ( ) { org . apache . flink . graph . library . clustering . undirected . TriadicCensus . Result expectedResult = new org . apache . flink . graph . library . clustering . undirected . TriadicCensus . Result ( 3 , 8 , 7 , 2 ) ; org . apache . flink . graph . library . clustering . undirected . TriadicCensus . Result triadCensus = new org . apache . flink . graph . library . clustering . undirected . TriadicCensus < org . apache . flink . types . IntValue , org . apache . flink . types . NullValue , org . apache . flink . types . NullValue > ( ) . run ( undirectedSimpleGraph ) . execute ( ) ; "<AssertPlaceHolder>" ; } execute ( ) { return execute ( org . apache . flink . streaming . api . environment . StreamExecutionEnvironment . DEFAULT_JOB_NAME ) ; }
org . junit . Assert . assertEquals ( expectedResult , triadCensus )
hetero ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getAtomExpr ( "[#X]" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . IS_HETERO ) ; "<AssertPlaceHolder>" ; } expr ( org . openscience . cdk . isomorphism . matchers . Expr$Type ) { return new org . openscience . cdk . isomorphism . matchers . Expr ( type ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
createDynamicModule ( ) { de . devsurf . injection . guice . scanner . StartupModule startup = de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de . devsurf . injection . guice . test . configuration . file . FileConfigTests . class ) ) ; startup . addFeature ( de . devsurf . injection . guice . configuration . features . ConfigurationFeature . class ) ; com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( startup ) ; "<AssertPlaceHolder>" ; } addFeature ( de . devsurf . injection . guice . scanner . features . ScannerFeature ) { _collector . addScannerFeature ( listener ) ; }
org . junit . Assert . assertNotNull ( injector )
getSinkComponentStats ( ) { final com . hortonworks . streamline . streams . layout . component . TopologyLayout topology = getTopologyLayoutForTest ( ) ; final long from = 1L ; final long to = 3L ; final com . hortonworks . streamline . streams . metrics . topology . TopologyTimeSeriesMetrics . TimeSeriesComponentMetric expectedMetric = setupExpectionToBoltComponent ( sink , from , to ) ; com . hortonworks . streamline . streams . metrics . topology . TopologyTimeSeriesMetrics . TimeSeriesComponentMetric actual = stormTopologyTimeSeriesMetrics . getComponentStats ( topology , sink , from , to , null ) ; "<AssertPlaceHolder>" ; } getComponentStats ( java . lang . Long , java . lang . Long , java . lang . Long , java . lang . Long , javax . ws . rs . core . SecurityContext ) { com . hortonworks . streamline . streams . security . SecurityUtil . checkRoleOrPermissions ( authorizer , securityContext , Roles . ROLE_TOPOLOGY_USER , Topology . NAMESPACE , id , com . hortonworks . streamline . streams . service . READ ) ; assertTimeRange ( from , to ) ; com . hortonworks . streamline . streams . catalog . Topology topology = catalogService . getTopology ( id ) ; com . hortonworks . streamline . streams . catalog . TopologyComponent topologyComponent = catalogService . getTopologyComponent ( id , topologyComponentId ) ; if ( ( topology != null ) && ( topologyComponent != null ) ) { java . lang . String asUser = com . hortonworks . streamline . common . util . WSUtils . getUserFromSecurityContext ( securityContext ) ; com . hortonworks . streamline . streams . metrics . topology . TopologyTimeSeriesMetrics . TimeSeriesComponentMetric metrics = metricsService . getComponentStats ( topology , topologyComponent , from , to , asUser ) ; return com . hortonworks . streamline . common . util . WSUtils . respondEntity ( metrics , Status . OK ) ; } else if ( topology == null ) { throw com . hortonworks . streamline . common . exception . service . exception . request . EntityNotFoundException . byId ( ( "Topology:<sp>" + ( id . toString ( ) ) ) ) ; } else { throw com . hortonworks . streamline . common . exception . service . exception . request . EntityNotFoundException . byId ( ( "TopologyComponent:<sp>" + ( id . toString ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( expectedMetric , actual )
testGetFieldValue ( ) { java . lang . Object value = org . axonframework . common . ReflectionUtils . ReflectionUtils . getFieldValue ( org . axonframework . common . ReflectionUtilsTest . SomeType . class . getDeclaredField ( "field1" ) , new org . axonframework . common . ReflectionUtilsTest . SomeSubType ( ) ) ; "<AssertPlaceHolder>" ; } getFieldValue ( org . axonframework . common . Field , java . lang . Object ) { org . axonframework . common . ReflectionUtils . ensureAccessible ( field ) ; try { return ( ( R ) ( field . get ( object ) ) ) ; } catch ( java . lang . IllegalArgumentException | java . lang . IllegalAccessException ex ) { throw new java . lang . IllegalStateException ( "Unable<sp>to<sp>access<sp>field<sp>for<sp>getting." , ex ) ; } }
org . junit . Assert . assertEquals ( "field1" , value )
shouldWriteByte ( ) { for ( int i = 0 ; i < ( buffer . size ( ) ) ; i ++ ) { buffer . putByte ( i , ( ( byte ) ( ( 1 << i ) + i ) ) ) ; } for ( int i = 0 ; i < ( buffer . size ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getByte ( int ) { offset = checkBounds ( offset , 1 ) ; return buffer [ offset ] ; }
org . junit . Assert . assertEquals ( ( ( byte ) ( ( 1 << i ) + i ) ) , buffer . getByte ( i ) )
shutdownNowIgnoreCanceledFuturesTest ( ) { org . threadly . concurrent . SingleThreadScheduler sts = new org . threadly . concurrent . SingleThreadScheduler ( ) ; try { java . lang . Runnable nonCanceledRunnable = new org . threadly . test . concurrent . TestRunnable ( ) ; sts . submitScheduled ( nonCanceledRunnable , ( ( 1000 * 60 ) * 60 ) ) ; org . threadly . concurrent . future . ListenableFuture < ? > future = sts . submitScheduled ( org . threadly . concurrent . DoNothingRunnable . instance ( ) , ( ( 1000 * 60 ) * 60 ) ) ; future . cancel ( false ) ; java . util . List < java . lang . Runnable > result = sts . shutdownNow ( ) ; "<AssertPlaceHolder>" ; } finally { sts . shutdown ( ) ; } } size ( ) { return currentData . size ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
testSubsystemManifestEquality ( ) { org . apache . aries . subsystem . core . archive . SubsystemManifest subsystemManifest1 = new org . apache . aries . subsystem . core . archive . SubsystemManifest ( getClass ( ) . getResourceAsStream ( "/files/SUBSYSTEM.MF.1" ) ) ; org . apache . aries . subsystem . core . archive . SubsystemManifest subsystemManifest2 = new org . apache . aries . subsystem . core . archive . SubsystemManifest ( getClass ( ) . getResourceAsStream ( "/files/SUBSYSTEM.MF.2" ) ) ; "<AssertPlaceHolder>" ; } getResourceAsStream ( java . lang . String ) { java . net . URL url = getResource ( name ) ; if ( url == null ) { if ( ( ( org . apache . aries . proxy . impl . SystemModuleClassLoader . method_Class_getModule ) == null ) || ( ( org . apache . aries . proxy . impl . SystemModuleClassLoader . method_Module_getResourceAsStream ) == null ) ) { return null ; } try { java . lang . String className = name . replace ( '/' , '.' ) ; int lastDot = className . lastIndexOf ( '.' ) ; className = className . substring ( 0 , lastDot ) ; final java . lang . Class < ? > clazz = java . lang . Class . forName ( className , false , this ) ; final java . lang . Object module = org . apache . aries . proxy . impl . SystemModuleClassLoader . method_Class_getModule . invoke ( clazz ) ; return ( ( java . io . InputStream ) ( org . apache . aries . proxy . impl . SystemModuleClassLoader . method_Module_getResourceAsStream . invoke ( module , name ) ) ) ; } catch ( java . lang . Exception e ) { return null ; } } else { try { return url . openStream ( ) ; } catch ( java . io . IOException e ) { return null ; } } }
org . junit . Assert . assertEquals ( subsystemManifest1 , subsystemManifest2 )
equals_otherClass ( ) { final net . sf . qualitycheck . immutableobject . domain . Type a = new net . sf . qualitycheck . immutableobject . domain . Type ( java . lang . String . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final net . sf . qualitycheck . ConditionalCheckTest . NotEqual other = ( ( net . sf . qualitycheck . ConditionalCheckTest . NotEqual ) ( obj ) ) ; if ( ( value ) != ( other . value ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( a . equals ( "" ) )
testSplitByMaterialGroupWithoutMaterial ( ) { de . javagl . obj . Obj obj = de . javagl . obj . ObjReader . read ( getClass ( ) . getResourceAsStream ( "/square.obj" ) ) ; java . util . Map < java . lang . String , de . javagl . obj . Obj > objs = de . javagl . obj . ObjSplitting . splitByMaterialGroups ( obj ) ; "<AssertPlaceHolder>" ; } splitByMaterialGroups ( de . javagl . obj . ReadableObj ) { java . util . Map < java . lang . String , de . javagl . obj . Obj > objs = new java . util . LinkedHashMap < java . lang . String , de . javagl . obj . Obj > ( ) ; int numMaterialGroups = obj . getNumMaterialGroups ( ) ; for ( int i = 0 ; i < numMaterialGroups ; i ++ ) { de . javagl . obj . ObjGroup materialGroup = obj . getMaterialGroup ( i ) ; if ( ( materialGroup . getNumFaces ( ) ) > 0 ) { java . lang . String materialGroupName = materialGroup . getName ( ) ; de . javagl . obj . Obj materialGroupObj = de . javagl . obj . ObjUtils . groupToObj ( obj , materialGroup , null ) ; objs . put ( materialGroupName , materialGroupObj ) ; } } return objs ; }
org . junit . Assert . assertEquals ( 0 , objs . size ( ) )
resolveSpacingBeforeIs0 ( ) { parent . addChild ( second ) ; first . getCSS ( ) . put ( "margin-bottom" , "35pt" ) ; second . getCSS ( ) . put ( "margin-top" , "30pt" ) ; applier . apply ( firstPara , first , configuration ) ; applier . apply ( secondPara , second , configuration ) ; "<AssertPlaceHolder>" ; } getSpacingBefore ( ) { return spacingBefore ; }
org . junit . Assert . assertEquals ( 0 , secondPara . getSpacingBefore ( ) , 0 )
moveDownWithFocus ( ) { org . pdfsam . ui . selection . multiple . move . MultipleSelectionAndFocus victim = new org . pdfsam . ui . selection . multiple . move . MultipleSelectionAndFocus ( 5 ) ; victim . moveDown ( 4 ) ; victim . moveDown ( 5 ) ; "<AssertPlaceHolder>" ; } getFocus ( ) { return row ; }
org . junit . Assert . assertEquals ( 6 , victim . getFocus ( ) )
lijstControleEenNok ( ) { setup ( java . util . Collections . emptyList ( ) , true , true , false , true , true , true , true , true , true ) ; "<AssertPlaceHolder>" ; } setup ( java . util . List , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) { org . mockito . Mockito . when ( plZoekerOpAnummerEnNietFoutiefOpgeschortObvActueelAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerOpAnummerEnNietFoutiefOpgeschortObvActueelAnummerResult ) ; org . mockito . Mockito . when ( plControleGevondenBlokkeringssituatieIsJuist . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleBijhoudingssituatie ) ; org . mockito . Mockito . when ( verzoekControleBerichtVanSoortLg01 . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . bericht . model . sync . impl . SynchroniseerNaarBrpVerzoekBericht . class ) ) ) . thenReturn ( controleBerichtVanSoortLg01 ) ; org . mockito . Mockito . when ( lijstControleEen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleEenResult ) ; org . mockito . Mockito . when ( plControleVorigAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleVorigAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleHistorieAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleHistorieAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleDezelfdePersoon . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleDezelfdePersoonResult ) ; org . mockito . Mockito . when ( plControleGevondenVersienummerGroter . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleGevondenVersienummerGroterResult ) ; org . mockito . Mockito . when ( plControleGevondenDatumtijdstempelNieuwer . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleGevondenDatumtijdstempelNieuwerResult ) ; org . mockito . Mockito . when ( plControleAangebodenAdressenKomenVoorInGevondenAdressen . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleAangebodenAdressenKomenVoorInGevondenAdressenResult ) ; }
org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
createTimerWithPeriod_billingInvocationNotCreated ( ) { prepareTimerList ( TimerType . BILLING_INVOCATION , new java . util . Date ( ( ( java . lang . System . currentTimeMillis ( ) ) + 10000 ) ) ) ; tm . createTimerWithPeriod ( tss , TimerType . BILLING_INVOCATION , 0L , Period . DAY ) ; "<AssertPlaceHolder>" ; } getTimers ( ) { return java . util . Collections . emptyList ( ) ; }
org . junit . Assert . assertEquals ( 1 , tss . getTimers ( ) . size ( ) )
testIWalsh ( ) { int [ ] input = new int [ ] { 2515 , - 414 , - 922 , - 937 , 674 , - 878 , 1077 , - 473 , - 473 , 615 , - 878 , 1136 , - 937 , - 1384 , - 414 , - 3871 } ; int [ ] output = new int [ ] { - 696 , 625 , 104 , 856 , 856 , 163 , 625 , 655 , - 896 , 856 , - 128 , 856 , 856 , 336 , 856 , - 896 } ; org . jcodec . codecs . vpx . VPXDCT . iwalsh4x4 ( input ) ; "<AssertPlaceHolder>" ; } iwalsh4x4 ( int [ ] ) { for ( int i = 0 ; i < 4 ; i ++ ) { int a1 = ( coef [ i ] ) + ( coef [ ( i + 12 ) ] ) ; int b1 = ( coef [ ( i + 4 ) ] ) + ( coef [ ( i + 8 ) ] ) ; int c1 = ( coef [ ( i + 4 ) ] ) - ( coef [ ( i + 8 ) ] ) ; int d1 = ( coef [ i ] ) - ( coef [ ( i + 12 ) ] ) ; coef [ i ] = a1 + b1 ; coef [ ( i + 4 ) ] = c1 + d1 ; coef [ ( i + 8 ) ] = a1 - b1 ; coef [ ( i + 12 ) ] = d1 - c1 ; } for ( int i = 0 ; i < 16 ; i += 4 ) { int a1 = ( coef [ i ] ) + ( coef [ ( i + 3 ) ] ) ; int b1 = ( coef [ ( i + 1 ) ] ) + ( coef [ ( i + 2 ) ] ) ; int c1 = ( coef [ ( i + 1 ) ] ) - ( coef [ ( i + 2 ) ] ) ; int d1 = ( coef [ i ] ) - ( coef [ ( i + 3 ) ] ) ; int a2 = a1 + b1 ; int b2 = c1 + d1 ; int c2 = a1 - b1 ; int d2 = d1 - c1 ; coef [ i ] = ( a2 + 3 ) > > 3 ; coef [ ( i + 1 ) ] = ( b2 + 3 ) > > 3 ; coef [ ( i + 2 ) ] = ( c2 + 3 ) > > 3 ; coef [ ( i + 3 ) ] = ( d2 + 3 ) > > 3 ; } }
org . junit . Assert . assertArrayEquals ( output , input )
testCreatesRemoteObjectOnInitialization ( ) { com . eclipsesource . tabris . internal . CloudPushImpl cloudPush = new com . eclipsesource . tabris . internal . CloudPushImpl ( ) ; org . eclipse . rap . rwt . remote . RemoteObject remoteObject = cloudPush . getRemoteObject ( ) ; org . eclipse . rap . rwt . remote . RemoteObject remoteObject2 = cloudPush . getRemoteObject ( ) ; "<AssertPlaceHolder>" ; } getRemoteObject ( ) { return org . eclipse . rap . rwt . RWT . getUISession ( ) . getConnection ( ) . createRemoteObject ( "foo" ) ; }
org . junit . Assert . assertSame ( remoteObject , remoteObject2 )
testSubtraction ( ) { org . apache . commons . math . analysis . polynomials . PolynomialFunction p1 = new org . apache . commons . math . analysis . polynomials . PolynomialFunction ( new double [ ] { - 2 , 1 } ) ; checkNullPolynomial ( p1 . subtract ( p1 ) ) ; org . apache . commons . math . analysis . polynomials . PolynomialFunction p2 = new org . apache . commons . math . analysis . polynomials . PolynomialFunction ( new double [ ] { - 2 , 6 } ) ; p2 = p2 . subtract ( p1 ) ; checkPolynomial ( p2 , "5<sp>x" ) ; p1 = new org . apache . commons . math . analysis . polynomials . PolynomialFunction ( new double [ ] { 1 , - 4 , 2 } ) ; p2 = new org . apache . commons . math . analysis . polynomials . PolynomialFunction ( new double [ ] { - 1 , 3 , 2 } ) ; p1 = p1 . subtract ( p2 ) ; "<AssertPlaceHolder>" ; checkPolynomial ( p1 , "2<sp>-<sp>7<sp>x" ) ; } degree ( ) { return ( coefficients . length ) - 1 ; }
org . junit . Assert . assertEquals ( 1 , p1 . degree ( ) )
isDefinedInContextWhereDefinedForRelationAndContextIdNotMatchesPropertyContextShouldReturnFalse ( ) { java . lang . Integer propertyContextId = 1 ; java . lang . Integer otherContextId = 555 ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin loadedFor = ResourceEditProperty . Origin . RELATION ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . Origin origin = ResourceEditProperty . Origin . RELATION ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withLoadedFor ( loadedFor ) . withOrigin ( origin ) . withPropContextId ( propertyContextId ) . build ( ) ; resourceEditProperty . setDefinedOnSuperResourceType ( false ) ; boolean definedInContext = resourceEditProperty . isDefinedInContext ( otherContextId ) ; "<AssertPlaceHolder>" ; } isDefinedInContext ( java . lang . Integer ) { if ( definedOnSuperResourceType ) { return false ; } switch ( loadedFor ) { case INSTANCE : case RELATION : return ( ( ( this . propContextId ) != null ) && ( this . propContextId . equals ( contextId ) ) ) && ( ( origin ) == ( loadedFor ) ) ; case TYPE : case TYPE_REL : return ( ( ( this . typeContextId ) != null ) && ( this . typeContextId . equals ( contextId ) ) ) && ( ( origin ) == ( loadedFor ) ) ; } return false ; }
org . junit . Assert . assertFalse ( definedInContext )
testIdentityTransformation ( ) { java . lang . String sql = "TEST(a,<sp>TEST(b,<sp>TEST(c),<sp>d))" ; com . liferay . portal . internal . dao . sql . transformer . SQLFunctionTransformer sqlFunctionTransformer = new com . liferay . portal . internal . dao . sql . transformer . SQLFunctionTransformer ( "TEST(" , "TEST(" , "," , ")" ) ; "<AssertPlaceHolder>" ; } transform ( java . lang . String ) { if ( html == null ) { return null ; } if ( ( ! ( html . contains ( "<img" ) ) ) || ( ! ( html . contains ( "/documents/" ) ) ) ) { return html ; } return super . transform ( html ) ; }
org . junit . Assert . assertEquals ( sql , sqlFunctionTransformer . transform ( sql ) )
testfromHeaderIfCompatibleWithAcceptHeader_incompatible ( ) { org . springframework . http . HttpHeaders headers = new org . springframework . http . HttpHeaders ( ) ; java . util . List < org . springframework . http . MediaType > mediaTypes = new java . util . ArrayList ( 3 ) ; mediaTypes . add ( new org . springframework . http . MediaType ( "application" , "*" ) ) ; headers . setAccept ( mediaTypes ) ; headers . setIfNoneMatch ( "\"1<sp>text/html" ) ; won . protocol . rest . WonEtagHelper helper = won . protocol . rest . WonEtagHelper . fromHeaderIfCompatibleWithAcceptHeader ( headers ) ; "<AssertPlaceHolder>" ; } fromHeaderIfCompatibleWithAcceptHeader ( org . springframework . http . HttpHeaders ) { won . protocol . rest . WonEtagHelper helper = won . protocol . rest . WonEtagHelper . fromIfNoneMatchHeader ( headers ) ; if ( ( helper == null ) || ( ( helper . getMediaType ( ) ) == null ) ) { return null ; } if ( headers . getAccept ( ) . stream ( ) . anyMatch ( ( m ) -> m . isCompatibleWith ( helper . getMediaType ( ) ) ) ) { return helper ; } return null ; }
org . junit . Assert . assertNull ( helper )
mergeAttributesOnRootNode ( ) { org . apache . maven . shared . utils . xml . Xpp3Dom t1 = org . apache . maven . shared . utils . xml . pull . Xpp3DomTest . build ( "<root<sp>combine.self='merge'<sp>attr='value'/>" ) ; org . apache . maven . shared . utils . xml . Xpp3Dom t2 = org . apache . maven . shared . utils . xml . pull . Xpp3DomTest . build ( "<root<sp>attr2='value2'/>" ) ; org . apache . maven . shared . utils . xml . Xpp3Dom dom = org . apache . maven . shared . utils . xml . Xpp3Dom . mergeXpp3Dom ( t1 , t2 ) ; "<AssertPlaceHolder>" ; } getAttributeNames ( ) { boolean isNothing = ( ( attributes ) == null ) || ( attributes . isEmpty ( ) ) ; return isNothing ? org . apache . maven . shared . utils . xml . Xpp3Dom . EMPTY_STRING_ARRAY : attributes . keySet ( ) . toArray ( new java . lang . String [ attributes . size ( ) ] ) ; }
org . junit . Assert . assertEquals ( 3 , dom . getAttributeNames ( ) . length )
testProcessServices_multipleProjects ( ) { java . util . List < java . nio . file . Path > userConfiguredServices = com . google . common . collect . ImmutableList . of ( com . google . cloud . tools . maven . run . RunnerTest . STANDARD_PROJECT_WEBAPP , com . google . cloud . tools . maven . run . RunnerTest . STANDARD_PROJECT_WEBAPP2 ) ; when ( runMojo . getServices ( ) ) . thenReturn ( userConfiguredServices ) ; java . util . List < java . nio . file . Path > processedServices = testRunner . processServices ( ) ; "<AssertPlaceHolder>" ; } processServices ( ) { java . nio . file . Path appDir = getAppDir ( ) ; java . util . List < java . nio . file . Path > services = runMojo . getServices ( ) ; if ( ( services == null ) || ( services . isEmpty ( ) ) ) { return java . util . Collections . singletonList ( appDir ) ; } for ( java . nio . file . Path service : services ) { if ( ! ( java . nio . file . Files . exists ( service . resolve ( "WEB-INF" ) . resolve ( "appengine-web.xml" ) ) ) ) { throw new org . apache . maven . plugin . MojoExecutionException ( com . google . cloud . tools . maven . run . Runner . NON_STANDARD_APPLICATION_ERROR ) ; } } return services ; }
org . junit . Assert . assertEquals ( userConfiguredServices , processedServices )
shouldGetFullLoadBalancerListFromNodeAddress ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
shouldChangeZoneId ( ) { java . time . ZoneId zoneId = java . time . ZoneId . of ( "GMT" ) ; entry . setZoneId ( zoneId ) ; "<AssertPlaceHolder>" ; } getZoneId ( ) { return zoneIdProperty ( ) . get ( ) ; }
org . junit . Assert . assertThat ( entry . getZoneId ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( zoneId ) ) )
example03 ( ) { "<AssertPlaceHolder>" ; } example03 ( ) { org . junit . Assert . assertEquals ( 4.8989F , org . simmetrics . example . StringDistanceExample . example03 ( ) , org . simmetrics . example . StringDistanceExampleTest . DELTA ) ; }
org . junit . Assert . assertEquals ( 4.8989F , org . simmetrics . example . StringDistanceExample . example03 ( ) , org . simmetrics . example . StringDistanceExampleTest . DELTA )
testImportMapped ( ) { final java . net . URI sourceURI = java . net . URI . create ( "http://localhost:8080/rest/dev/asdf" ) ; final java . net . URI resourceURI = java . net . URI . create ( ( ( serverAddress ) + "prod/asdf" ) ) ; final org . fcrepo . importexport . common . Config config = new org . fcrepo . importexport . common . Config ( ) ; config . setMode ( "import" ) ; config . setBaseDirectory ( ( ( TARGET_DIR ) + "/test-classes/sample/mapped" ) ) ; config . setResource ( resourceURI . toString ( ) ) ; config . setMap ( new java . lang . String [ ] { sourceURI . toString ( ) , ( serverAddress ) + "prod/asdf" } ) ; config . setUsername ( org . fcrepo . importexport . integration . USERNAME ) ; config . setPassword ( org . fcrepo . importexport . integration . PASSWORD ) ; final org . fcrepo . importexport . importer . Importer importer = new org . fcrepo . importexport . importer . Importer ( config , clientBuilder ) ; importer . run ( ) ; "<AssertPlaceHolder>" ; } resourceExists ( java . net . URI ) { final org . fcrepo . client . FcrepoResponse response = clientBuilder . build ( ) . head ( uri ) . perform ( ) ; return ( response . getStatusCode ( ) ) == 200 ; }
org . junit . Assert . assertTrue ( resourceExists ( resourceURI ) )
testOffer ( ) { es . usc . citius . lab . hipster . collections . HashQueue < java . lang . String > queue = new es . usc . citius . lab . hipster . collections . HashQueue < java . lang . String > ( ) ; queue . offer ( "element" ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , queue . size ( ) )
entityMediaWithMetadataFull ( ) { final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerv01Test . entityContainer . getEntitySet ( "ESMedia" ) ; final org . apache . olingo . commons . api . data . Entity entity = data . readAll ( edmEntitySet ) . getEntities ( ) . get ( 0 ) ; entity . setMediaETag ( "W/\\\"08D25949E3BFB7AB\\\"" ) ; java . io . InputStream result = serializerFullMetadata . entity ( org . apache . olingo . server . core . serializer . json . ODataJsonSerializerv01Test . metadata , edmEntitySet . getEntityType ( ) , entity , org . apache . olingo . server . api . serializer . EntitySerializerOptions . with ( ) . contextURL ( org . apache . olingo . commons . api . data . ContextURL . with ( ) . entitySet ( edmEntitySet ) . suffix ( Suffix . ENTITY ) . build ( ) ) . build ( ) ) . getContent ( ) ; final java . lang . String resultString = org . apache . commons . io . IOUtils . toString ( result ) ; final java . lang . String expectedResult = "{\"@context\",\"0$metadata#ESMedia/$entity\"," + ( ( ( ( "\"@metadataEtag\":\"W/\\\"metadataETag\\\"\"," + "\"@mediaEtag\",\"0W/\\\\\\\"08D25949E3BFB7AB\\\\\\\"\",\"@mediaContentType\",\"0image/svg+xml\"," ) + "\"@mediaEditLink\",\"0ESMedia(1)/$value\"," ) + "\"@type\",\"0#olingo.odata.test1.ETMedia\",\"@id\",\"0ESMedia(1)\"," ) + "\"PropertyInt16@type\",\"0#Int16\",\"PropertyInt16\":1}" ) ; "<AssertPlaceHolder>" ; } toString ( boolean ) { return getSegmentValue ( includeFilters ) ; }
org . junit . Assert . assertEquals ( expectedResult , resultString )
basicShortStringLiteralBsTest ( ) { final org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bs = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; bs . addBinding ( "X" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createLiteral ( "literal1" ) ) ; bs . addBinding ( "Y" , org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializerTest . VF . createLiteral ( "literal2" ) ) ; final org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder varOrder = new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "X" , "Y" ) ; org . apache . rya . indexing . pcj . storage . accumulo . BindingSetConverter < byte [ ] > converter = new org . apache . rya . indexing . pcj . storage . accumulo . AccumuloPcjSerializer ( ) ; final byte [ ] byteVal = converter . convert ( bs , varOrder ) ; final org . eclipse . rdf4j . query . BindingSet newBs = converter . convert ( byteVal , varOrder ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String , org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ) { requireNonNull ( bindingSetString ) ; requireNonNull ( varOrder ) ; if ( ( bindingSetString . isEmpty ( ) ) && ( varOrder . toString ( ) . isEmpty ( ) ) ) { return new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; } final java . lang . String [ ] bindingStrings = bindingSetString . split ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . BINDING_DELIM ) ; final java . lang . String [ ] varOrderArr = varOrder . toArray ( ) ; checkArgument ( ( ( varOrderArr . length ) == ( bindingStrings . length ) ) , "The<sp>number<sp>of<sp>Bindings<sp>must<sp>match<sp>the<sp>length<sp>of<sp>the<sp>VariableOrder." ) ; final org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bindingSet = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; for ( int i = 0 ; i < ( bindingStrings . length ) ; i ++ ) { final java . lang . String bindingString = bindingStrings [ i ] ; if ( ! ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . NULL_VALUE_STRING . equals ( bindingString ) ) ) { final java . lang . String name = varOrderArr [ i ] ; final org . eclipse . rdf4j . model . Value value = org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . toValue ( bindingStrings [ i ] ) ; bindingSet . addBinding ( name , value ) ; } } return bindingSet ; }
org . junit . Assert . assertEquals ( bs , newBs )
shouldSerializeGenericClass ( ) { java . lang . String expectedResult = "myCallback({\"genericWrapper\":<sp>{\"entityList\":<sp>[{\"street\":<sp>\"vergueiro<sp>street\"},{\"street\":<sp>\"vergueiro<sp>street\"}],\"total\":<sp>2}})" ; java . util . Collection < br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . Address > entityList = new java . util . ArrayList < br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . Address > ( ) ; entityList . add ( new br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . Address ( "vergueiro<sp>street" ) ) ; entityList . add ( new br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . Address ( "vergueiro<sp>street" ) ) ; br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . GenericWrapper < br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . Address > wrapper = new br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . GenericWrapper < br . com . caelum . vraptor . serialization . xstream . XStreamJSONPSerializationTest . Address > ( entityList , entityList . size ( ) ) ; serialization . withCallback ( "myCallback" ) . from ( wrapper ) . include ( "entityList" ) . serialize ( ) ; "<AssertPlaceHolder>" ; } result ( ) { return new java . lang . String ( stream . toByteArray ( ) ) ; }
org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) )
testAddAdapterNoesNotUseImplementationHidingBehaviorWhenNoCachePropertyIsSpecified ( ) { com . picocontainer . DefaultPicoContainer pico = new com . picocontainer . DefaultPicoContainer ( new com . picocontainer . behaviors . ImplementationHiding ( ) . wrap ( new com . picocontainer . injectors . ConstructorInjection ( ) ) ) ; pico . change ( Characteristics . NO_HIDE_IMPL ) . addAdapter ( new com . picocontainer . adapters . InstanceAdapter ( "foo" , "bar" , new com . picocontainer . lifecycle . NullLifecycleStrategy ( ) , new com . picocontainer . monitors . NullComponentMonitor ( ) ) ) ; com . picocontainer . ComponentAdapter < ? > foo = pico . getComponentAdapter ( "foo" ) ; "<AssertPlaceHolder>" ; } getComponentAdapter ( java . lang . Object ) { checkReadPermission ( ) ; return pico . getComponentAdapter ( key ) ; }
org . junit . Assert . assertEquals ( com . picocontainer . adapters . InstanceAdapter . class , foo . getClass ( ) )
testGetQueryString ( ) { new mockit . Expectations ( ) { { vertxRequest . query ( ) ; result = "k1=v1&k2=v2" ; } } ; "<AssertPlaceHolder>" ; } getQueryString ( ) { return this . vertxRequest . query ( ) ; }
org . junit . Assert . assertEquals ( "k1=v1&k2=v2" , request . getQueryString ( ) )
testMD5HashForArrayWritableKey ( ) { org . apache . hadoop . io . ArrayWritable key = new org . apache . hadoop . io . ArrayWritable ( new java . lang . String [ ] { "abc123" } ) ; org . apache . hadoop . io . MD5Hash md5HashKey1 = co . nubetech . hiho . dedup . HashUtility . getMD5Hash ( key ) ; org . apache . hadoop . io . MD5Hash md5HashKey2 = co . nubetech . hiho . dedup . HashUtility . getMD5Hash ( key ) ; "<AssertPlaceHolder>" ; } getMD5Hash ( java . lang . Object ) { return org . apache . hadoop . io . MD5Hash . digest ( object . toString ( ) ) ; }
org . junit . Assert . assertEquals ( md5HashKey1 , md5HashKey2 )
issueHTJC123 ( ) { java . lang . String mimeType = "application/atom+xml;type=entry" ; org . codehaus . httpcache4j . Headers headers = new org . codehaus . httpcache4j . Headers ( ) ; headers = headers . add ( "Content-Type" , mimeType ) ; org . codehaus . httpcache4j . HTTPRequest request = new org . codehaus . httpcache4j . HTTPRequest ( java . net . URI . create ( "http://example.com/" ) , HTTPMethod . POST ) ; request = request . headers ( headers ) ; request = request . withPayload ( new org . codehaus . httpcache4j . payload . InputStreamPayload ( new org . codehaus . httpcache4j . util . NullInputStream ( 10 ) , org . codehaus . httpcache4j . MIMEType . valueOf ( mimeType ) ) ) ; org . codehaus . httpcache4j . Headers all = request . getAllHeaders ( ) ; "<AssertPlaceHolder>" ; } getHeaders ( java . lang . String ) { return headers . getAsHeaders ( name ) ; }
org . junit . Assert . assertEquals ( 1 , all . getHeaders ( "Content-Type" ) . size ( ) )
testMacAddress ( ) { final com . cloud . utils . net . MacAddress mac = new com . cloud . utils . net . MacAddress ( ) ; "<AssertPlaceHolder>" ; } toLong ( ) { return _addr ; }
org . junit . Assert . assertEquals ( 0L , mac . toLong ( ) )
noneSatisfy ( ) { super . noneSatisfy ( ) ; org . eclipse . collections . api . bag . primitive . ImmutableBooleanBag bag = this . newWith ( false , true , false ) ; "<AssertPlaceHolder>" ; } noneSatisfy ( org . eclipse . collections . api . block . predicate . primitive . BooleanPredicate ) { return ( ( ! ( this . containsFalse ( ) ) ) || ( ! ( predicate . accept ( false ) ) ) ) && ( ( ! ( this . containsTrue ( ) ) ) || ( ! ( predicate . accept ( true ) ) ) ) ; }
org . junit . Assert . assertFalse ( bag . noneSatisfy ( ( value ) -> value ) )
Property ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Builder > ( ) ; org . odata4j . edm . EdmComplexType . Builder ctBuilder = EntityTypecomplexProperty1 ( "newComplexType" , entityType ) ; cpBuilderList . add ( ctBuilder ) ; EntityTypesimpleProperty ( 83 , entityType ) ; org . odata4j . edm . EdmDataServices . Builder builder = org . odata4j . edm . EdmDataServices . newBuilder ( ) ; ComplexTypesimpleProperty ( 50 , ctBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder = ComplexTypecomplexProperty ( 5 , "newComplexType2" , ctBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder ) ; ComplexTypesimpleProperty ( 30 , targetComplexTypeBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder2 = ComplexTypecomplexProperty ( 2 , "newComplexType3" , targetComplexTypeBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder2 ) ; ComplexTypesimpleProperty ( 10 , targetComplexTypeBuilder2 ) ; org . odata4j . edm . EdmSchema . Builder schema = org . odata4j . edm . EdmSchema . newBuilder ( ) . addEntityTypes ( entityType ) . setNamespace ( com . fujitsu . dc . test . unit . core . model . impl . es . odata . PropertyLimitCheckerTest . NS ) . addComplexTypes ( cpBuilderList ) ; org . odata4j . edm . EdmDataServices metadata = builder . addSchemas ( schema ) . build ( ) ; com . fujitsu . dc . core . model . impl . es . doc . PropertyDocHandler handler = new com . fujitsu . dc . core . model . impl . es . doc . PropertyDocHandler ( ) ; org . json . simple . JSONObject staticFields = new org . json . simple . JSONObject ( ) ; staticFields . put ( "Type" , "Edm.String" ) ; handler . setStaticFields ( staticFields ) ; java . util . Map < java . lang . String , java . lang . String > entityTypeMap = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; entityTypeMap . put ( "_EntityType.Name_uniqueKey" , "testEntity" ) ; handler . setEntityTypeMap ( entityTypeMap ) ; handler . setEntityTypeId ( "_uniqueKey" ) ; java . util . Map < java . lang . String , java . lang . Object > manyToOneKindMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; manyToOneKindMap . put ( EntityType . EDM_TYPE_NAME , "_uniqueKey" ) ; handler . setManyToOnelinkId ( manyToOneKindMap ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker checker = new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker ( metadata , handler ) ; java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > errors = checker . checkPropertyLimits ( ) ; "<AssertPlaceHolder>" ; } checkPropertyLimits ( ) { java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > result = new java . util . ArrayList < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > ( ) ; if ( null == ( metadata ) ) { return result ; } java . util . Iterator < org . odata4j . edm . EdmEntityType > iter = metadata . getEntityTypes ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { org . odata4j . edm . EdmEntityType target = iter . next ( ) ; checkPropertyLimitsForEntityTypeInternal ( result , target ) ; } java . util . Iterator < org . odata4j . edm . EdmComplexType > complexTypeIter = metadata . getComplexTypes ( ) . iterator ( ) ; while ( complexTypeIter . hasNext ( ) ) { int simplePropCount = 0 ; int complexPropCount = 0 ; org . odata4j . edm . EdmComplexType complexType = complexTypeIter . next ( ) ; for ( org . odata4j . edm . EdmProperty prop : complexType . getProperties ( ) ) { if ( prop . getName ( ) . startsWith ( "_" ) ) { continue ; } if ( prop . getType ( ) . isSimple ( ) ) { simplePropCount ++ ; } else { complexPropCount ++ ; } } if ( ( simpleMaxForOverAllLayers ) < simplePropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , simpleMaxForOverAllLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) ) ; } if ( ( complexMaxForOverallLayers ) < complexPropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , complexMaxForOverallLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) )
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
cryptTest ( ) { final byte [ ] theBytes = net . violet . platform . util . LibBasic . crypt8 ( "nabaztag" , 71 , 47 ) ; "<AssertPlaceHolder>" ; } uncrypt8 ( byte [ ] , int , int ) { final int theSize = inBytes . length ; final byte [ ] theResultBuffer = new byte [ theSize ] ; java . lang . String theResult = null ; int theKey = inKey ; for ( int index = 0 ; index < theSize ; index ++ ) { final byte theByte = inBytes [ index ] ; final int v = ( ( theByte - inAlpha ) * theKey ) & 255 ; theKey = ( ( v + v ) + 1 ) & 255 ; theResultBuffer [ index ] = ( ( byte ) ( v ) ) ; } try { theResult = new java . lang . String ( theResultBuffer , "ISO-8859-1" ) ; } catch ( final java . io . UnsupportedEncodingException e ) { net . violet . platform . util . LibBasic . LOGGER . fatal ( e , e ) ; } return theResult ; }
org . junit . Assert . assertEquals ( "nabaztag" , net . violet . platform . util . LibBasic . uncrypt8 ( theBytes , 71 , 47 ) )
testNullStapels ( ) { "<AssertPlaceHolder>" ; } converteer ( java . util . List ) { if ( brpStapels == null ) { return null ; } final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3KindInhoud > > stapels = new java . util . ArrayList ( ) ; for ( final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpIstRelatieGroepInhoud > brpStapel : brpStapels ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3KindInhoud > lo3Stapel = converteer ( brpStapel ) ; stapels . add ( lo3Stapel ) ; } return stapels ; }
org . junit . Assert . assertNull ( subject . converteer ( ( ( java . util . List < nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpIstRelatieGroepInhoud > > ) ( null ) ) ) )
testDimensionalEuclidean ( ) { org . nd4j . linalg . api . ndarray . INDArray distanceInputRow = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 , DataType . DOUBLE ) . reshape ( 1 , ( - 1 ) ) ; org . nd4j . linalg . api . ndarray . INDArray distanceComp = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 , DataType . DOUBLE ) . reshape ( 1 , ( - 1 ) ) . add ( 1 ) ; org . nd4j . linalg . api . ndarray . INDArray result = org . nd4j . linalg . factory . Nd4j . createUninitialized ( DataType . DOUBLE , 4 ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . reduce3 . EuclideanDistance ( distanceInputRow , distanceComp , result , 0 ) ) ; org . nd4j . linalg . api . ndarray . INDArray euclideanAssertion = org . nd4j . linalg . factory . Nd4j . ones ( 4 ) . castTo ( DataType . DOUBLE ) ; "<AssertPlaceHolder>" ; System . out . println ( result ) ; } castTo ( org . nd4j . linalg . api . buffer . DataType ) { return null ; }
org . junit . Assert . assertEquals ( euclideanAssertion , result )
testWithSeconds ( ) { java . util . Date parsed = com . widen . valet . internal . DateUtil . fromZulu ( "2011-02-23T14:35:42Z" ) ; java . util . Calendar calendar = setupCalendar ( ) ; calendar . clear ( Calendar . MILLISECOND ) ; "<AssertPlaceHolder>" ; } setupCalendar ( ) { java . util . Calendar calendar = java . util . Calendar . getInstance ( java . util . TimeZone . getTimeZone ( "Zulu" ) ) ; calendar . clear ( ) ; calendar . set ( 2011 , 1 , 23 , 14 , 35 , 42 ) ; calendar . set ( Calendar . MILLISECOND , 5 ) ; return calendar ; }
org . junit . Assert . assertEquals ( calendar . getTime ( ) , parsed )
testCellIndexMethods ( ) { int numberOfTests = 10 ; org . openpixi . pixi . physics . Settings settings = getStandardSettings ( ) ; settings . addFieldGenerator ( new org . openpixi . pixi . physics . fields . fieldgenerators . SU2RandomFields ( ) ) ; org . openpixi . pixi . physics . Simulation s = new org . openpixi . pixi . physics . Simulation ( settings ) ; org . openpixi . pixi . physics . grid . Grid g = s . grid ; initializeUnitVectors ( g ) ; for ( int t = 0 ; t < numberOfTests ; t ++ ) { int [ ] pos = getRandomLatticePosition ( s ) ; int index = g . getCellIndex ( pos ) ; int [ ] pos2 = g . getCellPos ( index ) ; "<AssertPlaceHolder>" ; } } getCellPos ( int ) { int [ ] pos = new int [ this . numDim ] ; for ( int i = ( this . numDim ) - 1 ; i >= 0 ; i -- ) { pos [ i ] = index % ( this . numCells [ i ] ) ; index -= pos [ i ] ; index /= this . numCells [ i ] ; } return pos ; }
org . junit . Assert . assertArrayEquals ( pos , pos2 )
equalsLogically_differentName ( ) { org . pentaho . agilebi . modeler . models . annotations . CreateAttribute left = buildCreateAttributeAnnotations ( "total" , "sales" , "sales" , null , null , false ) ; org . pentaho . agilebi . modeler . models . annotations . CreateAttribute right = buildCreateAttributeAnnotations ( "Sales" , "Sales" , "Sales" , null , null , false ) ; "<AssertPlaceHolder>" ; } equalsLogically ( org . pentaho . agilebi . modeler . models . annotations . AnnotationType ) { if ( ( obj == null ) || ( ( obj . getClass ( ) ) != ( getClass ( ) ) ) ) { return false ; } org . pentaho . agilebi . modeler . models . annotations . CreateAttribute that = ( ( org . pentaho . agilebi . modeler . models . annotations . CreateAttribute ) ( obj ) ) ; org . apache . commons . lang . builder . EqualsBuilder eq = new org . apache . commons . lang . builder . EqualsBuilder ( ) ; java . lang . String thatName = ( ( that . getName ( ) ) == null ) ? null : that . getName ( ) . toLowerCase ( ) ; java . lang . String myName = ( ( getName ( ) ) == null ) ? null : getName ( ) . toLowerCase ( ) ; eq . append ( myName , thatName ) ; java . lang . String thatDimension = ( ( that . getDimension ( ) ) == null ) ? null : that . getDimension ( ) . toLowerCase ( ) ; java . lang . String myDimension = ( ( getDimension ( ) ) == null ) ? null : getDimension ( ) . toLowerCase ( ) ; eq . append ( myDimension , thatDimension ) ; java . lang . String thatHierarchy = ( ( that . getHierarchy ( ) ) == null ) ? null : that . getHierarchy ( ) . toLowerCase ( ) ; java . lang . String myHierarchy = ( ( getHierarchy ( ) ) == null ) ? null : getHierarchy ( ) . toLowerCase ( ) ; if ( thatHierarchy == null ) { thatHierarchy = thatDimension ; } if ( myHierarchy == null ) { myHierarchy = myDimension ; } eq . append ( myHierarchy , thatHierarchy ) ; return eq . isEquals ( ) ; }
org . junit . Assert . assertFalse ( left . equalsLogically ( right ) )
testCustomComponentMonitorCanBeSpecifiedWhenCAFIsSpecified ( ) { java . io . Reader script = new java . io . StringReader ( ( "" + ( ( ( ( ( ( ( ( ( ( ( "package<sp>com.picocontainer.script.groovy\n" + "package<sp>com.picocontainer.script.groovy\n" 1 ) + "import<sp>com.picocontainer.behaviors.Caching\n" ) + "package<sp>com.picocontainer.script.groovy\n" 0 ) + "import<sp>com.picocontainer.monitors.WriterComponentMonitor\n" ) + "import<sp>com.picocontainer.script.testmodel.*\n" ) + "writer<sp>=<sp>new<sp>StringWriter()\n" ) + "package<sp>com.picocontainer.script.groovy\n" 2 ) + "scripted<sp>=<sp>builder.container(componentFactory:<sp>new<sp>Caching().wrap(new<sp>ConstructorInjection()),<sp>monitor:<sp>monitor)<sp>{\n" ) + "<sp>component(A)\n" ) + "<sp>component(key:StringWriter,<sp>instance:writer)\n" ) + "}" ) ) ) ; com . picocontainer . PicoContainer pico = buildContainer ( script , null , com . picocontainer . script . groovy . GroovyNodeBuilderTestCase . ASSEMBLY_SCOPE ) ; pico . getComponent ( com . picocontainer . script . testmodel . WebServerConfig . class ) ; java . io . StringWriter writer = pico . getComponent ( java . io . StringWriter . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "BuilderNode:<sp>" + ( this . getClass ( ) . getName ( ) ) ) + "<sp>(\"" ) + ( getNodeName ( ) ) ) + "\")" ; }
org . junit . Assert . assertTrue ( ( ( writer . toString ( ) . length ( ) ) > 0 ) )
testSyntaxA ( ) { java . nio . file . Path path = de . agitos . encfs4j . EncryptedFileSystemTest . fs . getPath ( de . agitos . encfs4j . EncryptedFileSystemTest . persistentFile . getAbsolutePath ( ) . replaceAll ( "\\\\" , "/" ) ) ; if ( ! ( java . nio . file . Files . exists ( path ) ) ) { java . nio . file . Files . createFile ( path ) ; } java . io . OutputStream outStream = de . agitos . encfs4j . EncryptedFileSystemTest . provider . newOutputStream ( path ) ; outStream . write ( de . agitos . encfs4j . EncryptedFileSystemTest . testString . getBytes ( ) ) ; outStream . close ( ) ; java . io . InputStream inStream = de . agitos . encfs4j . EncryptedFileSystemTest . provider . newInputStream ( path ) ; java . io . BufferedReader in = new java . io . BufferedReader ( new java . io . InputStreamReader ( inStream ) ) ; java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; java . lang . String line = null ; while ( ( line = in . readLine ( ) ) != null ) { buf . append ( line ) ; } inStream . close ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return subFSPath . toString ( ) ; }
org . junit . Assert . assertEquals ( de . agitos . encfs4j . EncryptedFileSystemTest . testString , buf . toString ( ) )
testGetEmptyValue ( ) { com . ctrip . platform . dal . dao . task . BatchInsertTask < com . ctrip . platform . dal . dao . task . ClientTestModel > test = new com . ctrip . platform . dal . dao . task . BatchInsertTask ( ) ; "<AssertPlaceHolder>" ; } getEmptyValue ( ) { return 0 ; }
org . junit . Assert . assertArrayEquals ( new int [ 0 ] , test . getEmptyValue ( ) )
typical ( ) { java . util . Set < javax . validation . ConstraintViolation < com . hotels . bdp . waggledance . conf . WaggleDanceConfiguration > > violations = validator . validate ( waggleDanceConfiguration ) ; "<AssertPlaceHolder>" ; } size ( ) { return whiteList . size ( ) ; }
org . junit . Assert . assertThat ( violations . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
testIsErrorEnabledWithYesFilter ( ) { addYesFilter ( ) ; logger . setLevel ( Level . OFF ) ; "<AssertPlaceHolder>" ; } isErrorEnabled ( ) { return isErrorEnabled ( null ) ; }
org . junit . Assert . assertTrue ( logger . isErrorEnabled ( ) )
testCuboidCounts4 ( ) { org . apache . kylin . cube . model . CubeDesc cube = getTestKylinCubeWithSellerLeft ( ) ; org . apache . kylin . cube . cuboid . CuboidScheduler cuboidScheduler = cube . getInitialCuboidScheduler ( ) ; int [ ] counts = org . apache . kylin . cube . cuboid . CuboidCLI . calculateAllLevelCount ( cube ) ; printCount ( counts ) ; int sum = 0 ; for ( java . lang . Integer x : counts ) { sum += x ; } "<AssertPlaceHolder>" ; } getCuboidCount ( ) { return allCuboidIds . size ( ) ; }
org . junit . Assert . assertEquals ( cuboidScheduler . getCuboidCount ( ) , sum )
checkGetAllElementsInJavaRDD ( ) { final uk . gov . gchq . gaffer . graph . Graph graph1 = new uk . gov . gchq . gaffer . graph . Graph . Builder ( ) . config ( new uk . gov . gchq . gaffer . graph . GraphConfig . Builder ( ) . graphId ( "graphId" ) . build ( ) ) . addSchema ( getClass ( ) . getResourceAsStream ( "/schema/elements.json" ) ) . addSchema ( getClass ( ) . getResourceAsStream ( "/schema/types.json" ) ) . addSchema ( getClass ( ) . getResourceAsStream ( "/schema/serialisation.json" ) ) . storeProperties ( getClass ( ) . getResourceAsStream ( "/store.properties" ) ) . build ( ) ; final java . util . List < uk . gov . gchq . gaffer . data . element . Element > elements = new java . util . ArrayList ( ) ; final java . util . Set < uk . gov . gchq . gaffer . data . element . Element > expectedElements = new java . util . HashSet ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { final uk . gov . gchq . gaffer . data . element . Entity entity = new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( TestGroups . ENTITY ) . vertex ( ( "" + i ) ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . Edge edge1 = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( TestGroups . EDGE ) . source ( ( "" + i ) ) . dest ( "B" ) . directed ( false ) . property ( TestPropertyNames . COUNT , 2 ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . Edge edge2 = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( TestGroups . EDGE ) . source ( ( "" + i ) ) . dest ( "C" ) . directed ( false ) . property ( TestPropertyNames . COUNT , 4 ) . build ( ) ; elements . add ( edge1 ) ; elements . add ( edge2 ) ; elements . add ( entity ) ; expectedElements . add ( edge1 ) ; expectedElements . add ( edge2 ) ; expectedElements . add ( entity ) ; } final uk . gov . gchq . gaffer . user . User user = new uk . gov . gchq . gaffer . user . User ( ) ; graph1 . execute ( new uk . gov . gchq . gaffer . operation . impl . add . AddElements . Builder ( ) . input ( elements ) . build ( ) , user ) ; final org . apache . hadoop . conf . Configuration configuration = new org . apache . hadoop . conf . Configuration ( ) ; final java . lang . String configurationString = uk . gov . gchq . gaffer . sparkaccumulo . operation . handler . AbstractGetRDDHandler . convertConfigurationToString ( configuration ) ; final uk . gov . gchq . gaffer . spark . operation . javardd . GetJavaRDDOfAllElements rddQuery = new uk . gov . gchq . gaffer . spark . operation . javardd . GetJavaRDDOfAllElements . Builder ( ) . build ( ) ; rddQuery . addOption ( AbstractGetRDDHandler . HADOOP_CONFIGURATION_KEY , configurationString ) ; final org . apache . spark . api . java . JavaRDD < uk . gov . gchq . gaffer . data . element . Element > rdd = graph1 . execute ( rddQuery , user ) ; if ( rdd == null ) { org . junit . Assert . fail ( "No<sp>RDD<sp>returned" ) ; } final java . util . Set < uk . gov . gchq . gaffer . data . element . Element > results = new java . util . HashSet ( rdd . collect ( ) ) ; "<AssertPlaceHolder>" ; } execute ( uk . gov . gchq . gaffer . operation . io . Output , uk . gov . gchq . gaffer . store . Context ) { return execute ( new uk . gov . gchq . gaffer . graph . GraphRequest ( operation , context ) ) . getResult ( ) ; }
org . junit . Assert . assertEquals ( expectedElements , results )