input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testGetActionsParent ( ) { com . eclipsesource . tabris . internal . ui . RemoteUI remoteUI = new com . eclipsesource . tabris . internal . ui . RemoteUI ( shell ) ; org . eclipse . swt . widgets . Composite uiParent = remoteUI . getActionsParent ( ) ; "<AssertPlaceHolder>" ; } getActionsParent ( ) { return actionsBar ; }
|
org . junit . Assert . assertSame ( shell , uiParent )
|
testGetJobs ( ) { java . util . List < org . gitlab4j . api . models . Job > jobs = org . gitlab4j . api . TestJobApi . gitLabApi . getJobApi ( ) . getJobs ( org . gitlab4j . api . TestJobApi . testProjectId . intValue ( ) ) ; "<AssertPlaceHolder>" ; } getJobs ( java . lang . Integer ) { return getJobs ( runnerId , null , getDefaultPerPage ( ) ) . all ( ) ; }
|
org . junit . Assert . assertNotNull ( jobs )
|
testSetBindingIndex_returnsCell ( ) { org . eclipse . rap . rwt . template . Cell < ? > cell = new org . eclipse . rap . rwt . template . TestCell ( template , "foo" ) ; org . eclipse . rap . rwt . template . Cell < ? > actualCell = cell . setBindingIndex ( 1 ) ; "<AssertPlaceHolder>" ; } setBindingIndex ( int ) { bindingIndex = index ; return getThis ( ) ; }
|
org . junit . Assert . assertSame ( cell , actualCell )
|
testProcessSongBadLine ( ) { java . lang . String testDisc = "testDisc" ; org . bff . javampd . processor . DiscTagProcessor discTagProcessor = new org . bff . javampd . processor . DiscTagProcessor ( ) ; org . bff . javampd . song . MPDSong song = new org . bff . javampd . song . MPDSong ( "testFile" , "testName" ) ; java . lang . String line = "BadDisc:" + testDisc ; discTagProcessor . processTag ( song , line ) ; "<AssertPlaceHolder>" ; } getDiscNumber ( ) { return discNumber ; }
|
org . junit . Assert . assertNull ( song . getDiscNumber ( ) )
|
testDeleteAplicacionByCodigo ( ) { int count = getAplicacionManager ( ) . count ( ) ; getAplicacionManager ( ) . deleteAplicacionByCodigo ( es . ieci . tecdoc . fwktd . csv . api . manager . impl . AplicacionManagerImplTest . CODIGO_APLICACION_BORRAR ) ; "<AssertPlaceHolder>" ; } getAplicacionManager ( ) { return fwktd_sir_aplicacionManager ; }
|
org . junit . Assert . assertEquals ( getAplicacionManager ( ) . count ( ) , ( count - 1 ) )
|
fullUrlCanHaveUncommonDomainPostfixInfo ( ) { shortUrl . setFullUrl ( "http://repasky.info" ) ; constraintViolations = com . repaskys . domain . ShortUrlTest . validator . validate ( shortUrl ) ; "<AssertPlaceHolder>" ; } setFullUrl ( java . lang . String ) { this . fullUrl = fullUrl ; }
|
org . junit . Assert . assertEquals ( 0 , constraintViolations . size ( ) )
|
matchesInputZeroOutputFalse3 ( ) { final com . freedomotic . plugins . CronSchedule . SingleTimeValue objectUnderTest = new com . freedomotic . plugins . CronSchedule . SingleTimeValue ( 1 ) ; final int timeValue = 0 ; final boolean retval = objectUnderTest . matches ( timeValue ) ; "<AssertPlaceHolder>" ; } matches ( java . time . LocalDateTime ) { return ( isMinute ( instant ) ) && ( ( instant . get ( ChronoField . SECOND_OF_MINUTE ) ) == 0 ) ; }
|
org . junit . Assert . assertEquals ( false , retval )
|
testProvider ( ) { startServer ( com . sun . jersey . osgi . tests . jetty . GrizzlyWebProviderLifecycleTest . FileReferenceWriter . class , com . sun . jersey . osgi . tests . jetty . GrizzlyWebProviderLifecycleTest . FileTypeResource . class ) ; com . sun . jersey . api . client . WebResource r = com . sun . jersey . api . client . Client . create ( ) . resource ( getUri ( ) . path ( "/" ) . build ( ) ) ; java . lang . String s = r . get ( java . lang . String . class ) ; java . io . File f = new java . io . File ( s ) ; "<AssertPlaceHolder>" ; stopServer ( ) ; } get ( java . lang . Object ) { return core . get ( key ) ; }
|
org . junit . Assert . assertTrue ( f . exists ( ) )
|
check ( ) { final org . apache . openejb . assembler . classic . ReloadableEntityManagerFactory remf = ( ( org . apache . openejb . assembler . classic . ReloadableEntityManagerFactory ) ( emf ) ) ; "<AssertPlaceHolder>" ; } getManagedClasses ( ) { return managedClasses ; }
|
org . junit . Assert . assertEquals ( 0 , remf . getManagedClasses ( ) . size ( ) )
|
testWelAdresgevendGeenBrpMoeder ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby0103 . voerRegelUit ( null , maakNieuweSituatie ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . geboorte . BRBY0103Test . MOEDER_IS_ADRESGEVEND ) , null , maakBestaandeBetrokkenen ( null , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . geboorte . BRBY0103Test . MOEDER_IS_INGEZETENE , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . afstamming . acties . geboorte . BRBY0103Test . MOEDER_HEEFT_BRIEFADRES ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , overtreders . size ( ) )
|
testWithOOPathOnSingleItem ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( ( ( "package<sp>org.drools.compiler.integrationtests\n" + "unit<sp>" ) + ( getCanonicalSimpleName ( org . drools . compiler . integrationtests . RuleUnitTest . AdultUnitWithSingleItem . class ) ) ) + "\n" ) + "import<sp>" ) + ( org . drools . testcoverage . common . model . Person . class . getCanonicalName ( ) ) ) + "\n" ) + "unit<sp>" 1 ) + "<sp>$p<sp>:<sp>/person[age<sp>>=<sp>adultAge]\n" ) + "then\n" ) + "<sp>System.out.println($p.getName()<sp>+<sp>\"<sp>is<sp>adult\"unit<sp>" 0 ) + "end" ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "rule-unit-test" , kieBaseTestConfiguration , drl ) ; final org . kie . api . runtime . rule . RuleUnitExecutor executor = org . kie . api . runtime . rule . RuleUnitExecutor . create ( ) . bind ( kbase ) ; try { final org . kie . api . runtime . rule . RuleUnit adultUnit = new org . drools . compiler . integrationtests . RuleUnitTest . AdultUnitWithSingleItem ( new org . drools . testcoverage . common . model . Person ( "Mario" , 42 ) ) ; "<AssertPlaceHolder>" ; } finally { executor . dispose ( ) ; } } run ( org . junit . runner . notification . RunNotifier ) { for ( org . drools . workbench . models . testscenarios . shared . Scenario scenario : scenarios ) { runScenario ( notifier , scenario ) ; } }
|
org . junit . Assert . assertEquals ( 1 , executor . run ( adultUnit ) )
|
testGetBoundingBoxZoom ( ) { final int tileSize = 256 ; final int screenWidth = tileSize * 2 ; final int screenHeight = screenWidth * 2 ; org . osmdroid . util . TileSystem . setTileSize ( tileSize ) ; final int iterations = 2000 ; for ( int i = 0 ; i < iterations ; i ++ ) { final double north = getRandomLatitude ( ) ; final double south = getRandomLatitude ( ) ; final double east = getRandomLongitude ( ) ; final double west = getRandomLongitude ( ) ; final org . osmdroid . util . BoundingBox boundingBox = new org . osmdroid . util . BoundingBox ( north , east , south , west ) ; final double zoom = org . osmdroid . util . TileSystemTest . tileSystem . getBoundingBoxZoom ( boundingBox , screenWidth , screenHeight ) ; if ( zoom == ( Double . MIN_VALUE ) ) { "<AssertPlaceHolder>" ; continue ; } final double mapSize = org . osmdroid . util . TileSystem . MapSize ( zoom ) ; final long left = org . osmdroid . util . TileSystemTest . tileSystem . getMercatorXFromLongitude ( west , mapSize , true ) ; final long top = org . osmdroid . util . TileSystemTest . tileSystem . getMercatorYFromLatitude ( north , mapSize , true ) ; final long right = org . osmdroid . util . TileSystemTest . tileSystem . getMercatorXFromLongitude ( east , mapSize , true ) ; final long bottom = org . osmdroid . util . TileSystemTest . tileSystem . getMercatorYFromLatitude ( south , mapSize , true ) ; long width = right - left ; if ( east < west ) { width += mapSize ; } final long height = bottom - top ; checkSize ( width , height , screenWidth , screenHeight ) ; } } getRandomLongitude ( ) { return org . osmdroid . views . OpenStreetMapViewTest . tileSystem . getRandomLongitude ( org . osmdroid . views . OpenStreetMapViewTest . random . nextDouble ( ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( north <= south ) || ( east == west ) ) )
|
shouldHaveSingletonOK ( ) { com . spotify . apollo . Response < java . lang . Object > ok1 = com . spotify . apollo . Response . ok ( ) ; com . spotify . apollo . Response < java . lang . Object > ok2 = com . spotify . apollo . Response . forStatus ( Status . OK ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertSame ( ok1 , ok2 )
|
should_call_correct_direction ( ) { java . util . List < au . edu . wehi . idsv . VariantContextDirectedEvidence > calls = com . google . common . collect . Lists . newArrayList ( new au . edu . wehi . idsv . BreakendMaximalEvidenceCliqueIterator ( getContext ( ) , com . google . common . collect . ImmutableList . < au . edu . wehi . idsv . DirectedEvidence > of ( SCE ( au . edu . wehi . idsv . FWD , Read ( 0 , 1 , "50M50S" ) ) ) . iterator ( ) , BWD , new au . edu . wehi . idsv . SequentialIdGenerator ( "test" ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , calls . size ( ) )
|
shouldCloseReclaimWindowOnComplete ( ) { givenServer ( ) ; clientRecoveryStore . reclaimComplete ( ) ; "<AssertPlaceHolder>" ; } waitingForReclaim ( ) { return false ; }
|
org . junit . Assert . assertFalse ( clientRecoveryStore . waitingForReclaim ( ) )
|
v6Attributes ( ) { org . everit . json . schema . NumberSchema expected = org . everit . json . schema . NumberSchema . builder ( ) . minimum ( 5 ) . maximum ( 10 ) . multipleOf ( 2 ) . exclusiveMinimum ( 5 ) . exclusiveMaximum ( 10 ) . build ( ) ; org . everit . json . schema . NumberSchema actual = ( ( org . everit . json . schema . NumberSchema ) ( org . everit . json . schema . TestSupport . loadAsV6 ( org . everit . json . schema . loader . NumberSchemaLoadingTest . get ( "v6Attributes" ) ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return org . everit . json . schema . loader . NumberSchemaLoadingTest . ALL_SCHEMAS . getJSONObject ( testcaseName ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testCeilDoubleInWhere ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableName ) ) + "<sp>WHERE<sp>CEIL(doub,<sp>2)<sp>=<sp>1.27" ) ) ; "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( org . apache . phoenix . util . CursorUtil . moreValues ( cursorName ) ) ) { return null ; } else if ( ( fetchSize ) == ( rowsRead ) ) { return null ; } org . apache . phoenix . schema . tuple . Tuple next = delegate . next ( ) ; org . apache . phoenix . util . CursorUtil . updateCursor ( cursorName , next , delegate . peek ( ) ) ; ( rowsRead ) ++ ; return next ; }
|
org . junit . Assert . assertTrue ( rs . next ( ) )
|
testDotDiv ( ) { "<AssertPlaceHolder>" ; } dotDiv ( java . lang . Object , java . lang . Object ) { return null ; }
|
org . junit . Assert . assertNull ( e . dotDiv ( o ( 0 ) , o ( 0 ) ) )
|
getAParameterFromABadPath ( ) { org . silverpeas . core . util . XmlSettingBundle bundle = org . silverpeas . core . util . ResourceLocator . getXmlSettingBundle ( org . silverpeas . core . util . XmlSettingBundleTest . XML_SETTING_BUNDLE ) ; "<AssertPlaceHolder>" ; bundle . getString ( "BD_Silverpeas-configuration.DriverName" ) ; } exists ( ) { return ( getId ( ) ) != null ; }
|
org . junit . Assert . assertThat ( bundle . exists ( ) , is ( true ) )
|
testDisplayname ( ) { com . github . sardine . DavResource folder = new com . github . sardine . DavResourceTest . Builder ( "/test/path/" ) . withDisplayName ( "My<sp>path" ) . build ( ) ; "<AssertPlaceHolder>" ; } getDisplayName ( ) { return displayName ; }
|
org . junit . Assert . assertEquals ( "My<sp>path" , folder . getDisplayName ( ) )
|
when_setAllDatasets_then_stationaryFilterActive ( ) { org . n52 . io . request . IoParameters parameters = org . n52 . io . request . IoParameters . createDefaults ( ) ; org . n52 . io . request . FilterResolver resolver = createResolver ( parameters ) ; "<AssertPlaceHolder>" ; } hasMobileFilter ( ) { return ( parameters . getMobile ( ) ) != null ; }
|
org . junit . Assert . assertFalse ( resolver . hasMobileFilter ( ) )
|
orderOfEnvVarsIsIrrelevant ( ) { com . facebook . buck . rules . args . StringArg arg = com . facebook . buck . rules . args . StringArg . of ( "arbitrary" ) ; com . facebook . buck . core . toolchain . tool . impl . CommandTool one = com . facebook . buck . core . toolchain . tool . impl . CommandToolRuleKeyTest . command ( arg , ( builder ) -> builder . addEnv ( "APPLES" , "bananas" ) . addEnv ( "cherries" , "Dates" ) ) ; com . facebook . buck . core . toolchain . tool . impl . CommandTool two = com . facebook . buck . core . toolchain . tool . impl . CommandToolRuleKeyTest . command ( arg , ( builder ) -> builder . addEnv ( "cherries" , "Dates" ) . addEnv ( "APPLES" , "bananas" ) ) ; "<AssertPlaceHolder>" ; } ruleKey ( com . facebook . buck . core . toolchain . tool . impl . CommandTool ) { return ruleKey ( tool , com . facebook . buck . core . toolchain . tool . impl . CommandToolRuleKeyTest . fakeHashCache ( com . google . common . collect . ImmutableMap . of ( ) ) ) ; }
|
org . junit . Assert . assertThat ( ruleKey ( one ) , org . hamcrest . Matchers . equalTo ( ruleKey ( two ) ) )
|
testTrueCount ( ) { int [ ] expected = new int [ ] { 4 , 3 , 2 , 1 , 0 } ; int [ ] [ ] dense = new int [ ] [ ] { new int [ ] { 0 , 1 , 1 , 1 , 1 } , new int [ ] { 0 , 0 , 1 , 1 , 1 } , new int [ ] { 0 , 0 , 0 , 1 , 1 } , new int [ ] { 0 , 0 , 0 , 0 , 1 } , new int [ ] { 0 , 0 , 0 , 0 , 0 } } ; org . numenta . nupic . util . LowMemorySparseBinaryMatrix sp = new org . numenta . nupic . util . LowMemorySparseBinaryMatrix ( new int [ ] { 5 , 5 } ) ; for ( int i = 0 ; i < 5 ; i ++ ) { for ( int j = 0 ; j < 5 ; j ++ ) { sp . set ( dense [ i ] [ j ] , i , j ) ; } } "<AssertPlaceHolder>" ; } getTrueCounts ( ) { int [ ] trueCounts = new int [ this . dimensions [ 0 ] ] ; for ( int i = 0 ; i < ( this . dimensions [ 0 ] ) ; i ++ ) trueCounts [ i ] = getTrueCount ( i ) ; return trueCounts ; }
|
org . junit . Assert . assertArrayEquals ( expected , sp . getTrueCounts ( ) )
|
testGetAttribute ( ) { expect ( servletContext . getAttribute ( "whatever" ) ) . andReturn ( "value" ) ; replay ( servletContext , config ) ; org . apache . tiles . web . util . ServletContextAdapter adapter = new org . apache . tiles . web . util . ServletContextAdapter ( config ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { org . apache . tiles . Attribute retValue = null ; if ( ( attributes ) != null ) { retValue = attributes . get ( name ) ; } if ( ( retValue == null ) && ( ( cascadedAttributes ) != null ) ) { retValue = cascadedAttributes . get ( name ) ; } return retValue ; }
|
org . junit . Assert . assertEquals ( "value" , adapter . getAttribute ( "whatever" ) )
|
testNoFunctionImport ( ) { com . sap . core . odata . processor . core . jpa . model . JPAEdmFunctionImportTest . VARIANT = 99 ; build ( ) ; java . util . List < com . sap . core . odata . api . edm . provider . FunctionImport > functionImportList = jpaEdmfunctionImport . getConsistentFunctionImportList ( ) ; "<AssertPlaceHolder>" ; } getConsistentFunctionImportList ( ) { return consistentFunctionImportList ; }
|
org . junit . Assert . assertEquals ( functionImportList . size ( ) , 0 )
|
testGetFinalResponse ( ) { System . out . println ( "getFinalResponse" ) ; gov . hhs . fha . nhinc . gateway . executorservice . NhinTaskExecutor < gov . hhs . fha . nhinc . orchestration . OutboundOrchestratableMessage , gov . hhs . fha . nhinc . orchestration . OutboundOrchestratableMessage > instance = new gov . hhs . fha . nhinc . gateway . executorservice . NhinTaskExecutor ( null , null , null ) ; java . lang . Object expResult = null ; java . lang . Object result = instance . getFinalResponse ( ) ; "<AssertPlaceHolder>" ; } getFinalResponse ( ) { return cumulativeResponse ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
isPlatformOperator_False ( ) { java . util . Set < org . oscm . internal . types . enumtypes . OrganizationRoleType > orgRoles = new java . util . HashSet < org . oscm . internal . types . enumtypes . OrganizationRoleType > ( ) ; org . oscm . internal . vo . VOUserDetails userDetails = new org . oscm . internal . vo . VOUserDetails ( ) ; userDetails . setOrganizationRoles ( orgRoles ) ; given ( exportBillingService . idService . getCurrentUserDetails ( ) ) . willReturn ( userDetails ) ; boolean isPlatformOperator = exportBillingService . isPlatformOperator ( ) ; "<AssertPlaceHolder>" ; } isPlatformOperator ( ) { return voUserDetails . getUserRoles ( ) . contains ( UserRoleType . PLATFORM_OPERATOR ) ; }
|
org . junit . Assert . assertFalse ( isPlatformOperator )
|
should_Match_By_Field_But_Not_By_Regex_Path ( ) { underTest = new org . sonatype . nexus . repository . npm . internal . NpmFieldMatcher ( org . sonatype . nexus . repository . npm . internal . NpmFieldMatcherTest . FIELD_NAME , "/b(.*)b" , fieldDeserializer ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . Object ) { if ( ! ( clazz . isAssignableFrom ( item . getClass ( ) ) ) ) { return false ; } org . sonatype . nexus . supportzip . ContentSourceSupport contentSourceSupport = ( ( org . sonatype . nexus . supportzip . ContentSourceSupport ) ( item ) ) ; return ( ( contentSourceSupport . getPath ( ) . equals ( path ) ) && ( contentSourceSupport . getPriority ( ) . equals ( priority ) ) ) && ( contentSourceSupport . getType ( ) . equals ( type ) ) ; }
|
org . junit . Assert . assertFalse ( underTest . matches ( parser ) )
|
canHaveEntriesWithDefaultTextAndSomeModificationToAnExistingFile2 ( ) { java . lang . String authorName = "Test<sp>Author" ; java . lang . String email = "/ChangeLog" 2 ; final java . lang . String dateLine = gnuFormatter . formatDateLine ( authorName , email ) ; java . lang . String changelogPath = ( "/ChangeLog" 1 + ( project . getTestProject ( ) . getName ( ) ) ) + "/test/example" ; final java . lang . String changelogFilePath = changelogPath + "/ChangeLog" ; java . io . InputStream newFileInputStream = new java . io . ByteArrayInputStream ( new byte [ 0 ] ) ; org . eclipse . core . resources . IFile changelogFile = project . addFileToProject ( "/test/example" , "ChangeLog" , newFileInputStream ) ; changelogEditorPart = openEditor ( changelogFile ) ; final java . lang . String firstFileEntryRelPath = "eclipse/example/test/NewCoffeeMaker.java" ; java . lang . String entryFilePath = ( changelogPath + "/ChangeLog" 1 ) + firstFileEntryRelPath ; final java . lang . String firstDefaultContent = "New<sp>file." ; gnuFormatter . mergeChangelog ( dateLine , guessedFunctionName , "" , changelogEditorPart , changelogFilePath , entryFilePath ) ; final java . lang . String actualMergeResult = getContent ( changelogEditorPart ) ; final java . lang . String expectedResult = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( dateLine + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . TAB ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FILE_ENTRY_START_MARKER ) ) + thirdFileEntryRelPath ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . SPACE ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FUNCTION_START_MARKER ) ) + guessedFunctionName ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FUNCTION_END_MARKER ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FILE_ENTRY_END_MARKER ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . NEW_LINE ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . TAB ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FILE_ENTRY_START_MARKER ) ) + secondFileEntryRelPath ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FILE_ENTRY_END_MARKER ) ) + secondDefaultContent ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . NEW_LINE ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . TAB ) ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FILE_ENTRY_START_MARKER ) ) + firstFileEntryRelPath ) + ( org . eclipse . linuxtools . changelog . core . formatters . tests . GNUFormatTest . FILE_ENTRY_END_MARKER ) ) + firstDefaultContent ; "<AssertPlaceHolder>" ; } getContent ( org . eclipse . ui . IEditorPart ) { org . eclipse . ui . texteditor . AbstractTextEditor castEditor = ( ( org . eclipse . ui . texteditor . AbstractTextEditor ) ( editorPart ) ) ; org . eclipse . ui . texteditor . IDocumentProvider provider = castEditor . getDocumentProvider ( ) ; org . eclipse . jface . text . IDocument document = provider . getDocument ( castEditor . getEditorInput ( ) ) ; return document . get ( ) ; }
|
org . junit . Assert . assertEquals ( expectedResult , actualMergeResult )
|
testStripPrefixNullPrefix ( ) { java . lang . String value = "prefixed.option" ; java . lang . String result = org . apache . qpid . jms . util . PropertyUtil . stripPrefix ( value , null ) ; "<AssertPlaceHolder>" ; } stripPrefix ( java . lang . String , java . lang . String ) { if ( ( ( value != null ) && ( prefix != null ) ) && ( value . startsWith ( prefix ) ) ) { return value . substring ( prefix . length ( ) ) ; } return value ; }
|
org . junit . Assert . assertSame ( value , result )
|
testGetExternalReport ( ) { org . oscm . reportingservice . business . model . externalservices . RDOExternal report = reporting . getExternalServicesReport ( org . oscm . reportingservice . bean . ReportingServiceBeanTest . VALID_SESSION_ID ) ; "<AssertPlaceHolder>" ; } getExternalServicesReport ( java . lang . String ) { return delegate . getExternalServicesReport ( sessionId ) ; }
|
org . junit . Assert . assertNotNull ( report )
|
testGetSummaryNs ( ) { com . jmethods . catatumbo . stats . StatTotalNs stat = com . jmethods . catatumbo . DatastoreStatsTest . stats . getSummaryNs ( ) ; com . google . cloud . datastore . Key key = com . jmethods . catatumbo . DatastoreStatsTest . datastore . newKeyFactory ( ) . setKind ( StatConstants . STAT_TOTAL_NS ) . newKey ( StatConstants . ID_TOTAL_ENTITY_USAGE ) ; com . google . cloud . datastore . Entity nativeEntity = com . jmethods . catatumbo . DatastoreStatsTest . datastore . get ( key ) ; "<AssertPlaceHolder>" ; } equals ( com . jmethods . catatumbo . stats . StatTotalBase , com . google . cloud . datastore . Entity ) { if ( ( stat != null ) && ( entity != null ) ) { return ( ( ( ( ( ( ( ( stat . getBuiltinIndexBytes ( ) ) == ( entity . getLong ( StatConstants . PROP_BUILTIN_INDEX_BYTES ) ) ) && ( ( stat . getBuiltinIndexCount ( ) ) == ( entity . getLong ( StatConstants . PROP_BUILTIN_INDEX_COUNT ) ) ) ) && ( ( stat . getBytes ( ) ) == ( entity . getLong ( StatConstants . PROP_BYTES ) ) ) ) && ( ( stat . getCompositeIndexBytes ( ) ) == ( entity . getLong ( StatConstants . PROP_COMPOSITE_INDEX_BYTES ) ) ) ) && ( ( stat . getCompositeIndexCount ( ) ) == ( entity . getLong ( StatConstants . PROP_COMPOSITE_INDEX_COUNT ) ) ) ) && ( ( stat . getCount ( ) ) == ( entity . getLong ( StatConstants . PROP_COUNT ) ) ) ) && ( ( stat . getEntityBytes ( ) ) == ( entity . getLong ( StatConstants . PROP_ENTITY_BYTES ) ) ) ) && ( com . jmethods . catatumbo . DatastoreStatsTest . equals ( stat . getTimestamp ( ) , entity . getTimestamp ( StatConstants . PROP_TIMESTAMP ) ) ) ; } return ( stat == null ) && ( entity == null ) ; }
|
org . junit . Assert . assertTrue ( com . jmethods . catatumbo . DatastoreStatsTest . equals ( stat , nativeEntity ) )
|
testCreate ( ) { org . oscarehr . billing . CA . BC . model . BillingHistory entity = new org . oscarehr . billing . CA . BC . model . BillingHistory ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
|
org . junit . Assert . assertNotNull ( entity . getId ( ) )
|
datasetShouldNotBeDeaccessionedWithArchivedAndReleasedVersions ( ) { java . util . List < edu . harvard . iq . dataverse . DatasetVersion > versionList = new java . util . ArrayList < edu . harvard . iq . dataverse . DatasetVersion > ( ) ; versionList . add ( this . archivedVersion ) ; versionList . add ( this . releasedVersion ) ; edu . harvard . iq . dataverse . Dataset dataset = new edu . harvard . iq . dataverse . Dataset ( ) ; dataset . setVersions ( versionList ) ; "<AssertPlaceHolder>" ; } isDeaccessioned ( ) { return versionState . equals ( edu . harvard . iq . dataverse . DatasetVersion . VersionState . DEACCESSIONED ) ; }
|
org . junit . Assert . assertFalse ( dataset . isDeaccessioned ( ) )
|
findExactFilePath ( ) { final java . nio . file . Path path = com . hartwig . hmftools . common . io . path . PathRegexFinder . build ( ) . findPath ( com . hartwig . hmftools . common . io . path . PathRegexFinderTest . BASE_DIRECTORY , com . hartwig . hmftools . common . io . path . PathRegexFinderTest . EXISTING_FILE ) ; "<AssertPlaceHolder>" ; } build ( ) { final java . util . Map < com . hartwig . hmftools . common . gc . GCBucket , java . lang . Integer > gcBucketMeans = com . google . common . collect . Maps . newHashMap ( ) ; for ( com . hartwig . hmftools . common . gc . GCBucket gcBucket : medianPerGCBucket . keySet ( ) ) { gcBucketMeans . put ( gcBucket , medianPerGCBucket . get ( gcBucket ) . median ( ) ) ; } return new com . hartwig . hmftools . common . gc . GCMedianReadCountImpl ( medianSample . mean ( ) , medianSample . median ( ) , gcBucketMeans ) ; }
|
org . junit . Assert . assertNotNull ( path )
|
testFileBlockReplicationAffectingMaintenance ( ) { int defaultReplication = getConf ( ) . getInt ( DFSConfigKeys . DFS_REPLICATION_KEY , DFSConfigKeys . DFS_REPLICATION_DEFAULT ) ; int defaultMaintenanceMinRepl = getConf ( ) . getInt ( DFSConfigKeys . DFS_NAMENODE_MAINTENANCE_REPLICATION_MIN_KEY , DFSConfigKeys . DFS_NAMENODE_MAINTENANCE_REPLICATION_MIN_DEFAULT ) ; int maintenanceMinRepl = defaultMaintenanceMinRepl + 1 ; int fileBlockReplication = maintenanceMinRepl + 1 ; int numAddedDataNodes = 1 ; int numInitialDataNodes = ( maintenanceMinRepl * 2 ) - numAddedDataNodes ; "<AssertPlaceHolder>" ; testFileBlockReplicationImpl ( maintenanceMinRepl , numInitialDataNodes , numAddedDataNodes , fileBlockReplication ) ; maintenanceMinRepl = defaultMaintenanceMinRepl + 1 ; fileBlockReplication = maintenanceMinRepl - 1 ; numAddedDataNodes = 0 ; numInitialDataNodes = ( maintenanceMinRepl * 2 ) - numAddedDataNodes ; testFileBlockReplicationImpl ( maintenanceMinRepl , numInitialDataNodes , numAddedDataNodes , fileBlockReplication ) ; } getInt ( java . lang . String , int ) { java . lang . String valueString = getTrimmed ( name ) ; if ( valueString == null ) return defaultValue ; java . lang . String hexString = getHexDigits ( valueString ) ; if ( hexString != null ) { return java . lang . Integer . parseInt ( hexString , 16 ) ; } return java . lang . Integer . parseInt ( valueString ) ; }
|
org . junit . Assert . assertTrue ( ( maintenanceMinRepl <= defaultReplication ) )
|
sum_n_values_java ( ) { int sumNValues = 0 ; for ( int x = 0 ; x < 5 ; x ++ ) { sumNValues += numbers . get ( x ) ; } "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 15 , sumNValues )
|
testFacilitiesName ( ) { org . matsim . api . core . v01 . Scenario scenario = org . matsim . core . scenario . ScenarioUtils . createScenario ( org . matsim . core . config . ConfigUtils . createConfig ( ) ) ; org . matsim . facilities . ActivityFacilities facilities = scenario . getActivityFacilities ( ) ; org . matsim . facilities . ActivityFacilitiesFactory factory = facilities . getFactory ( ) ; java . lang . String desc = "Some<sp>special<sp>text<sp>&<sp>that<sp>could<sp>pose<sp><problems><sp>to<sp>\"html\'<sp>or<sp>{<sp>json<sp>}." ; facilities . setName ( desc ) ; java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( 500 ) ; new org . matsim . facilities . FacilitiesWriter ( facilities ) . write ( outputStream ) ; scenario = org . matsim . core . scenario . ScenarioUtils . createScenario ( org . matsim . core . config . ConfigUtils . createConfig ( ) ) ; facilities = scenario . getActivityFacilities ( ) ; org . matsim . facilities . MatsimFacilitiesReader reader = new org . matsim . facilities . MatsimFacilitiesReader ( scenario ) ; java . io . ByteArrayInputStream inputStream = new java . io . ByteArrayInputStream ( outputStream . toByteArray ( ) ) ; reader . parse ( inputStream ) ; java . lang . String desc2 = facilities . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
|
org . junit . Assert . assertEquals ( desc , desc2 )
|
testEmpty ( ) { try ( org . apache . jackrabbit . oak . segment . file . JournalReader journalReader = createJournalReader ( "" ) ) { "<AssertPlaceHolder>" ; } } hasNext ( ) { return ( current . next ) != null ; }
|
org . junit . Assert . assertFalse ( journalReader . hasNext ( ) )
|
instantiation ( ) { org . junithelper . core . filter . impl . TrimQuotationFilter target = new org . junithelper . core . filter . impl . TrimQuotationFilter ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( target )
|
testGetExplanationChunkBuilderData1 ( ) { int type = ExplanationChunkBuilderFactory . DATA ; org . goodoldai . jeff . explanation . builder . ExplanationChunkBuilder result = instance . getExplanationChunkBuilder ( type ) ; "<AssertPlaceHolder>" ; } getExplanationChunkBuilder ( int ) { if ( ( i18nManager ) == null ) throw new org . goodoldai . jeff . explanation . ExplanationException ( "The<sp>i18nManager<sp>has<sp>not<sp>been<sp>set" ) ; if ( type == ( TEXT ) ) { if ( ( textExplanationChunkBuilder ) == null ) { textExplanationChunkBuilder = new org . goodoldai . jeff . explanation . builder . DefaultTextExplanationChunkBuilder ( i18nManager ) ; } return textExplanationChunkBuilder ; } if ( type == ( IMAGE ) ) { if ( ( imageExplanationChunkBuilder ) == null ) { imageExplanationChunkBuilder = new org . goodoldai . jeff . explanation . builder . DefaultImageExplanationChunkBuilder ( i18nManager ) ; } return imageExplanationChunkBuilder ; } if ( type == ( DATA ) ) { if ( ( dataExplanationChunkBuilder ) == null ) { dataExplanationChunkBuilder = new org . goodoldai . jeff . explanation . builder . DefaultDataExplanationChunkBuilder ( i18nManager ) ; } return dataExplanationChunkBuilder ; } throw new org . goodoldai . jeff . explanation . ExplanationException ( ( ( "Chunk<sp>type<sp>'" + type ) + "'<sp>was<sp>not<sp>recognized" ) ) ; }
|
org . junit . Assert . assertTrue ( ( result instanceof org . goodoldai . jeff . explanation . builder . DefaultDataExplanationChunkBuilder ) )
|
handleEvent_PercentType0invertPercentFalse_returnPercentType0 ( ) { org . openhab . binding . zwave . internal . converter . ZWaveMultiLevelSwitchConverter sut = new org . openhab . binding . zwave . internal . converter . ZWaveMultiLevelSwitchConverter ( controller ) ; java . util . Map < java . lang . String , java . lang . String > configMap = new java . util . HashMap ( ) ; configMap . put ( "config_invert_percent" , "false" ) ; when ( channel . getArguments ( ) ) . thenReturn ( configMap ) ; when ( event . getValue ( ) ) . thenReturn ( 0 ) ; when ( channel . getDataType ( ) ) . thenReturn ( DataType . PercentType ) ; org . eclipse . smarthome . core . types . State state = sut . handleEvent ( channel , event ) ; "<AssertPlaceHolder>" ; } handleEvent ( org . openhab . binding . zwave . handler . ZWaveThingChannel , org . openhab . binding . zwave . internal . protocol . event . ZWaveCommandClassValueEvent ) { logger . debug ( "NODE<sp>{}:<sp>Handle<sp>door<sp>lock<sp>event<sp>{}" , event . getNodeId ( ) , event . getType ( ) ) ; switch ( ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveDoorLockCommandClass . Type ) ( event . getType ( ) ) ) ) { case DOOR_LOCK_STATE : return handleEventLockState ( channel , event ) ; case DOOR_CONDITION : return handleEventCondition ( channel , event ) ; default : return null ; } }
|
org . junit . Assert . assertEquals ( new org . eclipse . smarthome . core . library . types . PercentType ( 0 ) , state )
|
mergeTest ( ) { boolean result = org . opendaylight . aaa . cert . utils . MdsalUtils . merge ( org . opendaylight . aaa . cert . test . MdsalUtilsTest . dataBroker , LogicalDatastoreType . CONFIGURATION , org . opendaylight . aaa . cert . test . MdsalUtilsTest . instanceIdentifier , org . opendaylight . aaa . cert . test . MdsalUtilsTest . sslData ) ; "<AssertPlaceHolder>" ; } merge ( org . opendaylight . mdsal . binding . api . DataBroker , org . opendaylight . mdsal . common . api . LogicalDatastoreType , org . opendaylight . yangtools . yang . binding . InstanceIdentifier , D extends org . opendaylight . yangtools . yang . binding . DataObject ) { final org . opendaylight . mdsal . binding . api . WriteTransaction transaction = dataBroker . newWriteOnlyTransaction ( ) ; transaction . merge ( logicalDatastoreType , path , data , true ) ; try { transaction . commit ( ) . get ( ) ; return true ; } catch ( java . lang . InterruptedException | java . util . concurrent . ExecutionException e ) { org . opendaylight . aaa . cert . utils . MdsalUtils . LOG . warn ( "Failed<sp>to<sp>merge<sp>{}<sp>" , path , e ) ; } return false ; }
|
org . junit . Assert . assertTrue ( result )
|
testListPropertyInitNotDirty ( ) { org . nuxeo . ecm . core . api . model . impl . ListProperty property = getListProperty ( ) ; "<AssertPlaceHolder>" ; } isDirty ( ) { return ( ( listDiff ) != null ) && ( listDiff . isDirty ( ) ) ; }
|
org . junit . Assert . assertFalse ( property . isDirty ( ) )
|
testCheckAttributeValueElixirNamespace ( ) { System . out . println ( "testCheckAttributeValue()" ) ; cz . metacentrum . perun . core . api . Attribute attribute = new cz . metacentrum . perun . core . api . Attribute ( ) ; attribute . setFriendlyName ( "login-namespace:elixir-persistent" ) ; attribute . setValue ( "28c5353b8bb34984a8bd4169ba94c606@elixir-europe.org" ) ; when ( cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_def_login_namespace_elixir_persistent_shadowTest . session . getPerunBl ( ) . getUsersManagerBl ( ) . getUsersByAttribute ( any ( cz . metacentrum . perun . core . api . PerunSession . class ) , any ( cz . metacentrum . perun . core . api . Attribute . class ) ) ) . thenReturn ( new java . util . ArrayList < cz . metacentrum . perun . core . api . User > ( ) { { add ( cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_def_login_namespace_elixir_persistent_shadowTest . user ) ; } } ) ; when ( cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_def_login_namespace_elixir_persistent_shadowTest . session . getPerunBl ( ) . getAttributesManagerBl ( ) . getAttribute ( any ( cz . metacentrum . perun . core . api . PerunSession . class ) , any ( cz . metacentrum . perun . core . api . User . class ) , anyString ( ) ) ) . thenReturn ( new cz . metacentrum . perun . core . api . Attribute ( ) { { setValue ( "28c5353b8bb34984a8bd4169ba94c606@elixir-europe.org" ) ; } } ) ; "<AssertPlaceHolder>" ; cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_def_login_namespace_elixir_persistent_shadowTest . classInstance . checkAttributeValue ( cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_def_login_namespace_elixir_persistent_shadowTest . session , cz . metacentrum . perun . core . impl . modules . attributes . urn_perun_user_attribute_def_def_login_namespace_elixir_persistent_shadowTest . user , attribute ) ; } getValue ( ) { return false ; }
|
org . junit . Assert . assertEquals ( attribute . getValue ( ) . toString ( ) , "28c5353b8bb34984a8bd4169ba94c606@elixir-europe.org" )
|
testRegions ( ) { com . runabove . api . RunAboveManager runAboveApi = login ( ) ; java . lang . String [ ] regions = runAboveApi . getRegions ( ) ; "<AssertPlaceHolder>" ; for ( java . lang . String string : regions ) { com . runabove . ApiTest . LOG . info ( ( "Regions<sp>" + string ) ) ; } } login ( ) { return new com . runabove . api . RunAboveBuilder ( getConfig ( ) ) . createManager ( new com . runabove . MockClient ( ) ) ; }
|
org . junit . Assert . assertNotNull ( regions )
|
copyToLocalWildcardNotDir ( ) { java . lang . String testDir = alluxio . client . cli . fs . FileSystemShellUtilsTest . resetFileHierarchy ( mFileSystem ) ; new java . io . File ( ( ( mLocalAlluxioCluster . getAlluxioHome ( ) ) + "/testDir" ) ) . mkdir ( ) ; new java . io . File ( ( ( mLocalAlluxioCluster . getAlluxioHome ( ) ) + "/testDir/testFile" ) ) . createNewFile ( ) ; int ret = mFsShell . run ( "cp" , ( testDir + "/*/foo*" ) , ( ( "file://" + ( mLocalAlluxioCluster . getAlluxioHome ( ) ) ) + "/testDir/testFile" ) ) ; "<AssertPlaceHolder>" ; } getAlluxioHome ( ) { return mWorkDirectory ; }
|
org . junit . Assert . assertEquals ( ( - 1 ) , ret )
|
testGetPartId ( ) { JWBF . cache = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . String > builder ( ) . put ( "jwbf-generic-mediawiki" , "anyVersion" ) . build ( ) ; java . lang . String partId = net . sourceforge . jwbf . JWBF . getPartId ( net . sourceforge . jwbf . mediawiki . bots . MediaWikiBot . class ) ; "<AssertPlaceHolder>" ; } getPartId ( java . lang . Class ) { return net . sourceforge . jwbf . JWBF . getPartInfo ( net . sourceforge . jwbf . JWBF . lazyVersion ( ) , clazz , ( "No<sp>Module<sp>for<sp>" + ( clazz . getName ( ) ) ) ) . id ; }
|
org . junit . Assert . assertEquals ( "jwbf-generic-mediawiki" , partId )
|
setMergedFalse ( ) { reset ( gridLayer ) ; dtPresenter . setMerged ( false ) ; "<AssertPlaceHolder>" ; verify ( gridLayer , times ( 1 ) ) . draw ( ) ; } isMerged ( ) { return uiModel . isMerged ( ) ; }
|
org . junit . Assert . assertFalse ( dtPresenter . isMerged ( ) )
|
getActionsWhenHostNotSet ( ) { org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . MetacardActionProvider actionProvider = createMetacardActionProvider ( ) ; when ( actionProvider . canHandleMetacard ( metacard ) ) . thenReturn ( true ) ; when ( actionProvider . createMetacardAction ( eq ( org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . ACTION_ID ) , eq ( org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . TITLE ) , eq ( org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . DESCRIPTION ) , any ( ) ) ) . thenReturn ( action ) ; when ( actionProvider . getMetacardActionUrl ( org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . SOURCE_ID , metacard ) ) . thenReturn ( org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . url ) ; java . lang . System . clearProperty ( SystemBaseUrl . EXTERNAL_HOST ) ; ddf . action . Action action = actionProvider . getAction ( metacard ) ; "<AssertPlaceHolder>" ; verify ( actionProvider ) . createMetacardAction ( org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . ACTION_ID , org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . TITLE , org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . DESCRIPTION , org . codice . ddf . catalog . actions . AbstractMetacardActionProviderTest . url ) ; } getAction ( T ) { return new ddf . action . impl . ActionImpl ( org . codice . ddf . security . servlet . logout . KarafLogoutAction . ID , org . codice . ddf . security . servlet . logout . KarafLogoutAction . TITLE , org . codice . ddf . security . servlet . logout . KarafLogoutAction . DESCRIPTION , org . codice . ddf . security . servlet . logout . KarafLogoutAction . logoutUrl ) ; }
|
org . junit . Assert . assertThat ( action , org . hamcrest . Matchers . is ( this . action ) )
|
parse ( ) { java . lang . String rac = "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)" + ( ( "(ADDRESS=(PROTOCOL=TCP)(HOST=1.2.3.4)<sp>(PORT=1521))" + "(ADDRESS=(PROTOCOL=TCP)(HOST=1.2.3.5)<sp>(PORT=1522))" ) + "(CONNECT_DATA=(SERVICE_NAME=service)))" ) ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . OracleNetConnectionDescriptorParser parser = new com . navercorp . pinpoint . plugin . jdbc . oracle . parser . OracleNetConnectionDescriptorParser ( rac ) ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . KeyValue keyValue = parser . parse ( ) ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Description description = new com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Description ( keyValue ) ; com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Description value = new com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Description ( ) ; value . setServiceName ( "service" ) ; value . addAddress ( "tcp" , "1.2.3.4" , "1521" ) ; value . addAddress ( "tcp" , "1.2.3.5" , "1522" ) ; "<AssertPlaceHolder>" ; } addAddress ( java . lang . String , java . lang . String , java . lang . String ) { this . addressList . add ( new com . navercorp . pinpoint . plugin . jdbc . oracle . parser . Address ( protocol , host , port ) ) ; }
|
org . junit . Assert . assertEquals ( description , value )
|
encodeBase64WithMultipleOf4CharactersSuccess ( ) { java . lang . String textToEncode = "This<sp>is<sp>a<sp>valid<sp>test>>>>????(aBcDeFgHiJKLmnoPqRstuVWXyz)0123456789" ; java . lang . String expectedBase64Result = "VGhpcyBpcyBhIHZhbGlkIHRlc3Q+Pj4+Pz8/PyhhQmNEZUZnSGlKS0xtbm9QcVJzdHVWV1h5eikwMTIzNDU2Nzg5" ; byte [ ] result = com . microsoft . azure . sdk . iot . deps . util . Base64 . encodeBase64Local ( textToEncode . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } getBytes ( ) { return this . body ; }
|
org . junit . Assert . assertEquals ( expectedBase64Result , new java . lang . String ( result ) )
|
testLexerNotSetWithRange2 ( ) { org . antlr . v4 . tool . LexerGrammar lg = new org . antlr . v4 . tool . LexerGrammar ( ( "mode<sp>0:0\n" 4 + "ID<sp>:<sp>~(\'a\'|\'b\')<sp>~(\'e\'|\'p\'..\'t\')\n<sp>;" ) ) ; java . lang . String expecting = "max<sp>type<sp>1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "mode<sp>0:0\n" 5 + "1:RULE_START<sp>0\n" ) + "2:RULE_STOP<sp>0\n" ) + "mode<sp>0:0\n" 3 ) + "mode<sp>0:0\n" 6 ) + "mode<sp>0:0\n" 8 ) + "rule<sp>0:1<sp>1\n" ) + "mode<sp>0:0\n" ) + "0:\'a\'..\'b\'\n" ) + "mode<sp>0:0\n" 2 ) + "mode<sp>0:0\n" 7 ) + "1->3<sp>EPSILON<sp>0,0,0\n" ) + "mode<sp>0:0\n" 0 ) + "4->5<sp>NOT_SET<sp>1,0,0\n" ) + "5->2<sp>EPSILON<sp>0,0,0\n" ) + "mode<sp>0:0\n" 1 ) ; org . antlr . v4 . runtime . atn . ATN atn = createATN ( lg , true ) ; java . lang . String result = org . antlr . v4 . runtime . atn . ATNSerializer . getDecoded ( atn , java . util . Arrays . asList ( lg . getTokenNames ( ) ) ) ; "<AssertPlaceHolder>" ; } getTokenNames ( ) { int numTokens = getMaxTokenType ( ) ; java . lang . String [ ] tokenNames = new java . lang . String [ numTokens + 1 ] ; for ( int i = 0 ; i < ( tokenNames . length ) ; i ++ ) { tokenNames [ i ] = getTokenName ( i ) ; } return tokenNames ; }
|
org . junit . Assert . assertEquals ( expecting , result )
|
shouldGenerateXmlReportFile ( ) { final java . io . File reportFile = ro . isdc . wro . util . WroUtil . createTempFile ( ) ; try { ( ( ro . isdc . wro . maven . plugin . JsHintMojo ) ( getMojo ( ) ) ) . setReportFile ( reportFile ) ; getMojo ( ) . setOptions ( "undef,<sp>browser" ) ; getMojo ( ) . setTargetGroups ( null ) ; getMojo ( ) . setFailNever ( true ) ; getMojo ( ) . setIgnoreMissingResources ( true ) ; getMojo ( ) . execute ( ) ; } finally { "<AssertPlaceHolder>" ; org . apache . commons . io . FileUtils . deleteQuietly ( reportFile ) ; } } execute ( ) { if ( skip ) { getLog ( ) . info ( "buildDirectory:<sp>" 5 ) ; } else { validate ( ) ; if ( ( buildDirectory ) == null ) { buildDirectory = new java . io . File ( mavenProject . getModel ( ) . getBuild ( ) . getDirectory ( ) ) ; } getLog ( ) . info ( contextFolder ) ; getLog ( ) . info ( "Executing<sp>the<sp>mojo:<sp>" ) ; getLog ( ) . info ( ( "buildDirectory:<sp>" 1 + ( wroFile . getPath ( ) ) ) ) ; getLog ( ) . info ( ( "targetGroups:<sp>" + ( getTargetGroups ( ) ) ) ) ; getLog ( ) . info ( ( "buildDirectory:<sp>" 4 + ( isMinimize ( ) ) ) ) ; getLog ( ) . info ( ( "buildDirectory:<sp>" 0 + ( isIgnoreMissingResources ( ) ) ) ) ; getLog ( ) . info ( ( "parallelProcessing:<sp>" + ( isParallelProcessing ( ) ) ) ) ; getLog ( ) . info ( ( "buildDirectory:<sp>" + ( buildDirectory ) ) ) ; getLog ( ) . debug ( ( "wroManagerFactory:<sp>" + ( wroManagerFactory ) ) ) ; getLog ( ) . debug ( ( "incrementalBuildEnabled:<sp>" + ( incrementalBuildEnabled ) ) ) ; getLog ( ) . debug ( ( "extraConfig:<sp>" + ( extraConfigFile ) ) ) ; extendPluginClasspath ( ) ; ro . isdc . wro . config . Context . set ( ro . isdc . wro . config . Context . standaloneContext ( ) ) ; try { onBeforeExecute ( ) ; doExecute ( ) ; } catch ( final java . lang . Exception e ) { final java . lang . String message = ( ( ( ( "Exception<sp>occured<sp>while<sp>processing:<sp>" + ( e . toString ( ) ) ) + ",<sp>class:<sp>" ) + ( e . getClass ( ) . getName ( ) ) ) + ",caused<sp>by:<sp>" ) + ( ( e . getCause ( ) ) != null ? e . getCause ( ) . getClass ( ) . getName ( ) : "buildDirectory:<sp>" 2 ) ; getLog ( ) . error ( message , e ) ; if ( e instanceof ro . isdc . wro . WroRuntimeException ) { final ro . isdc . wro . model . resource . Resource resource = ( ( ro . isdc . wro . WroRuntimeException ) ( e ) ) . getResource ( ) ; forgetResource ( resource ) ; } throw new org . apache . maven . plugin . MojoExecutionException ( message , e ) ; } finally { try { onAfterExecute ( ) ; } catch ( final java . lang . Exception e ) { throw new org . apache . maven . plugin . MojoExecutionException ( "buildDirectory:<sp>" 3 , e ) ; } finally { getWroManager ( ) . destroy ( ) ; } } } }
|
org . junit . Assert . assertTrue ( ( ( reportFile . length ( ) ) > 1000 ) )
|
listWithOneItemShouldHaveOneItem ( ) { "<AssertPlaceHolder>" ; } count ( java . lang . Iterable ) { if ( iterable instanceof java . util . Collection ) { return ( ( java . util . Collection ) ( iterable ) ) . size ( ) ; } return org . neo4j . helpers . collection . Iterables . count ( iterable ) ; }
|
org . junit . Assert . assertEquals ( 1 , count ( asList ( "test" ) ) )
|
testRPCWithResult ( ) { java . lang . String result = "result" ; java . util . concurrent . Future < java . lang . String > future = com . liferay . portal . fabric . netty . rpc . RPCUtil . execute ( _embeddedChannel , new com . liferay . portal . fabric . netty . rpc . RPCUtilTest . ResultRPCCallable ( result ) ) ; _embeddedChannel . writeOneInbound ( _embeddedChannel . readOutbound ( ) ) ; _embeddedChannel . writeOneInbound ( _embeddedChannel . readOutbound ( ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return _byteBuffer . get ( ) ; }
|
org . junit . Assert . assertEquals ( result , future . get ( ) )
|
testRondConverteerReisdocument ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder builder = maakLo3PersoonslijstBuilder ( ) ; voegReisdocumentToe ( builder ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Persoonslijst lo3Persoonslijst = builder . build ( ) ; final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst brpPersoonslijst = converteerLo3NaarBrpService . converteerLo3Persoonslijst ( lo3Persoonslijst ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Persoonslijst lo3Terug = converteerBrpNaarLo3Service . converteerBrpPersoonslijst ( brpPersoonslijst ) ; "<AssertPlaceHolder>" ; } getReisdocumentStapels ( ) { return reisdocumentStapels ; }
|
org . junit . Assert . assertEquals ( lo3Persoonslijst . getReisdocumentStapels ( ) , lo3Terug . getReisdocumentStapels ( ) )
|
whenPostRequestToEmployeeServlet_thenEmployeeReturnedAsJson ( ) { int id = 1 ; java . lang . String name = "Karan<sp>Khanna" ; java . lang . String department = "IT" ; long salary = 5000 ; employee = new com . baeldung . model . Employee ( id , name , department , salary ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; java . io . PrintWriter pw = new java . io . PrintWriter ( sw ) ; when ( httpServletResponse . getWriter ( ) ) . thenReturn ( pw ) ; com . baeldung . servlets . EmployeeServlet employeeServlet = new com . baeldung . servlets . EmployeeServlet ( ) ; employeeServlet . doGet ( httpServletRequest , httpServletResponse ) ; java . lang . String employeeJsonString = sw . getBuffer ( ) . toString ( ) . trim ( ) ; com . baeldung . model . Employee fetchedEmployee = new com . google . gson . Gson ( ) . fromJson ( employeeJsonString , com . baeldung . model . Employee . class ) ; "<AssertPlaceHolder>" ; } trim ( ) { engine . eval ( new java . io . InputStreamReader ( com . baeldung . scripting . NashornUnitTest . class . getResourceAsStream ( "/js/trim.js" ) ) ) ; }
|
org . junit . Assert . assertEquals ( fetchedEmployee , employee )
|
testGetPages ( ) { doReturn ( GuidedDecisionTable52 . TableFormat . EXTENDED_ENTRY ) . when ( plugin ) . tableFormat ( ) ; final java . util . List < org . uberfire . ext . widgets . core . client . wizards . WizardPage > pages = plugin . getPages ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return patternsByColumnNumber . size ( ) ; }
|
org . junit . Assert . assertEquals ( 4 , pages . size ( ) )
|
testGetJobsWhenNamespaceSpecifiedButDoesNotExistAssertResultEmpty ( ) { java . lang . String namespace = "namespace" ; java . lang . String jobName = "jobName" ; org . finra . herd . model . api . xml . JobStatusEnum jobStatus = org . finra . herd . model . api . xml . JobStatusEnum . COMPLETED ; java . util . Set < java . lang . String > authorizedNamespaces = new java . util . HashSet ( java . util . Arrays . asList ( namespace ) ) ; when ( namespaceSecurityHelper . getAuthorizedNamespaces ( any ( ) ) ) . thenReturn ( authorizedNamespaces ) ; when ( namespaceDao . getNamespaceByCd ( any ( ) ) ) . thenReturn ( null ) ; org . finra . herd . model . api . xml . JobSummaries getJobsResult = jobServiceImpl . getJobs ( namespace , jobName , jobStatus , org . finra . herd . service . NO_START_TIME , org . finra . herd . service . NO_END_TIME ) ; java . util . List < org . finra . herd . model . api . xml . JobSummary > jobSummaries = getJobsResult . getJobSummaries ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return org . finra . herd . service . helper . NotificationMessageInMemoryQueue . QUEUE . get ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , jobSummaries . size ( ) )
|
givenCSVFile_whenOpencsv_thenContentsAsExpected ( ) { java . util . List < java . util . List < java . lang . String > > records = new java . util . ArrayList < java . util . List < java . lang . String > > ( ) ; try ( com . opencsv . CSVReader csvReader = new com . opencsv . CSVReader ( new java . io . FileReader ( com . baeldung . csv . ReadCSVInArrayUnitTest . CSV_FILE ) ) ) { java . lang . String [ ] values = null ; while ( ( values = csvReader . readNext ( ) ) != null ) { records . add ( java . util . Arrays . asList ( values ) ) ; } } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } for ( int i = 0 ; i < ( com . baeldung . csv . ReadCSVInArrayUnitTest . EXPECTED_ARRAY . size ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( java . lang . Long ) { return io . github . jhipster . web . util . ResponseUtil . wrapOrNotFound ( auditEventService . find ( id ) ) ; }
|
org . junit . Assert . assertArrayEquals ( com . baeldung . csv . ReadCSVInArrayUnitTest . EXPECTED_ARRAY . get ( i ) . toArray ( ) , records . get ( i ) . toArray ( ) )
|
testPopulateReleases_setEmrReleaseToFirstElementFromEmrReleasesList ( ) { java . lang . String expectedEmrRelease = "emr-5.11.0" ; org . pentaho . amazon . hive . job . AmazonHiveJobExecutor jobEntry = spy ( new org . pentaho . amazon . hive . job . AmazonHiveJobExecutor ( ) ) ; org . pentaho . amazon . hive . ui . AmazonHiveJobExecutorController hiveJobExecutorController = org . powermock . api . mockito . PowerMockito . spy ( new org . pentaho . amazon . hive . ui . AmazonHiveJobExecutorController ( container , jobEntry , bindingFactory ) ) ; jobEntry . setEmrRelease ( null ) ; org . pentaho . ui . xul . util . AbstractModelList < java . lang . String > listReleases = org . powermock . reflect . Whitebox . invokeMethod ( hiveJobExecutorController , "populateReleases" ) ; verify ( hiveJobExecutorController , times ( 2 ) ) . getJobEntry ( ) ; verify ( jobEntry , times ( 2 ) ) . setEmrRelease ( listReleases . get ( 0 ) ) ; "<AssertPlaceHolder>" ; } getEmrRelease ( ) { return emrRelease ; }
|
org . junit . Assert . assertEquals ( expectedEmrRelease , jobEntry . getEmrRelease ( ) )
|
testGetEstimatedDurationWithOneRun ( ) { final java . util . SortedMap < java . lang . Integer , hudson . model . SimpleJobTest . TestBuild > runs = new java . util . TreeMap < java . lang . Integer , hudson . model . SimpleJobTest . TestBuild > ( ) ; hudson . model . Job project = createMockProject ( runs ) ; hudson . model . SimpleJobTest . TestBuild lastBuild = new hudson . model . SimpleJobTest . TestBuild ( project , Result . SUCCESS , 42 , null ) ; runs . put ( 1 , lastBuild ) ; "<AssertPlaceHolder>" ; } getEstimatedDuration ( ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 42 , project . getEstimatedDuration ( ) )
|
testRemove ( ) { com . liferay . asset . kernel . model . AssetCategory newAssetCategory = addAssetCategory ( ) ; _persistence . remove ( newAssetCategory ) ; com . liferay . asset . kernel . model . AssetCategory existingAssetCategory = _persistence . fetchByPrimaryKey ( newAssetCategory . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingAssetCategory )
|
testShouldBeAbleToPassAWebElementAsArgument ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . WebElement button = driver . findElement ( org . openqa . selenium . By . id ( "plainButton" ) ) ; java . lang . String value = ( ( java . lang . String ) ( executeScript ( "arguments[0]['flibble']<sp>=<sp>arguments[0].getAttribute('id');<sp>return<sp>arguments[0]['flibble'];" , button ) ) ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String , java . lang . Object [ ] ) { return null ; }
|
org . junit . Assert . assertEquals ( "plainButton" , value )
|
testSetSubIdNullRemoval ( ) { pool . getSourceSubscription ( ) . setSubscriptionSubKey ( null ) ; pool . setSubscriptionId ( null ) ; "<AssertPlaceHolder>" ; } getSourceSubscription ( ) { return sourceSubscription ; }
|
org . junit . Assert . assertNull ( pool . getSourceSubscription ( ) )
|
testSetAllMinReadBufferSize ( ) { org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig config = new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig ( ) ; config . init ( new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoAcceptor ( config ) ) ; org . kaazing . mina . netty . socket . nio . NioSocketChannelIoSessionConfig acceptedConfig = new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoSessionConfig ( new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfigTest . DefaultNioSocketChannelConfig ( new java . net . Socket ( ) ) ) ; acceptedConfig . setAll ( config ) ; "<AssertPlaceHolder>" ; } setAll ( org . apache . mina . core . session . IoSessionConfig ) { if ( config == null ) { throw new java . lang . NullPointerException ( "config" ) ; } if ( org . apache . mina . core . session . AbstractIoSessionConfig . ENABLE_BUFFER_SIZE ) { System . out . println ( "AbstractIoSessionConfig.setAll()" ) ; setReadBufferSize ( config . getReadBufferSize ( ) ) ; setMinReadBufferSize ( config . getMinReadBufferSize ( ) ) ; setMaxReadBufferSize ( config . getMaxReadBufferSize ( ) ) ; } setIdleTime ( IdleStatus . BOTH_IDLE , config . getIdleTime ( IdleStatus . BOTH_IDLE ) ) ; setIdleTime ( IdleStatus . READER_IDLE , config . getIdleTime ( IdleStatus . READER_IDLE ) ) ; setIdleTime ( IdleStatus . WRITER_IDLE , config . getIdleTime ( IdleStatus . WRITER_IDLE ) ) ; setWriteTimeout ( config . getWriteTimeout ( ) ) ; setUseReadOperation ( config . isUseReadOperation ( ) ) ; setThroughputCalculationInterval ( config . getThroughputCalculationInterval ( ) ) ; doSetAll ( config ) ; }
|
org . junit . Assert . assertEquals ( config . getMinReadBufferSize ( ) , acceptedConfig . getMinReadBufferSize ( ) )
|
testParametersOkDstu2 ( ) { ca . uhn . fhir . model . dstu2 . resource . Patient patient = new ca . uhn . fhir . model . dstu2 . resource . Patient ( ) ; patient . addName ( ) . addGiven ( "James" ) ; patient . setBirthDate ( new ca . uhn . fhir . model . primitive . DateDt ( "2011-02-02" ) ) ; ca . uhn . fhir . model . dstu2 . resource . Parameters input = new ca . uhn . fhir . model . dstu2 . resource . Parameters ( ) ; input . addParameter ( ) . setName ( "resource" ) . setResource ( patient ) ; ca . uhn . fhir . validation . FhirValidator val = org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourCtxDstu2 . newValidator ( ) ; val . registerValidatorModule ( org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourValidator ) ; ca . uhn . fhir . validation . ValidationResult result = val . validateWithResult ( input ) ; org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourLog . info ( org . hl7 . fhir . instance . hapi . validation . FhirInstanceValidatorDstu2Test . ourCtxDstu2 . newJsonParser ( ) . setPrettyPrint ( true ) . encodeResourceToString ( result . toOperationOutcome ( ) ) ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return myIsSuccessful ; }
|
org . junit . Assert . assertTrue ( result . isSuccessful ( ) )
|
resetBranchHeadTest ( ) { org . eclipse . jgit . lib . AnyObjectId firstCommit = initRepository ( ) ; writeToCache ( "a.txt" ) ; java . lang . String branchName = "second" ; org . eclipse . jgit . lib . AnyObjectId branchCommit = commitToBranch ( branchName , firstCommit ) ; com . beijunyi . parallelgit . utils . BranchUtils . resetBranchHead ( Constants . MASTER , branchCommit , repo ) ; "<AssertPlaceHolder>" ; } getHeadCommit ( java . lang . String , com . beijunyi . parallelgit . utils . Repository ) { com . beijunyi . parallelgit . utils . Ref ref = com . beijunyi . parallelgit . utils . RefUtils . getBranchRef ( name , repo ) ; return com . beijunyi . parallelgit . utils . CommitUtils . getCommit ( ref . getObjectId ( ) , repo ) ; }
|
org . junit . Assert . assertEquals ( branchCommit , com . beijunyi . parallelgit . utils . BranchUtils . getHeadCommit ( Constants . MASTER , repo ) )
|
testOverridingStateDisabled ( ) { descriptor . setState ( FeatureState . DISABLED ) ; com . tacitknowledge . flip . model . FeatureState state = descriptor . process ( contextManager ) ; "<AssertPlaceHolder>" ; } process ( com . tacitknowledge . flip . context . ContextManager ) { if ( ( conditions ) != null ) { for ( final com . tacitknowledge . flip . model . FeatureCondition condition : conditions ) { if ( ( condition . process ( contextManager ) ) != ( FeatureState . ENABLED ) ) { return null ; } } } return state ; }
|
org . junit . Assert . assertEquals ( FeatureState . DISABLED , state )
|
shouldNotBeValidWithNotEnoughCustomLength ( ) { when ( parameterService . findAll ( Key . API_QUALITY_METRICS_DESCRIPTION_MIN_LENGTH ) ) . thenReturn ( java . util . Arrays . asList ( "3" ) ) ; io . gravitee . management . model . api . ApiEntity api = mock ( io . gravitee . management . model . api . ApiEntity . class ) ; when ( api . getDescription ( ) ) . thenReturn ( "12" ) ; boolean valid = srv . isValid ( api ) ; "<AssertPlaceHolder>" ; } isValid ( io . gravitee . management . model . api . ApiEntity ) { return ( ( api . getViews ( ) ) != null ) && ( ! ( api . getViews ( ) . isEmpty ( ) ) ) ; }
|
org . junit . Assert . assertFalse ( valid )
|
getReadyTimeout ( ) { configSettings . put ( PropertyHandler . READY_TIMEOUT , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . READY_TIMEOUT , "300000" ) ) ; propertyHandler = new org . oscm . app . openstack . controller . PropertyHandler ( settings ) ; long time = propertyHandler . getReadyTimeout ( ) ; "<AssertPlaceHolder>" ; } getReadyTimeout ( ) { configSettings . put ( PropertyHandler . READY_TIMEOUT , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . READY_TIMEOUT , "300000" ) ) ; propertyHandler = new org . oscm . app . openstack . controller . PropertyHandler ( settings ) ; long time = propertyHandler . getReadyTimeout ( ) ; org . junit . Assert . assertEquals ( 300000 , time ) ; }
|
org . junit . Assert . assertEquals ( 300000 , time )
|
testGetByte ( ) { byte [ ] data = new byte [ ] { 100 } ; "<AssertPlaceHolder>" ; } getByte ( byte [ ] ) { if ( ( ( data . length ) * ( NetUtils . NUM_BITS_IN_A_BYTE ) ) > ( Byte . SIZE ) ) { org . opendaylight . l2switch . packethandler . decoders . utils . BitBufferHelper . LOG . error ( "getByte" , new org . opendaylight . l2switch . packethandler . decoders . utils . BufferException ( "Container<sp>is<sp>too<sp>small<sp>for<sp>the<sp>number<sp>of<sp>requested<sp>bits" ) ) ; } return data [ 0 ] ; }
|
org . junit . Assert . assertTrue ( ( ( org . opendaylight . l2switch . packethandler . decoders . utils . BitBufferHelper . getByte ( data ) ) == 100 ) )
|
testFetchRequestMaxBytesOldVersions ( ) { final short version = 1 ; org . apache . kafka . common . requests . FetchRequest fr = createFetchRequest ( version ) ; org . apache . kafka . common . requests . FetchRequest fr2 = new org . apache . kafka . common . requests . FetchRequest ( fr . toStruct ( ) , version ) ; "<AssertPlaceHolder>" ; } maxBytes ( ) { return maxBytes ; }
|
org . junit . Assert . assertEquals ( fr2 . maxBytes ( ) , fr . maxBytes ( ) )
|
testConvert ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; java . lang . Long id = 1L ; java . lang . Long timePeriodId = 2L ; org . lnu . is . domain . timeperiod . TimePeriod timePeriod = new org . lnu . is . domain . timeperiod . TimePeriod ( ) ; timePeriod . setId ( timePeriodId ) ; org . lnu . is . domain . specoffer . SpecOfferType source = new org . lnu . is . domain . specoffer . SpecOfferType ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; source . setId ( id ) ; source . setTimePeriod ( timePeriod ) ; org . lnu . is . resource . specoffer . type . SpecOfferTypeResource expected = new org . lnu . is . resource . specoffer . type . SpecOfferTypeResource ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; expected . setTimePeriodId ( timePeriodId ) ; expected . setId ( id ) ; org . lnu . is . resource . specoffer . type . SpecOfferTypeResource actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testKind ( ) { org . antlr . runtime . tree . CommonTree sink = com . cloudera . flume . conf . FlumeBuilder . parseSink ( com . cloudera . flume . conf . TestPatternMatch . simple ) ; com . cloudera . flume . conf . PatternMatch pp = com . cloudera . flume . conf . PatternMatch . kind ( "DECO" ) ; java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > m = pp . match ( sink ) ; "<AssertPlaceHolder>" ; dumpMatches ( m ) ; com . cloudera . flume . conf . TestPatternMatch . LOG . info ( m ) ; } match ( org . antlr . runtime . tree . CommonTree ) { switch ( pt ) { case WILD : return new java . util . HashMap < java . lang . String , org . antlr . runtime . tree . CommonTree > ( ) ; case VAR : { java . lang . String x = ( ( java . lang . String ) ( args [ 0 ] ) ) ; com . cloudera . flume . conf . PatternMatch pv = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ 1 ] ) ) ; java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > m = pv . match ( ct ) ; if ( m == null ) { return null ; } m . put ( x , ct ) ; return m ; } case KIND : java . lang . String k = ( ( java . lang . String ) ( args [ 0 ] ) ) ; if ( ( ct != null ) && ( k . equals ( ct . getText ( ) ) ) ) { return new java . util . HashMap < java . lang . String , org . antlr . runtime . tree . CommonTree > ( ) ; } return null ; case TUPLE : { com . cloudera . flume . conf . PatternMatch parent = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ 0 ] ) ) ; if ( ct == null ) { return null ; } java . util . List < org . antlr . runtime . tree . CommonTree > ch = ct . getChildren ( ) ; if ( ch == null ) { return null ; } if ( ( ( ch . size ( ) ) + 1 ) != ( args . length ) ) { return null ; } java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > mps = parent . match ( ct ) ; if ( mps == null ) return null ; java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > ret = new java . util . HashMap < java . lang . String , org . antlr . runtime . tree . CommonTree > ( ) ; for ( int i = ch . size ( ) ; i >= 1 ; i -- ) { org . antlr . runtime . tree . CommonTree e = ch . get ( ( i - 1 ) ) ; com . cloudera . flume . conf . PatternMatch p = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ i ] ) ) ; java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > match = p . match ( e ) ; if ( match != null ) { ret . putAll ( match ) ; } else { return null ; } } ret . putAll ( mps ) ; return ret ; } case PARENT : { com . cloudera . flume . conf . PatternMatch parent = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ 0 ] ) ) ; com . cloudera . flume . conf . PatternMatch child = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ 1 ] ) ) ; if ( ct == null ) { return null ; } java . util . List < org . antlr . runtime . tree . CommonTree > ch = ct . getChildren ( ) ; if ( ch == null ) { return null ; } java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > ret = parent . match ( ct ) ; if ( ret == null ) return null ; for ( org . antlr . runtime . tree . CommonTree e : ch ) { java . util . Map < java . lang . String , org . antlr . runtime . tree . CommonTree > match = child . match ( e ) ; if ( match != null ) { match . putAll ( ret ) ; return match ; } } return null ; } case PARENT_NTH : { com . cloudera . flume . conf . PatternMatch parent = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ 0 ] ) ) ; com . cloudera . flume . conf . PatternMatch child = ( ( com . cloudera . flume . conf . PatternMatch ) ( args [ 1 ] ) ) ; java . lang . Integer nth = ( ( java . lang . Integer ) ( args [
|
org . junit . Assert . assertNotNull ( m )
|
testSomeEmptyOffsetsAdjacency ( ) { java . lang . String query = buildFunction ( ContentFunctions . CONTENT_ADJACENT_FUNCTION_NAME , "BODY" , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'foo'" , "'bar'" , "'car'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . createExpression ( query ) ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list1 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list2 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list3 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list4 ; list1 = asList ( 296 ) ; list2 = asList ( 1079 ) ; list3 = asList ( 260 , 284 , 304 ) ; list4 = asList ( 1165 ) ; termOffSetMap . put ( "foo" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "BODY" , true , eventId ) , list1 ) ) ) ; termOffSetMap . put ( "bar" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "BODY" , true , eventId ) , list2 ) ) ) ; termOffSetMap . put ( "car" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "BODY" , true , eventId ) , list3 ) , com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "META" , true , eventId ) , list4 ) ) ) ; context . set ( Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , termOffSetMap ) ; context . set ( "BODY" , java . util . Arrays . asList ( "foo" , "bar" , "car" ) ) ; java . lang . Object o = expr . evaluate ( context ) ; "<AssertPlaceHolder>" ; } expect ( java . lang . Object , java . lang . Boolean ) { if ( null == result ) { return Boolean . FALSE . equals ( expected ) ; } if ( result instanceof java . lang . Boolean ) { return result . equals ( expected ) ; } return false ; }
|
org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , false ) )
|
setBaseUrlExplicitly ( ) { fixture . baseUrl ( "http://localhost:1234" ) ; "<AssertPlaceHolder>" ; } getBaseUrl ( ) { return restFixture . getBaseUrl ( ) ; }
|
org . junit . Assert . assertThat ( fixture . getBaseUrl ( ) . toString ( ) , org . hamcrest . CoreMatchers . is ( "http://localhost:1234" ) )
|
testDesignNoElementOnPhysicalNetwork ( ) { final com . cloud . network . dao . PhysicalNetworkVO physnet = mock ( com . cloud . network . dao . PhysicalNetworkVO . class ) ; when ( physnetdao . findById ( ( ( java . lang . Long ) ( any ( ) ) ) ) ) . thenReturn ( physnet ) ; when ( physnet . getIsolationMethods ( ) ) . thenReturn ( java . util . Arrays . asList ( new java . lang . String [ ] { "STT" , "VXLAN" } ) ) ; when ( physnet . getId ( ) ) . thenReturn ( com . cloud . network . guru . NiciraNvpGuestNetworkGuruTest . NETWORK_ID ) ; mock ( com . cloud . network . NiciraNvpDeviceVO . class ) ; when ( nvpdao . listByPhysicalNetwork ( com . cloud . network . guru . NiciraNvpGuestNetworkGuruTest . NETWORK_ID ) ) . thenReturn ( java . util . Collections . < com . cloud . network . NiciraNvpDeviceVO > emptyList ( ) ) ; final com . cloud . offering . NetworkOffering offering = mock ( com . cloud . offering . NetworkOffering . class ) ; when ( offering . getId ( ) ) . thenReturn ( com . cloud . network . guru . NiciraNvpGuestNetworkGuruTest . NETWORK_ID ) ; when ( offering . getTrafficType ( ) ) . thenReturn ( TrafficType . Guest ) ; when ( offering . getGuestType ( ) ) . thenReturn ( GuestType . Isolated ) ; final com . cloud . deploy . DeploymentPlan plan = mock ( com . cloud . deploy . DeploymentPlan . class ) ; final com . cloud . legacymodel . network . Network network = mock ( com . cloud . legacymodel . network . Network . class ) ; final com . cloud . legacymodel . user . Account account = mock ( com . cloud . legacymodel . user . Account . class ) ; final com . cloud . legacymodel . network . Network designednetwork = guru . design ( offering , plan , network , account ) ; "<AssertPlaceHolder>" ; } design ( com . cloud . offering . NetworkOffering , com . cloud . deploy . DeploymentPlan , com . cloud . legacymodel . network . Network , com . cloud . legacymodel . user . Account ) { final com . cloud . network . dao . PhysicalNetworkVO physnet = physicalNetworkDao . findById ( plan . getPhysicalNetworkId ( ) ) ; final com . cloud . legacymodel . dc . DataCenter dc = _entityMgr . findById ( com . cloud . legacymodel . dc . DataCenter . class , plan . getDataCenterId ( ) ) ; if ( ! ( canHandle ( offering , dc , physnet ) ) ) { return null ; } final com . cloud . model . enumeration . BroadcastDomainType broadcastType ; if ( ( userSpecified != null ) && ( ( userSpecified . getBroadcastDomainType ( ) ) != null ) ) { broadcastType = userSpecified . getBroadcastDomainType ( ) ; } else { broadcastType = com . cloud . model . enumeration . BroadcastDomainType . Vlan ; } final com . cloud . network . dao . NetworkVO network = new com . cloud . network . dao . NetworkVO ( offering . getTrafficType ( ) , com . cloud . model . enumeration . DHCPMode . Static , broadcastType , offering . getId ( ) , com . cloud . legacymodel . network . Network . State . Allocated , plan . getDataCenterId ( ) , plan . getPhysicalNetworkId ( ) , offering . getRedundantRouter ( ) ) ; if ( userSpecified != null ) { if ( ( ! ( GuestType . Private . equals ( offering . getGuestType ( ) ) ) ) && ( ( ( ( userSpecified . getCidr ( ) ) == null ) && ( ( userSpecified . getGateway ( ) ) != null ) ) || ( ( ( userSpecified . getCidr ( ) ) != null ) && ( ( userSpecified . getGateway ( ) ) == null ) ) ) ) { throw new com . cloud . legacymodel . exceptions . InvalidParameterValueException ( "CIDR<sp>and<sp>gateway<sp>must<sp>be<sp>specified<sp>together<sp>or<sp>the<sp>CIDR<sp>must<sp>represents<sp>the<sp>gateway." ) ; } if ( ( userSpecified . getCidr ( ) ) != null ) { network . setCidr ( userSpecified . getCidr ( ) ) ; network . setGateway ( userSpecified . getGateway ( ) ) ; } else { throw new com . cloud . legacymodel . exceptions . InvalidParameterValueException ( ( ( "Can't<sp>design<sp>network<sp>" + network ) + ";<sp>netmask/gateway<sp>or<sp>cidr<sp>must<sp>be<sp>passed<sp>in" ) ) ; } if ( offering . getSpecifyVlan ( ) ) { network . setBroadcastUri ( userSpecified . getBroadcastUri ( ) ) ; network . setState ( State . Setup ) ; } } else { throw new com . cloud . legacymodel . exceptions . CloudRuntimeException ( ( ( "Can't<sp>design<sp>network<sp>" + network ) + ";<sp>netmask/gateway<sp>or<sp>cidr<sp>must<sp>be<sp>passed<sp>in" ) ) ; } return network ; }
|
org . junit . Assert . assertTrue ( ( designednetwork == null ) )
|
testGetAndSetJMSReplyTo ( ) { org . apache . qpid . jms . message . JmsMessage msg = factory . createMessage ( ) ; msg . setJMSReplyTo ( this . jmsReplyTo ) ; "<AssertPlaceHolder>" ; } getJMSReplyTo ( ) { return replyTo ; }
|
org . junit . Assert . assertTrue ( msg . getJMSReplyTo ( ) . equals ( this . jmsReplyTo ) )
|
testIntegration ( ) { org . apache . poi . xwpf . usermodel . XWPFDocument doc1 = new org . apache . poi . xwpf . usermodel . XWPFDocument ( ) ; org . apache . poi . xwpf . usermodel . XWPFParagraph p1 = doc1 . createParagraph ( ) ; org . apache . poi . xwpf . usermodel . XWPFRun r1 = p1 . createRun ( ) ; r1 . setText ( "Lorem<sp>ipsum<sp>dolor<sp>sit<sp>amet." ) ; doc1 . enforceCommentsProtection ( ) ; java . io . File tempFile = org . apache . poi . util . TempFile . createTempFile ( "documentProtectionFile" , ".docx" ) ; java . io . FileOutputStream out = new java . io . FileOutputStream ( tempFile ) ; doc1 . write ( out ) ; out . close ( ) ; java . io . FileInputStream inputStream = new java . io . FileInputStream ( tempFile ) ; org . apache . poi . xwpf . usermodel . XWPFDocument doc2 = new org . apache . poi . xwpf . usermodel . XWPFDocument ( inputStream ) ; inputStream . close ( ) ; "<AssertPlaceHolder>" ; doc2 . close ( ) ; doc1 . close ( ) ; } isEnforcedCommentsProtection ( ) { return settings . isEnforcedWith ( STDocProtect . COMMENTS ) ; }
|
org . junit . Assert . assertTrue ( doc2 . isEnforcedCommentsProtection ( ) )
|
testParseCatalogXML2 ( ) { owltools . io . LocalMirrorIRIMapper m = new owltools . io . LocalMirrorIRIMapper ( "src/test/resources/owl-mirror.txt" ) ; org . semanticweb . owlapi . model . IRI iri = m . getDocumentIRI ( org . semanticweb . owlapi . model . IRI . create ( "http://purl.obolibrary.org/obo/go.owl" ) ) ; "<AssertPlaceHolder>" ; } getDocumentIRI ( org . semanticweb . owlapi . model . IRI ) { return mappings . get ( ontologyIRI ) ; }
|
org . junit . Assert . assertNotNull ( iri )
|
testGroupMembershipByMemberQueries ( ) { org . picketlink . idm . IdentityManager identityManager = getIdentityManager ( ) ; org . picketlink . idm . query . IdentityQuery < org . picketlink . idm . model . basic . User > query = identityManager . createIdentityQuery ( org . picketlink . idm . model . basic . User . class ) ; query . setParameter ( User . LOGIN_NAME , "newuser1" ) ; java . util . List < org . picketlink . idm . model . basic . User > result = query . getResultList ( ) ; org . picketlink . idm . RelationshipManager relationshipManager = getPartitionManager ( ) . createRelationshipManager ( ) ; for ( org . picketlink . idm . model . basic . User user : result ) { org . picketlink . idm . query . RelationshipQuery < org . picketlink . idm . model . basic . GroupMembership > relationshipQuery = relationshipManager . createRelationshipQuery ( org . picketlink . idm . model . basic . GroupMembership . class ) ; relationshipQuery . setParameter ( GroupMembership . MEMBER , user ) ; "<AssertPlaceHolder>" ; } } getResultList ( ) { return getResultList ( false ) ; }
|
org . junit . Assert . assertFalse ( relationshipQuery . getResultList ( ) . isEmpty ( ) )
|
dividedBy6 ( ) { java . time . Duration duration1 = org . diirt . util . time . TimeDuration . TimeDuration . ofSeconds ( 10.4 ) ; java . time . Duration duration2 = org . diirt . util . time . TimeDuration . TimeDuration . ofSeconds ( 2.5 ) ; "<AssertPlaceHolder>" ; } dividedBy ( java . time . Duration , java . time . Duration ) { double thisDuration = ( ( ( double ) ( dividendDuration . getSeconds ( ) ) ) * ( ( double ) ( org . diirt . util . time . TimeDuration . NANOSEC_IN_SEC ) ) ) + ( ( double ) ( dividendDuration . getNano ( ) ) ) ; double otherDuration = ( ( ( double ) ( divisorDuration . getSeconds ( ) ) ) * ( ( double ) ( org . diirt . util . time . TimeDuration . NANOSEC_IN_SEC ) ) ) + ( ( double ) ( divisorDuration . getNano ( ) ) ) ; return ( ( int ) ( thisDuration / otherDuration ) ) ; }
|
org . junit . Assert . assertThat ( org . diirt . util . time . TimeDuration . TimeDuration . dividedBy ( duration1 , duration2 ) , equalTo ( 4 ) )
|
testConsumeFromDurableQueue ( ) { org . apache . activemq . artemis . api . core . SimpleString queue = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; org . apache . activemq . artemis . api . core . SimpleString address = org . apache . activemq . artemis . utils . RandomUtil . randomSimpleString ( ) ; session . createQueue ( address , queue , true ) ; org . apache . activemq . artemis . api . core . client . ClientProducer producer = session . createProducer ( address ) ; producer . send ( session . createMessage ( false ) ) ; session . start ( ) ; org . apache . activemq . artemis . api . core . client . ClientConsumer consumer = session . createConsumer ( queue ) ; org . apache . activemq . artemis . api . core . client . ClientMessage message = consumer . receive ( 500 ) ; "<AssertPlaceHolder>" ; message . acknowledge ( ) ; consumer . close ( ) ; session . deleteQueue ( queue ) ; } receive ( long ) { session . lock ( ) ; try { if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "receive<sp>" + ( this ) ) + "<sp>timeout=" ) + timeout ) ) ; } checkState ( ) ; javax . jms . Message message = consumer . receive ( timeout ) ; if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "received<sp>" + ( this ) ) + "<sp>result=" ) + message ) ) ; } if ( message == null ) { return null ; } else { return wrapMessage ( message ) ; } } finally { session . unlock ( ) ; } }
|
org . junit . Assert . assertNotNull ( message )
|
toStringer ( ) { org . kitteh . irc . client . library . command . KickCommand command = new org . kitteh . irc . client . library . command . KickCommand ( this . client , org . kitteh . irc . client . library . command . KickCommandTest . CHANNEL ) ; "<AssertPlaceHolder>" ; } toString ( ) { return new org . kitteh . irc . client . library . util . ToStringer ( this ) . add ( "client" , this . getClient ( ) ) . add ( "server" , this . server ) . add ( "target" , this . target ) . toString ( ) ; }
|
org . junit . Assert . assertTrue ( command . toString ( ) . contains ( org . kitteh . irc . client . library . command . KickCommandTest . CHANNEL ) )
|
entrySetToArray ( ) { com . gs . collections . api . map . sorted . MutableSortedMap < java . lang . Integer , java . lang . String > map = this . newMapWithKeyValue ( 1 , "One" ) . asUnmodifiable ( ) ; java . lang . Object [ ] entries = map . entrySet ( ) . toArray ( ) ; "<AssertPlaceHolder>" ; } of ( T1 , T2 ) { return new com . gs . collections . impl . tuple . ImmutableEntry < T1 , T2 > ( key , value ) ; }
|
org . junit . Assert . assertEquals ( com . gs . collections . impl . tuple . ImmutableEntry . of ( 1 , "One" ) , entries [ 0 ] )
|
testLongRndEven ( ) { try ( com . questdb . cairo . VirtualMemory mem = new com . questdb . cairo . VirtualMemory ( 11 ) ) { int n = 999 ; long o = 0 ; for ( int i = n ; i > 0 ; i -- ) { mem . putLong ( o , i ) ; o += 8 ; } o = 0 ; for ( int i = n ; i > 0 ; i -- ) { "<AssertPlaceHolder>" ; o += 8 ; } } } getLong ( int ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( i , mem . getLong ( o ) )
|
testSerialization ( ) { org . jfree . chart . block . BlockContainer c1 = new org . jfree . chart . block . BlockContainer ( ) ; c1 . add ( new org . jfree . chart . block . EmptyBlock ( 1.2 , 3.4 ) ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( c1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . block . BlockContainer c2 = ( ( org . jfree . chart . block . BlockContainer ) ( 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 ( c1 , c2 )
|
findByIdReturnsTheVertexWithId ( ) { java . util . UUID id1 = java . util . UUID . randomUUID ( ) ; nl . knaw . huygens . timbuctoo . server . TinkerPopGraphManager tinkerPopGraphManager = newGraph ( ) . withVertex ( ( v ) -> v . withTimId ( id1 . toString ( ) ) . withProperty ( "keyword_type" , "keywordType" ) . withProperty ( "displayName" , "query" ) ) . wrap ( ) ; nl . knaw . huygens . timbuctoo . database . tinkerpop . Neo4jIndexHandler instance = new nl . knaw . huygens . timbuctoo . database . tinkerpop . Neo4jIndexHandler ( tinkerPopGraphManager ) ; org . apache . tinkerpop . gremlin . structure . Vertex vertex = tinkerPopGraphManager . getGraph ( ) . traversal ( ) . V ( ) . has ( "tim_id" , id1 . toString ( ) ) . next ( ) ; instance . upsertIntoIdIndex ( id1 , vertex ) ; java . util . Optional < org . apache . tinkerpop . gremlin . structure . Vertex > result = instance . findById ( id1 ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( graphQlSchema ) == null ) { this . scheduleRebuild ( ) ; } try { return schemaAccessQueue . submit ( ( ) -> graphQlSchema ) . get ( ) ; } catch ( java . lang . InterruptedException | java . util . concurrent . ExecutionException e ) { nl . knaw . huygens . timbuctoo . v5 . graphql . rootquery . RootQuery . LOG . error ( "Unable<sp>to<sp>read<sp>schema" , e ) ; throw new java . lang . RuntimeException ( "Unable<sp>to<sp>read<sp>schema" ) ; } }
|
org . junit . Assert . assertThat ( result . get ( ) . value ( "tim_id" ) , org . hamcrest . Matchers . is ( id1 . toString ( ) ) )
|
testQueryRow20RowTable ( ) { java . lang . String query = java . lang . String . format ( "select<sp>*<sp>from<sp>%s.%s<sp>where<sp>%s.%s.transaction_header_key<sp>=<sp>18" , com . splicemachine . derby . utils . test . DecoderIT . SCHEMA_NAME , com . splicemachine . derby . utils . test . DecoderIT . TransactionHeaderTable . TABLE_NAME , com . splicemachine . derby . utils . test . DecoderIT . SCHEMA_NAME , com . splicemachine . derby . utils . test . DecoderIT . TransactionHeaderTable . TABLE_NAME ) ; java . sql . ResultSet rs = methodWatcher . executeQuery ( query ) ; com . splicemachine . homeless . TestUtils . FormattedResult fr = TestUtils . FormattedResult . ResultFactory . convert ( query , rs ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } size ( ) { return entries . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , fr . size ( ) )
|
shouldInvalidateAlreadyAcceptedInactiveTechnology ( ) { given ( technology . getId ( ) ) . willReturn ( 101L ) ; given ( techDataDefinition . get ( 101L ) ) . willReturn ( existingTechnology ) ; given ( technology . getStringField ( TechnologyFields . STATE ) ) . willReturn ( TechnologyState . ACCEPTED . getStringValue ( ) ) ; given ( existingTechnology . getStringField ( TechnologyFields . STATE ) ) . willReturn ( TechnologyState . ACCEPTED . getStringValue ( ) ) ; given ( technology . isActive ( ) ) . willReturn ( false ) ; given ( existingTechnology . isActive ( ) ) . willReturn ( false ) ; final boolean isValid = technologyTreeValidators . invalidateIfBelongsToAcceptedTechnology ( techDataDefinition , technology ) ; "<AssertPlaceHolder>" ; } invalidateIfBelongsToAcceptedTechnology ( com . qcadoo . model . api . DataDefinition , com . qcadoo . model . api . Entity ) { com . qcadoo . model . api . Entity technology = null ; java . lang . String errorMessageKey = "technologies.technology.state.error.modifyBelongsToAcceptedTechnology" ; if ( TechnologiesConstants . MODEL_TECHNOLOGY . equals ( dataDefinition . getName ( ) ) ) { technology = entity ; errorMessageKey = "technologies.technology.state.error.modifyAcceptedTechnology" ; } else if ( TechnologiesConstants . MODEL_TECHNOLOGY_OPERATION_COMPONENT . equals ( dataDefinition . getName ( ) ) ) { technology = entity . getBelongsToField ( TechnologyOperationComponentFields . TECHNOLOGY ) ; } else if ( ( TechnologiesConstants . MODEL_OPERATION_PRODUCT_IN_COMPONENT . equals ( dataDefinition . getName ( ) ) ) || ( TechnologiesConstants . MODEL_OPERATION_PRODUCT_OUT_COMPONENT . equals ( dataDefinition . getName ( ) ) ) ) { final com . qcadoo . model . api . Entity operationComponent = entity . getBelongsToField ( com . qcadoo . mes . technologies . validators . TechnologyTreeValidators . L_OPERATION_COMPONENT ) ; if ( operationComponent == null ) { return true ; } technology = operationComponent . getBelongsToField ( TechnologyOperationComponentFields . TECHNOLOGY ) ; } if ( technologyIsAcceptedAndNotDeactivated ( dataDefinition , entity , technology ) ) { entity . addGlobalError ( errorMessageKey , technology . getStringField ( TechnologyFields . NAME ) ) ; return false ; } return true ; }
|
org . junit . Assert . assertFalse ( isValid )
|
testGetDrillDownProfile ( ) { org . pentaho . reporting . designer . extensions . pentaho . drilldown . PentahoPathModel model = new org . pentaho . reporting . designer . extensions . pentaho . drilldown . PentahoPathModel ( reportDesignerContext ) ; "<AssertPlaceHolder>" ; model . setLocalPath ( "MySolution/path/to/my/file/myFile.txt" ) ; model . registerExtension ( ".txt" , true , true , "text" ) ; java . lang . String profile = model . getDrillDownProfile ( ) ; }
|
org . junit . Assert . assertNotNull ( model )
|
testOverloadIsNotOverride ( ) { java . lang . reflect . Method m1 = org . apache . camel . component . bean . MyOtherFooBean . class . getMethod ( "toString" , java . lang . Object . class ) ; java . lang . reflect . Method m2 = org . apache . camel . component . bean . MyOtherFooBean . class . getMethod ( "toString" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } isOverridingMethod ( java . lang . reflect . Method , java . lang . reflect . Method , boolean ) { return org . apache . camel . util . ObjectHelper . isOverridingMethod ( target . getDeclaringClass ( ) , source , target , exact ) ; }
|
org . junit . Assert . assertFalse ( org . apache . camel . support . org . apache . camel . util . ObjectHelper . isOverridingMethod ( m2 , m1 , false ) )
|
testSendNotificationWithAppKeyWithSpecialCharacter21 ( ) { int erroCode = ErrorCodeEnum . NOERROR . value ( ) ; java . lang . String msgTitle = "jpush" ; java . lang . String msgContent = "jpush{}" ; cn . jpush . api . MessageResult result = jpush . sendNotificationWithAppKey ( sendNo , msgTitle , msgContent ) ; "<AssertPlaceHolder>" ; } getErrcode ( ) { return errcode ; }
|
org . junit . Assert . assertEquals ( erroCode , result . getErrcode ( ) )
|
testShouldEmit0 ( com . boozallen . cognition . ingest . storm . vo . LogRecord ) { bolt . field = "field" ; new mockit . Expectations ( ) { { record . getValue ( bolt . field ) ; result = "asdf" ; } } ; "<AssertPlaceHolder>" ; } shouldEmit ( com . boozallen . cognition . ingest . storm . vo . LogRecord ) { java . lang . String value = record . getValue ( field ) ; if ( org . apache . commons . lang3 . StringUtils . equals ( value , this . value ) ) return false ; else return true ; }
|
org . junit . Assert . assertThat ( bolt . shouldEmit ( record ) , org . hamcrest . core . Is . is ( true ) )
|
whenAddFoodInStorageCountFoodInStorageUp ( ) { ru . szhernovoy . ControlQuality control = new ru . szhernovoy . ControlQuality ( ) ; ru . szhernovoy . Food [ ] food = new ru . szhernovoy . Food [ 1 ] ; java . util . GregorianCalendar today = new java . util . GregorianCalendar ( 2016 , java . util . GregorianCalendar . AUGUST , 8 ) ; food [ 0 ] = new ru . szhernovoy . Bananas ( "Banana" , new java . util . GregorianCalendar ( 2016 , java . util . GregorianCalendar . AUGUST , 1 ) , new java . util . GregorianCalendar ( 2016 , java . util . GregorianCalendar . AUGUST , 15 ) , 45 , 5 ) ; ru . szhernovoy . Storage [ ] storage = new ru . szhernovoy . Storage [ 1 ] ; storage [ 0 ] = new ru . szhernovoy . Shop ( "METRO" , 10 , today ) ; for ( int index = 0 ; index < ( storage . length ) ; index ++ ) { control . addStorages ( storage [ index ] ) ; } for ( int index = 0 ; index < ( food . length ) ; index ++ ) { control . addFood ( food [ index ] ) ; } java . lang . String getResult = storage [ 0 ] . toString ( ) ; boolean contain = getResult . contains ( "Banana" ) ; boolean check = true ; "<AssertPlaceHolder>" ; } addFood ( ru . szhernovoy . extended . FoodReproduct ) { this . foodReproducts [ ( ( positionReproduct ) ++ ) ] = foodReproduct ; }
|
org . junit . Assert . assertThat ( check , org . hamcrest . core . Is . is ( contain ) )
|
putTaskState ( ) { org . apache . kafka . connect . util . KafkaBasedLog < java . lang . String , byte [ ] > kafkaBasedLog = mock ( org . apache . kafka . connect . util . KafkaBasedLog . class ) ; org . apache . kafka . connect . storage . Converter converter = mock ( org . apache . kafka . connect . storage . Converter . class ) ; org . apache . kafka . connect . storage . KafkaStatusBackingStore store = new org . apache . kafka . connect . storage . KafkaStatusBackingStore ( new org . apache . kafka . common . utils . MockTime ( ) , converter , org . apache . kafka . connect . storage . KafkaStatusBackingStoreTest . STATUS_TOPIC , kafkaBasedLog ) ; byte [ ] value = new byte [ 0 ] ; expect ( converter . fromConnectData ( eq ( org . apache . kafka . connect . storage . KafkaStatusBackingStoreTest . STATUS_TOPIC ) , anyObject ( org . apache . kafka . connect . data . Schema . class ) , anyObject ( org . apache . kafka . connect . data . Struct . class ) ) ) . andStubReturn ( value ) ; final org . easymock . Capture < org . apache . kafka . clients . producer . Callback > callbackCapture = newCapture ( ) ; kafkaBasedLog . send ( eq ( "status-task-conn-0" ) , eq ( value ) , capture ( callbackCapture ) ) ; expectLastCall ( ) . andAnswer ( new org . easymock . IAnswer < java . lang . Void > ( ) { @ org . apache . kafka . connect . storage . Override public org . apache . kafka . connect . storage . Void answer ( ) throws java . lang . Throwable { callbackCapture . getValue ( ) . onCompletion ( null , null ) ; return null ; } } ) ; replayAll ( ) ; org . apache . kafka . connect . runtime . TaskStatus status = new org . apache . kafka . connect . runtime . TaskStatus ( org . apache . kafka . connect . storage . KafkaStatusBackingStoreTest . TASK , TaskStatus . State . RUNNING , org . apache . kafka . connect . storage . KafkaStatusBackingStoreTest . WORKER_ID , 0 ) ; store . put ( status ) ; "<AssertPlaceHolder>" ; verifyAll ( ) ; } get ( org . apache . kafka . connect . data . Field ) { java . lang . Object val = values [ field . index ( ) ] ; if ( ( val == null ) && ( ( field . schema ( ) . defaultValue ( ) ) != null ) ) { val = field . schema ( ) . defaultValue ( ) ; } return val ; }
|
org . junit . Assert . assertEquals ( null , store . get ( org . apache . kafka . connect . storage . KafkaStatusBackingStoreTest . TASK ) )
|
canAdjustLastTransactionThatIsAWithdrawal ( ) { savingsProduct = new org . mifos . domain . builders . SavingsProductBuilder ( ) . mandatory ( ) . withMandatoryAmount ( "33.0" ) . withMaxWithdrawalAmount ( org . mifos . framework . TestUtils . createMoney ( "50" ) ) . appliesToClientsOnly ( ) . buildForUnitTests ( ) ; savingsAccount = new org . mifos . domain . builders . SavingsAccountBuilder ( ) . active ( ) . withSavingsProduct ( savingsProduct ) . withCustomer ( client ) . withBalanceOf ( org . mifos . framework . TestUtils . createMoney ( "100" ) ) . withWithdrawalOf ( "15" ) . build ( ) ; org . mifos . framework . util . helpers . Money withdrawalAdjustment = org . mifos . framework . TestUtils . createMoney ( "20" ) ; boolean result = savingsAccount . isAdjustPossibleOnTrxn ( withdrawalAdjustment , savingsAccount . getLastPmnt ( ) ) ; "<AssertPlaceHolder>" ; } getLastPmnt ( ) { return findMostRecentPaymentByPaymentDate ( ) ; }
|
org . junit . Assert . assertTrue ( result )
|
testConfigureStaticNatRulesOnLogicalRouter ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; final com . cloud . agent . api . ConfigureStaticNatRulesOnLogicalRouterCommand cmd = mock ( com . cloud . agent . api . ConfigureStaticNatRulesOnLogicalRouterCommand . class ) ; final com . cloud . agent . api . to . StaticNatRuleTO rule = new com . cloud . agent . api . to . StaticNatRuleTO ( 1 , "11.11.11.11" , null , null , "10.10.10.10" , null , null , null , false , false ) ; final java . util . List < com . cloud . agent . api . to . StaticNatRuleTO > rules = new java . util . ArrayList < com . cloud . agent . api . to . StaticNatRuleTO > ( ) ; rules . add ( rule ) ; when ( cmd . getRules ( ) ) . thenReturn ( rules ) ; when ( cmd . getLogicalRouterUuid ( ) ) . thenReturn ( "aaaaa" ) ; @ com . cloud . network . resource . SuppressWarnings ( "unchecked" ) final java . util . List < com . cloud . network . nicira . NatRule > storedRules = java . util . Collections . EMPTY_LIST ; when ( nvpApi . findNatRulesByLogicalRouterUuid ( "aaaaa" ) ) . thenReturn ( storedRules ) ; final com . cloud . network . nicira . NatRule [ ] rulepair = resource . generateStaticNatRulePair ( "10.10.10.10" , "11.11.11.11" ) ; rulepair [ 0 ] . setUuid ( java . util . UUID . randomUUID ( ) ) ; rulepair [ 1 ] . setUuid ( java . util . UUID . randomUUID ( ) ) ; when ( nvpApi . createLogicalRouterNatRule ( eq ( "aaaaa" ) , ( ( com . cloud . network . nicira . NatRule ) ( any ( ) ) ) ) ) . thenReturn ( rulepair [ 0 ] ) . thenReturn ( rulepair [ 1 ] ) ; final com . cloud . agent . api . ConfigureStaticNatRulesOnLogicalRouterAnswer a = ( ( com . cloud . agent . api . ConfigureStaticNatRulesOnLogicalRouterAnswer ) ( resource . executeRequest ( cmd ) ) ) ; "<AssertPlaceHolder>" ; verify ( nvpApi , atLeast ( 2 ) ) . createLogicalRouterNatRule ( eq ( "aaaaa" ) , argThat ( new org . mockito . ArgumentMatcher < com . cloud . network . nicira . NatRule > ( ) { @ com . cloud . network . resource . Override public boolean matches ( final java . lang . Object argument ) { final com . cloud . network . nicira . NatRule rule = ( ( com . cloud . network . nicira . NatRule ) ( argument ) ) ; if ( ( rule . getType ( ) . equals ( "DestinationNatRule" ) ) && ( ( ( com . cloud . network . nicira . DestinationNatRule ) ( rule ) ) . getToDestinationIpAddress ( ) . equals ( "10.10.10.10" ) ) ) { return true ; } if ( ( rule . getType ( ) . equals ( "SourceNatRule" ) ) && ( ( ( com . cloud . network . nicira . SourceNatRule ) ( rule ) ) . getToSourceIpAddressMin ( ) . equals ( "11.11.11.11" ) ) ) { return true ; } return false ; } } ) ) ; } getResult ( ) { return result ; }
|
org . junit . Assert . assertTrue ( a . getResult ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.