input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testAMImageScalerTrackerReturnsNullWhenNoThereIsNoDefaultImageScaler ( ) { try { _disableAMDefaultImageScaler ( ) ; com . liferay . adaptive . media . image . scaler . AMImageScaler amImageScaler = _amImageScalerTracker . getAMImageScaler ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; "<AssertPlaceHolder>" ; } finally { _enableAMDefaultImageScaler ( ) ; } } randomString ( ) { return com . liferay . portal . kernel . util . StringUtil . randomString ( ) ; }
org . junit . Assert . assertNull ( amImageScaler )
testAbsoluteUri ( ) { for ( java . lang . String uri : com . vmware . thinapp . common . util . AfUtilsTest . isAbsTestCases . keySet ( ) ) { boolean target = com . vmware . thinapp . common . util . AfUtilsTest . isAbsTestCases . get ( uri ) . booleanValue ( ) ; boolean actual = com . vmware . thinapp . common . util . AfUtil . isAbsoluteUri ( uri ) ; System . out . println ( ( ( ( "isAbsolute(" + uri ) + ")<sp>=<sp>" ) + actual ) ) ; "<AssertPlaceHolder>" ; } org . junit . Assert . fail ( ) ; } } isAbsoluteUri ( java . lang . String ) { try { java . net . URI uri = new java . net . URI ( uriString ) ; return ( uri . getScheme ( ) ) != null ; } catch ( java . net . URISyntaxException ex ) { return false ; } }
org . junit . Assert . assertEquals ( target , actual )
testSetEffectiveClientResponsePolicy ( ) { engine = new org . apache . cxf . ws . policy . PolicyEngineImpl ( ) ; org . apache . cxf . service . model . EndpointInfo ei = createMockEndpointInfo ( ) ; org . apache . cxf . service . model . BindingOperationInfo boi = createMockBindingOperationInfo ( ) ; org . apache . cxf . ws . policy . EffectivePolicy epi = control . createMock ( org . apache . cxf . ws . policy . EffectivePolicy . class ) ; control . replay ( ) ; engine . setEffectiveClientResponsePolicy ( ei , boi , epi ) ; "<AssertPlaceHolder>" ; control . verify ( ) ; } getEffectiveClientResponsePolicy ( org . apache . cxf . service . model . EndpointInfo , org . apache . cxf . service . model . BindingOperationInfo , org . apache . cxf . message . Message ) { org . apache . cxf . ws . policy . EffectivePolicy effectivePolicy = ( ( org . apache . cxf . ws . policy . EffectivePolicy ) ( boi . getProperty ( org . apache . cxf . ws . policy . PolicyEngineImpl . POLICY_INFO_RESPONSE_CLIENT ) ) ) ; if ( effectivePolicy == null ) { synchronized ( ei ) { effectivePolicy = ( ( org . apache . cxf . ws . policy . EffectivePolicy ) ( boi . getProperty ( org . apache . cxf . ws . policy . PolicyEngineImpl . POLICY_INFO_RESPONSE_CLIENT ) ) ) ; if ( null == effectivePolicy ) { org . apache . cxf . ws . policy . EffectivePolicyImpl epi = createOutPolicyInfo ( ) ; epi . initialise ( ei , boi , this , true , false , m ) ; if ( m != null ) { boi . setProperty ( org . apache . cxf . ws . policy . PolicyEngineImpl . POLICY_INFO_RESPONSE_CLIENT , epi ) ; } effectivePolicy = epi ; } } } return effectivePolicy ; }
org . junit . Assert . assertSame ( epi , engine . getEffectiveClientResponsePolicy ( ei , boi , msg ) )
testSwapNullCharArray ( ) { final char [ ] array = null ; org . fintx . util . Arrays . swap ( array , 0 , 2 ) ; "<AssertPlaceHolder>" ; } swap ( T , int , int ) { org . fintx . util . Arrays . swap ( array , offset1 , offset2 , 1 ) ; }
org . junit . Assert . assertNull ( array )
testFooTestClassCreation ( ) { java . lang . Class < ? > clazz = loadFooTestClass ( ) ; "<AssertPlaceHolder>" ; } loadFooTestClass ( ) { java . io . File tempDir = org . evosuite . junit . FooTestClassLoader . createNewTmpDir ( ) ; if ( tempDir == null ) { return null ; } java . lang . String javaSrcDirName = ( ( tempDir . getAbsolutePath ( ) ) + ( java . io . File . separator ) ) + "src" ; java . lang . String javaBinDirName = ( ( tempDir . getAbsolutePath ( ) ) + ( java . io . File . separator ) ) + "bin" ; java . lang . String javaSrcPackageDirName = ( javaSrcDirName + ( java . io . File . separator ) ) + ( "com.examples.with.different.packagename.junit" . replace ( "." , File . separator ) ) ; java . lang . String javaBinPackageDirName = ( javaBinDirName + ( java . io . File . separator ) ) + ( "com.examples.with.different.packagename.junit" . replace ( "." , File . separator ) ) ; java . io . File javaBinDir = new java . io . File ( javaBinDirName ) ; if ( ! ( javaBinDir . mkdirs ( ) ) ) { return null ; } java . io . File packageDir = new java . io . File ( javaSrcPackageDirName ) ; if ( ! ( packageDir . mkdirs ( ) ) ) { return null ; } java . lang . String javaFilename = ( javaSrcPackageDirName + ( java . io . File . separator ) ) + "FooTest.java" ; java . lang . String classFilename = ( javaBinPackageDirName + ( java . io . File . separator ) ) + "FooTest.class" ; java . lang . String javaSourceText = org . evosuite . junit . FooTestClassLoader . createFooTestJavaText ( ) ; java . io . File javaFile = writeJavaSourceText ( javaSourceText , javaFilename ) ; if ( javaFile == null ) { return null ; } boolean compiled = org . evosuite . junit . FooTestClassLoader . compileJavaFile ( javaBinDirName , javaFile ) ; if ( ! compiled ) { return null ; } java . io . File classFile = new java . io . File ( classFilename ) ; if ( ! ( classFile . exists ( ) ) ) { return null ; } java . lang . Class < ? > clazz = org . evosuite . junit . FooTestClassLoader . loadClass ( javaBinDir ) ; if ( clazz == null ) { return null ; } classFile . delete ( ) ; return clazz ; }
org . junit . Assert . assertNotNull ( clazz )
testSetsTabrisVersion ( ) { com . eclipsesource . tabris . internal . AppImpl app = new com . eclipsesource . tabris . internal . AppImpl ( ) ; org . eclipse . rap . json . JsonObject properties = new org . eclipse . rap . json . JsonObject ( ) ; properties . set ( "tabrisVersion" , "1.3.0" ) ; app . handleSet ( properties ) ; java . lang . String tabrisVersion = app . getTabrisVersion ( ) ; "<AssertPlaceHolder>" ; } getTabrisVersion ( ) { return tabrisVersion ; }
org . junit . Assert . assertEquals ( "1.3.0" , tabrisVersion )
testGetPodcastsFromRange ( ) { java . util . Map < java . lang . String , java . lang . Integer > params = new java . util . HashMap < java . lang . String , java . lang . Integer > ( ) ; params . put ( "startRow" , 1 ) ; params . put ( "endRow" , 10 ) ; java . util . List < org . podcastpedia . common . domain . Podcast > response = readDao . getPodcastsFromRange ( params ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( ( response . size ( ) ) == 10 ) )
testSerialization ( ) { org . jfree . chart . annotations . XYShapeAnnotation a1 = new org . jfree . chart . annotations . XYShapeAnnotation ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , new java . awt . BasicStroke ( 1.2F ) , java . awt . Color . red , java . awt . Color . blue ) ; org . jfree . chart . annotations . XYShapeAnnotation a2 = ( ( org . jfree . chart . annotations . XYShapeAnnotation ) ( org . jfree . chart . TestUtilities . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( a1 , a2 )
testGetParametersWithDefaultEntityAndDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . degree . Degree entity = new org . lnu . is . domain . degree . Degree ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
should_not_notify_on_recovery_if_failure_recovery_and_previous_build_was_success ( ) { com . groupon . jenkins . notifications . PostBuildNotifierTest . PostBuildNotifierExt notifier = new com . groupon . jenkins . notifications . PostBuildNotifierTest . PostBuildNotifierExt ( PostBuildNotifier . Type . FAILURE_AND_RECOVERY ) ; notifier . perform ( newBuild ( ) . success ( ) . notRecovery ( ) . get ( ) , null ) ; "<AssertPlaceHolder>" ; } wasPerformed ( ) { return this . wasPerformed ; }
org . junit . Assert . assertFalse ( notifier . wasPerformed ( ) )
beforeSendRequestHaveHeader ( org . apache . servicecomb . core . Invocation ) { org . springframework . http . HttpHeaders httpHeaders = new org . springframework . http . HttpHeaders ( ) ; httpHeaders . add ( "name" , "value" ) ; java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; context . put ( RestConst . CONSUMER_HEADER , httpHeaders ) ; new mockit . Expectations ( ) { { invocation . getHandlerContext ( ) ; result = context ; } } ; org . apache . servicecomb . foundation . vertx . http . HttpServletRequestEx requestEx = new org . apache . servicecomb . provider . springmvc . reference . CommonToHttpServletRequest ( null , null , new org . springframework . http . HttpHeaders ( ) , null , false ) ; filter . beforeSendRequest ( invocation , requestEx ) ; "<AssertPlaceHolder>" ; } getHeaders ( java . lang . String ) { return java . util . Collections . enumeration ( this . vertxRequest . headers ( ) . getAll ( name ) ) ; }
org . junit . Assert . assertThat ( java . util . Collections . list ( requestEx . getHeaders ( "name" ) ) , org . hamcrest . Matchers . contains ( "value" ) )
notAllowedPayloadPosition ( ) { "<AssertPlaceHolder>" ; xmlExternalEntity . nextParam ( ) ; xmlExternalEntity . getTamperedRequest ( "" , PayloadPosition . ATTRIBUTE ) ; } hasFurtherParams ( ) { return externalEntitiesIterator . hasNext ( ) ; }
org . junit . Assert . assertThat ( xmlExternalEntity . hasFurtherParams ( ) , org . hamcrest . CoreMatchers . is ( true ) )
equalObjectsShouldHaveSameHashcode ( ) { "<AssertPlaceHolder>" ; } createEqualInstance ( ) { return new org . infinitest . eclipse . SlowTestMarkerInfo ( org . infinitest . eclipse . WhenMarkingTestsAsSlow . TEST_NAME , new org . infinitest . eclipse . MethodStats ( "shouldRunSlowly" ) , resourceLookup ) ; }
org . junit . Assert . assertEquals ( createEqualInstance ( ) . hashCode ( ) , createEqualInstance ( ) . hashCode ( ) )
testBuildWithDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . order . Order context = new org . lnu . is . domain . order . Order ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>Order<sp>e<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . order . Order > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
testExponentialInclude ( ) { java . lang . String grammarFormat = "parser<sp>grammar<sp>Level_%d_%d;\n" + ( ( ( "\n" + "%s<sp>import<sp>Level_%d_1,<sp>Level_%d_2;\n" ) + "\n" ) + "rule_%d_%d<sp>:<sp>EOF;\n" ) ; org . antlr . v4 . test . runtime . BaseRuntimeTest . mkdir ( tmpdir ) ; long startTime = java . lang . System . nanoTime ( ) ; int levels = 20 ; for ( int level = 0 ; level < levels ; level ++ ) { java . lang . String leafPrefix = ( level == ( levels - 1 ) ) ? "//" : "_1.g4" 0 ; java . lang . String grammar1 = java . lang . String . format ( grammarFormat , level , 1 , leafPrefix , ( level + 1 ) , ( level + 1 ) , level , 1 ) ; writeFile ( tmpdir , ( ( "Level_" + level ) + "_1.g4" ) , grammar1 ) ; if ( level > 0 ) { java . lang . String grammar2 = java . lang . String . format ( grammarFormat , level , 2 , leafPrefix , ( level + 1 ) , ( level + 1 ) , level , 1 ) ; writeFile ( tmpdir , ( ( "Level_" + level ) + "_2.g4" ) , grammar2 ) ; } } org . antlr . v4 . test . runtime . ErrorQueue equeue = org . antlr . v4 . test . runtime . BaseRuntimeTest . antlrOnString ( tmpdir , "Java" , "Level_0_1.g4" , false ) ; "<AssertPlaceHolder>" ; long endTime = java . lang . System . nanoTime ( ) ; System . out . format ( "_1.g4" 1 , ( ( endTime - startTime ) / 1000000.0 ) ) ; } isEmpty ( ) { return attrs . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( equeue . errors . isEmpty ( ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . social . kernel . model . SocialActivity missingSocialActivity = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingSocialActivity )
getLargeClobFromResultSet ( ) { au . com . bytecode . opencsv . MockResultSet resultSet = new au . com . bytecode . opencsv . MockResultSet ( ) ; au . com . bytecode . opencsv . MockResultSetMetaData metaData = new au . com . bytecode . opencsv . MockResultSetMetaData ( ) ; java . lang . String clobString = buildClobString ( ( ( ResultSetHelperService . CLOBBUFFERSIZE ) + 1 ) ) ; java . lang . String [ ] expectedNames = new java . lang . String [ ] { "Clob" , "Null" } ; java . lang . String [ ] realValues = new java . lang . String [ ] { clobString , null } ; java . lang . String [ ] expectedValues = new java . lang . String [ ] { clobString , "" } ; int [ ] expectedTypes = new int [ ] { Types . CLOB , Types . CLOB } ; metaData . setColumnNames ( expectedNames ) ; metaData . setColumnTypes ( expectedTypes ) ; resultSet . setMetaData ( metaData ) ; resultSet . setColumnValues ( realValues ) ; au . com . bytecode . opencsv . ResultSetHelperService service = new au . com . bytecode . opencsv . ResultSetHelperService ( ) ; java . lang . String [ ] columnValues = service . getColumnValues ( resultSet ) ; "<AssertPlaceHolder>" ; } getColumnValues ( java . sql . ResultSet ) { return columnValues ; }
org . junit . Assert . assertArrayEquals ( expectedValues , columnValues )
testNumberOfItems ( ) { int numberOfItems = com . liferay . talend . runtime . apio . jsonld . ApioResourceCollectionTest . _apioJsonLDResource . getNumberOfItems ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( numberOfItems , org . hamcrest . CoreMatchers . equalTo ( 10 ) )
testGetCipherNameAsString_withDelimiters ( ) { java . lang . String input = "DESede/CBC/NoPadding" ; java . lang . String expected = "DESede" ; java . lang . String received = de . persosim . simulator . crypto . CryptoUtil . getCipherNameAsString ( input ) ; "<AssertPlaceHolder>" ; } getCipherNameAsString ( java . lang . String ) { int index = cAlgNMP . indexOf ( de . persosim . simulator . crypto . CryptoUtil . CIPHER_DELIMITER ) ; if ( index < 0 ) { return cAlgNMP ; } else { return cAlgNMP . substring ( 0 , index ) ; } }
org . junit . Assert . assertEquals ( expected , received )
should_map_Byte_to_Byte ( ) { com . github . erchu . beancp . commons . NumberConvertersTest . Source sourceInstance = new com . github . erchu . beancp . commons . NumberConvertersTest . Source ( ) ; sourceInstance . setByteWrapperValue ( ( ( byte ) ( 8 ) ) ) ; com . github . erchu . beancp . Mapper mapper = new com . github . erchu . beancp . MapperBuilder ( ) . addConverter ( com . github . erchu . beancp . commons . NumberConverters . get ( ) ) . addMap ( com . github . erchu . beancp . commons . NumberConvertersTest . Source . class , com . github . erchu . beancp . commons . NumberConvertersTest . Destination . class , ( config , source , destination ) -> config . mapInner ( source :: getByteWrapperValue , destination :: setByteWrapperValue , . class ) ) . buildMapper ( ) ; com . github . erchu . beancp . commons . NumberConvertersTest . Destination result = mapper . map ( sourceInstance , com . github . erchu . beancp . commons . NumberConvertersTest . Destination . class ) ; "<AssertPlaceHolder>" ; } map ( S , java . lang . Class ) { org . apache . commons . lang3 . Validate . notNull ( source , "source" ) ; org . apache . commons . lang3 . Validate . notNull ( destinationClass , "destinationClass" ) ; java . util . Optional < D > result = mapIfMapperAvailable ( source , destinationClass ) ; if ( ( result . isPresent ( ) ) == false ) { throw new com . github . erchu . beancp . MappingException ( java . lang . String . format ( "No<sp>suitable<sp>converter<sp>or<sp>map<sp>found<sp>to<sp>map<sp>from<sp>%s<sp>to<sp>%s." , source . getClass ( ) , destinationClass ) ) ; } else { return result . get ( ) ; } }
org . junit . Assert . assertEquals ( ( ( byte ) ( 8 ) ) , ( ( byte ) ( result . getByteWrapperValue ( ) ) ) )
testSetAndGetMarketplaceId ( ) { java . lang . String idToSet = "POIUZGTRFD" ; bean . setMarketplaceId ( idToSet ) ; "<AssertPlaceHolder>" ; } getMarketplaceId ( ) { return org . oscm . ui . beans . RegistrationBeanTest . MARKETPLACE_ID ; }
org . junit . Assert . assertEquals ( idToSet , bean . getMarketplaceId ( ) )
shouldNotBeEqualWithDifferentType ( ) { org . eclipse . egit . core . synchronize . GitCommitsModelCache . Change change = new org . eclipse . egit . core . synchronize . GitCommitsModelCache . Change ( ) ; boolean result = change . equals ( new java . lang . Object ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . eclipse . egit . ui . CommitMessageWithCaretPosition other = ( ( org . eclipse . egit . ui . CommitMessageWithCaretPosition ) ( obj ) ) ; return ( ( caretPosition ) == ( other . caretPosition ) ) && ( java . util . Objects . equals ( message , other . message ) ) ; }
org . junit . Assert . assertFalse ( result )
testPushEnrichment ( ) { java . io . File configFile = new java . io . File ( enrichmentsDir , "myenrichment.json" ) ; org . apache . metron . integration . utils . TestUtils . write ( configFile , org . apache . metron . common . cli . ConfigurationManagerIntegrationTest . someEnrichmentConfig ) ; pushConfigs ( org . apache . metron . common . cli . ENRICHMENT , configDir , java . util . Optional . of ( "myenrichment" ) ) ; byte [ ] expected = JSONUtils . INSTANCE . toJSONPretty ( org . apache . metron . common . cli . ConfigurationManagerIntegrationTest . someEnrichmentConfig ) ; byte [ ] actual = JSONUtils . INSTANCE . toJSONPretty ( stripLines ( dumpConfigs ( org . apache . metron . common . cli . ENRICHMENT , java . util . Optional . of ( "myenrichment" ) ) , 1 ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String ) { if ( option . hasArg ( ) ) { return new org . apache . metron . maas . service . AbstractMap . SimpleEntry < > ( this , value ) ; } return new org . apache . metron . maas . service . AbstractMap . SimpleEntry < > ( this , null ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . equalTo ( expected ) )
testHelp ( ) { java . lang . String cl = "systemml<sp>-help" ; java . lang . String [ ] args = cl . split ( "<sp>" ) ; org . apache . sysml . conf . DMLOptions o = org . apache . sysml . conf . DMLOptions . parseCLArguments ( args ) ; "<AssertPlaceHolder>" ; } parseCLArguments ( java . lang . String [ ] ) { org . apache . commons . cli . Options options = org . apache . sysml . conf . DMLOptions . createCLIOptions ( ) ; org . apache . commons . cli . CommandLineParser clParser = new org . apache . commons . cli . PosixParser ( ) ; org . apache . commons . cli . CommandLine line = clParser . parse ( options , args ) ; org . apache . sysml . conf . DMLOptions dmlOptions = new org . apache . sysml . conf . DMLOptions ( options ) ; dmlOptions . help = line . hasOption ( "$2" 9 ) ; dmlOptions . scriptType = ( line . hasOption ( "args" 4 ) ) ? org . apache . sysml . api . mlcontext . ScriptType . PYDML : org . apache . sysml . api . mlcontext . ScriptType . DML ; dmlOptions . debug = line . hasOption ( "args" 1 ) ; dmlOptions . gpu = line . hasOption ( "$2" 1 ) ; if ( dmlOptions . gpu ) { java . lang . String force = line . getOptionValue ( "$2" 1 ) ; if ( force != null ) { if ( force . equalsIgnoreCase ( ",<sp>" 0 ) ) { dmlOptions . forceGPU = true ; } else { throw new org . apache . commons . cli . ParseException ( "$2" 3 ) ; } } } if ( line . hasOption ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 6 ) ) { java . lang . String execMode = line . getOptionValue ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 6 ) ; if ( execMode != null ) { if ( execMode . equalsIgnoreCase ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 1 ) ) dmlOptions . execMode = org . apache . sysml . api . DMLScript . RUNTIME_PLATFORM . HADOOP ; else if ( execMode . equalsIgnoreCase ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 7 ) ) dmlOptions . execMode = org . apache . sysml . api . DMLScript . RUNTIME_PLATFORM . SINGLE_NODE ; else if ( execMode . equalsIgnoreCase ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 9 ) ) dmlOptions . execMode = org . apache . sysml . api . DMLScript . RUNTIME_PLATFORM . HYBRID ; else if ( execMode . equalsIgnoreCase ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 2 ) ) dmlOptions . execMode = org . apache . sysml . api . DMLScript . RUNTIME_PLATFORM . HYBRID_SPARK ; else if ( execMode . equalsIgnoreCase ( "args" 2 ) ) dmlOptions . execMode = org . apache . sysml . api . DMLScript . RUNTIME_PLATFORM . SPARK ; else throw new org . apache . commons . cli . ParseException ( "$2" 8 ) ; } } if ( line . hasOption ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 4 ) ) { dmlOptions . explainType = org . apache . sysml . utils . Explain . ExplainType . RUNTIME ; java . lang . String explainType = line . getOptionValue ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 4 ) ; if ( explainType != null ) { if ( explainType . equalsIgnoreCase ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 5 ) ) dmlOptions . explainType = org . apache . sysml . utils . Explain . ExplainType . HOPS ; else if ( explainType . equalsIgnoreCase ( "args" 3 ) ) dmlOptions . explainType = org . apache . sysml . utils . Explain . ExplainType . RUNTIME ; else if ( explainType . equalsIgnoreCase ( "recompile_hops" ) ) dmlOptions . explainType = org . apache . sysml . utils . Explain . ExplainType . RECOMPILE_HOPS ; else if ( explainType . equalsIgnoreCase ( "$2" 2 ) ) dmlOptions . explainType = org . apache . sysml . utils . Explain . ExplainType . RECOMPILE_RUNTIME ; else throw new org . apache . commons . cli . ParseException ( "Invalid<sp>argument<sp>specified<sp>for<sp>-hops<sp>option,<sp>must<sp>be<sp>one<sp>of<sp>[hops,<sp>runtime,<sp>recompile_hops,<sp>recompile_runtime]" ) ; } } dmlOptions . stats = line . hasOption ( "stats" ) ; if ( dmlOptions . stats ) { java . lang . String statsCount = line . getOptionValue ( "stats" ) ; if ( statsCount != null ) { try { dmlOptions . statsCount = java . lang . Integer . parseInt ( statsCount ) ; } catch ( java . lang . NumberFormatException e ) { throw new org . apache . commons . cli . ParseException ( "args" 6 ) ; } } } dmlOptions . memStats = line . hasOption ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 3 ) ; dmlOptions . clean = line . hasOption ( "$2" 5 ) ; if ( line . hasOption ( "$2" 0 ) ) { dmlOptions . configFile = line . getOptionValue ( "$2" 0 ) ; } if ( line . hasOption ( "f" ) ) { dmlOptions . filePath = line . getOptionValue ( "f" ) ; } if ( line . hasOption ( "args" 9 ) ) { dmlOptions . script = line . getOptionValue ( "args" 9 ) ; } if ( line . hasOption ( "args" ) ) { java . lang . String [ ] argValues = line . getOptionValues ( "args" ) ; for ( int k = 0 ; k < ( argValues . length ) ; k ++ ) { java . lang . String str = argValues [ k ] ; if ( ! ( str . isEmpty ( ) ) ) { dmlOptions . argVals . put ( ( "<sp>+<sp>(kv[0]))<sp>+<sp>" 0 + ( k + 1 ) ) , str ) ; } } } } } } return dmlOptions ; }
org . junit . Assert . assertEquals ( true , o . help )
shouldReturnTheOnlyNode ( ) { try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { database . createNode ( ) ; tx . success ( ) ; } try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { org . neo4j . graphdb . Node node = new com . graphaware . runtime . walk . RandomNodeSelector ( ) . selectNode ( database ) ; "<AssertPlaceHolder>" ; tx . success ( ) ; } } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 0 , node . getId ( ) )
getAndSetAttribute ( ) { io . joynr . proxy . ProxyBuilder < joynr . tests . testProxy > proxyBuilder = consumerRuntime . getProxyBuilder ( domain , joynr . tests . testProxy . class ) ; joynr . tests . testProxy proxy = proxyBuilder . setMessagingQos ( messagingQos ) . setDiscoveryQos ( discoveryQos ) . build ( ) ; int value = 1234 ; proxy . setReadWriteAttribute ( value ) ; int actual = proxy . getReadWriteAttribute ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return build ( new io . joynr . proxy . ProxyCreatedCallback < T > ( ) { @ io . joynr . proxy . Override public void onProxyCreationFinished ( T result ) { io . joynr . proxy . ProxyBuilderDefaultImpl . logger . trace ( "proxy<sp>created:<sp>interface:<sp>{}<sp>domains:<sp>{}" , interfaceName , domains ) ; } @ io . joynr . proxy . Override public void onProxyCreationError ( io . joynr . exceptions . JoynrRuntimeException error ) { io . joynr . proxy . ProxyBuilderDefaultImpl . logger . error ( "error<sp>creating<sp>proxy:<sp>interface:<sp>{}<sp>domains:<sp>{},<sp>error:<sp>{}" , interfaceName , domains , error . getMessage ( ) ) ; } } ) ; }
org . junit . Assert . assertEquals ( value , actual )
testResizeLun ( ) { com . iwave . ext . netapp . Lun lun = new com . iwave . ext . netapp . Lun ( com . iwave . ext . netapp . LunTest . server , com . iwave . ext . netapp . LunTest . LUN_PATH ) ; long newSize = lun . resizeLun ( com . iwave . ext . netapp . LunTest . NEW_LUN_SIZE , false ) ; "<AssertPlaceHolder>" ; } resizeLun ( long , boolean ) { netapp . manage . NaElement elem = new netapp . manage . NaElement ( "lun-resize" ) ; elem . addNewChild ( "force" , java . lang . Boolean . toString ( force ) ) ; elem . addNewChild ( "path" , path ) ; elem . addNewChild ( "size" , java . lang . Long . toString ( size ) ) ; netapp . manage . NaElement result = null ; try { result = server . invokeElem ( elem ) ; return result . getChildLongValue ( "actual-size" , ( - 1 ) ) ; } catch ( java . lang . Exception e ) { java . lang . String msg = "Failed<sp>to<sp>resize<sp>LUN<sp>path=" + ( path ) ; log . error ( msg , e ) ; throw new com . iwave . ext . netapp . NetAppException ( msg , e ) ; } }
org . junit . Assert . assertEquals ( com . iwave . ext . netapp . LunTest . NEW_LUN_SIZE , newSize )
testCreateNodeSkin_badSkinClass ( ) { de . tesis . dynaware . grapheditor . core . skins . SkinFactoryTest . NODE . setType ( de . tesis . dynaware . grapheditor . core . skins . SkinFactoryTest . NODE_TYPE ) ; skinFactory . setNodeSkin ( de . tesis . dynaware . grapheditor . core . skins . SkinFactoryTest . NODE_TYPE , de . tesis . dynaware . grapheditor . GNodeSkin . class ) ; "<AssertPlaceHolder>" ; } createNodeSkin ( de . tesis . dynaware . grapheditor . model . GNode ) { if ( node == null ) { return null ; } else if ( ( node . getType ( ) ) == null ) { return new de . tesis . dynaware . grapheditor . core . skins . defaults . DefaultNodeSkin ( node ) ; } final java . lang . Class < ? extends de . tesis . dynaware . grapheditor . GNodeSkin > skinClass = nodeSkins . get ( node . getType ( ) ) ; if ( skinClass == null ) { return new de . tesis . dynaware . grapheditor . core . skins . defaults . DefaultNodeSkin ( node ) ; } else { try { final java . lang . reflect . Constructor < ? extends de . tesis . dynaware . grapheditor . GNodeSkin > constructor = skinClass . getConstructor ( de . tesis . dynaware . grapheditor . model . GNode . class ) ; return constructor . newInstance ( node ) ; } catch ( final java . lang . ReflectiveOperationException e ) { de . tesis . dynaware . grapheditor . core . skins . SkinFactory . LOGGER . error ( LogMessages . CANNOT_INSTANTIATE_SKIN , skinClass . getName ( ) ) ; return new de . tesis . dynaware . grapheditor . core . skins . defaults . DefaultNodeSkin ( node ) ; } } }
org . junit . Assert . assertTrue ( ( ( skinFactory . createNodeSkin ( de . tesis . dynaware . grapheditor . core . skins . SkinFactoryTest . NODE ) ) instanceof de . tesis . dynaware . grapheditor . core . skins . defaults . DefaultNodeSkin ) )
sb07_ResponseHeader_onPojo_nocode ( ) { org . apache . juneau . rest . annotation . HeaderInfo x = org . apache . juneau . rest . annotation . ResponseHeaderAnnotationTest . sb . getResponseInfo ( "/sb07" , "get" , 200 ) . getHeader ( "H" ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return mb . getString ( "description" ) ; }
org . junit . Assert . assertEquals ( "a" , x . getDescription ( ) )
testFillToNullCommit ( ) { setup ( 3 ) ; list . fillTo ( null , 1 ) ; "<AssertPlaceHolder>" ; } get ( org . eclipse . jgit . lib . AnyObjectId ) { final int msk = mask ; int i = ( toFind . w1 ) & msk ; final V [ ] tbl = table ; V obj ; while ( ( obj = tbl [ i ] ) != null ) { if ( org . eclipse . jgit . lib . AnyObjectId . equals ( obj , toFind ) ) return obj ; i = ( i + 1 ) & msk ; } return null ; }
org . junit . Assert . assertNull ( list . get ( 0 ) )
refine_IgnoreElementsTest ( ) { java . lang . String acpString = "C0C1O2O3<sp>0:1(1),0:3(1),1:2(1),2:3(1)" ; org . openscience . cdk . interfaces . IAtomContainer ac = org . openscience . cdk . group . AtomContainerPrinter . fromString ( acpString , org . openscience . cdk . group . AtomDiscretePartitionRefinerTest . builder ) ; boolean ignoreElements = true ; boolean ignoreBondOrder = false ; org . openscience . cdk . group . AtomDiscretePartitionRefiner refiner = new org . openscience . cdk . group . AtomDiscretePartitionRefiner ( ignoreElements , ignoreBondOrder ) ; refiner . refine ( ac ) ; org . openscience . cdk . group . PermutationGroup autG = refiner . getAutomorphismGroup ( ) ; "<AssertPlaceHolder>" ; } order ( ) { java . util . Collections . sort ( cells , new java . util . Comparator < java . util . SortedSet < java . lang . Integer > > ( ) { @ org . openscience . cdk . group . Override public int compare ( java . util . SortedSet < java . lang . Integer > cellA , java . util . SortedSet < java . lang . Integer > cellB ) { return cellA . first ( ) . compareTo ( cellB . first ( ) ) ; } } ) ; }
org . junit . Assert . assertEquals ( 8 , autG . order ( ) )
testTruncDecimalValueNegative3 ( ) { java . lang . String sqlText = "values<sp>truncate(12345.6789,<sp>-3)" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "------------\n" + "12000.0000<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testLoadClass ( ) { java . io . File file = new java . io . File ( "src/test/resources/plugin.war" ) ; if ( ! ( file . exists ( ) ) ) { throw new java . lang . Exception ( ( "Failed<sp>to<sp>find<sp>test<sp>WAR:<sp>plugin.war<sp>at:<sp>" + ( file . getAbsolutePath ( ) ) ) ) ; } io . apiman . common . plugin . PluginClassLoader classloader = new io . apiman . common . plugin . PluginClassLoaderTest . TestPluginClassLoader ( file ) ; java . lang . Class < ? > class1 = classloader . loadClass ( "io.apiman.quickstarts.plugin.PluginMain" ) ; java . lang . reflect . Method mainMethod = class1 . getMethod ( "main" , new java . lang . String [ 0 ] . getClass ( ) ) ; mainMethod . invoke ( null , new java . lang . Object [ 1 ] ) ; try { classloader . loadClass ( "io.apiman.notfound.MyClass" ) ; org . junit . Assert . fail ( "Should<sp>have<sp>gotten<sp>a<sp>classnotfound<sp>here!" ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( "io.apiman.notfound.MyClass" , e . getMessage ( ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . asset . kernel . model . AssetCategory missingAssetCategory = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingAssetCategory )
testCreateSettingsPanel ( ) { System . out . println ( "createSettingsPanel" ) ; kg . apc . jmeter . vizualizers . PageDataExtractorOverTimeGui instance = new kg . apc . jmeter . vizualizers . PageDataExtractorOverTimeGui ( ) ; kg . apc . jmeter . vizualizers . JSettingsPanel result = instance . createSettingsPanel ( ) ; "<AssertPlaceHolder>" ; } createSettingsPanel ( ) { return new kg . apc . jmeter . vizualizers . JSettingsPanel ( this , ( ( ( ( ( ( ( JSettingsPanel . TIMELINE_OPTION ) | ( JSettingsPanel . GRADIENT_OPTION ) ) | ( JSettingsPanel . FINAL_ZEROING_OPTION ) ) | ( JSettingsPanel . LIMIT_POINT_OPTION ) ) | ( JSettingsPanel . MAXY_OPTION ) ) | ( JSettingsPanel . RELATIVE_TIME_OPTION ) ) | ( JSettingsPanel . MARKERS_OPTION ) ) ) ; }
org . junit . Assert . assertNotNull ( result )
testRegisterCustomerForSupplierWithEmptyDefaultPayments ( ) { addPaymentTypesToOrganizationRef ( supplierIds . get ( 0 ) , OrganizationRoleType . SUPPLIER ) ; container . login ( java . lang . String . valueOf ( supplier1User . getKey ( ) ) , org . oscm . accountservice . bean . ROLE_SERVICE_MANAGER ) ; org . oscm . internal . vo . VOOrganization org = new org . oscm . internal . vo . VOOrganization ( ) ; org . setLocale ( Locale . ENGLISH . toString ( ) ) ; org . setDomicileCountry ( Locale . GERMANY . getCountry ( ) ) ; org . oscm . internal . vo . VOUserDetails user = new org . oscm . internal . vo . VOUserDetails ( ) ; user . setEMail ( org . oscm . accountservice . bean . TEST_MAIL_ADDRESS ) ; user . setLocale ( org . getLocale ( ) ) ; user . setUserId ( "initialUser" ) ; final org . oscm . internal . vo . VOOrganization customer = accountMgmt . registerKnownCustomer ( org , user , null , marketplaceId ) ; java . lang . String customerUserKey = getUserKeyForOrg ( customer ) ; java . lang . Long [ ] productKeys = prepareProducts ( ServiceStatus . ACTIVE ) ; container . login ( customerUserKey , org . oscm . accountservice . bean . ROLE_ORGANIZATION_ADMIN ) ; java . util . Set < org . oscm . internal . vo . VOPaymentType > expected = java . util . Collections . emptySet ( ) ; java . util . Set < org . oscm . internal . vo . VOPaymentType > actual = accountMgmt . getAvailablePaymentTypesFromOrganization ( productKeys [ 0 ] ) ; "<AssertPlaceHolder>" ; } getAvailablePaymentTypesFromOrganization ( java . lang . Long ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetPkTableName ( ) { classUnderTest . setPkTableName ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getPkTableName ( ) { return _pkTableName ; }
org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getPkTableName ( ) )
testVById ( ) { final com . syncleus . ferma . Person person = fg . traverse ( ( input ) -> input . V ( p1 . < java . lang . Long > getId ( ) ) ) . next ( com . syncleus . ferma . Person . class ) ; "<AssertPlaceHolder>" ; } next ( java . lang . Class ) { final E nextObject = baseTraversal . next ( ) ; return this . parentGraph . frameElement ( ( ( org . apache . tinkerpop . gremlin . structure . Element ) ( nextObject ) ) , kind ) ; }
org . junit . Assert . assertEquals ( p1 , person )
applySerialSuffix_SimpleSuffixProperty ( ) { final java . util . Properties props = new java . util . Properties ( ) ; final java . lang . String s = "foo" ; props . setProperty ( VersioningState . INCREMENT_SERIAL_SUFFIX_SYSPROP . getCurrent ( ) , s ) ; setupSession ( props ) ; final java . lang . String originalVersion = "1.0.0.Final" ; final java . lang . String calcdVersion = "1.0.0.Final-foo-1" ; final java . lang . String result = calculate ( originalVersion ) ; "<AssertPlaceHolder>" ; } calculate ( java . lang . String ) { return modder . calculate ( org . commonjava . maven . ext . core . impl . VersioningCalculatorTest . GROUP_ID , org . commonjava . maven . ext . core . impl . VersioningCalculatorTest . ARTIFACT_ID , version , session ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . equalTo ( calcdVersion ) )
testClampWithIntegerValueMinGreaterThanMax ( ) { "<AssertPlaceHolder>" ; } clamp ( int , int , int ) { if ( min > max ) { return au . gov . ga . worldwind . common . util . Util . clamp ( value , max , min ) ; } return java . lang . Math . max ( min , java . lang . Math . min ( max , value ) ) ; }
org . junit . Assert . assertEquals ( 9 , au . gov . ga . worldwind . common . util . Util . clamp ( 7 , 10 , 9 ) )
testHasEffectWithArguments ( ) { edu . illinois . library . cantaloupe . image . Dimension fullSize = new edu . illinois . library . cantaloupe . image . Dimension ( 600 , 400 ) ; edu . illinois . library . cantaloupe . operation . OperationList opList = new edu . illinois . library . cantaloupe . operation . OperationList ( ) ; "<AssertPlaceHolder>" ; } hasEffect ( edu . illinois . library . cantaloupe . image . Dimension , edu . illinois . library . cantaloupe . operation . OperationList ) { return hasEffect ( ) ; }
org . junit . Assert . assertTrue ( instance . hasEffect ( fullSize , opList ) )
entityWithStreamMetadataMinimal ( ) { final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . entityContainer . getEntitySet ( "ESWithStream" ) ; final org . apache . olingo . commons . api . data . EntityCollection collection = data . readAll ( edmEntitySet ) ; java . io . InputStream result = serializer . entityCollection ( org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . metadata , edmEntitySet . getEntityType ( ) , collection , org . apache . olingo . server . api . serializer . EntityCollectionSerializerOptions . with ( ) . contextURL ( org . apache . olingo . commons . api . data . ContextURL . with ( ) . entitySet ( edmEntitySet ) . build ( ) ) . build ( ) ) . getContent ( ) ; final java . lang . String resultString = org . apache . commons . io . IOUtils . toString ( result ) ; final java . lang . String expectedResult = "{\"@odata.context\":\"$metadata#ESWithStream\"," + ( ( ( "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\"," + "\"value\":[{\"PropertyInt16\":32767}," ) + "{\"PropertyInt16\":7,\"PropertyStream@odata.mediaEtag\":\"eTag\"," ) + "\"PropertyStream@odata.mediaContentType\":\"image/jpeg\"}]}" ) ; "<AssertPlaceHolder>" ; } toString ( boolean ) { return getSegmentValue ( includeFilters ) ; }
org . junit . Assert . assertEquals ( expectedResult , resultString )
testMbr ( ) { com . github . davidmoten . rtree . geometry . Circle circle = com . github . davidmoten . rtree . geometry . Geometries . circle ( 1 , 2 , 3 ) ; com . github . davidmoten . rtree . geometry . Rectangle r = com . github . davidmoten . rtree . geometry . Geometries . rectangle ( ( - 2 ) , ( - 1 ) , 4 , 5 ) ; "<AssertPlaceHolder>" ; } mbr ( ) { return this ; }
org . junit . Assert . assertEquals ( r , circle . mbr ( ) )
extractTypeFromLoraUplinkMessage ( ) { final io . vertx . core . json . JsonObject loraMessage = org . eclipse . hono . adapter . lora . providers . LoraTestUtil . loadTestFile ( "everynet.uplink" ) ; final org . eclipse . hono . adapter . lora . LoraMessageType type = this . providerPost . extractMessageType ( loraMessage ) ; "<AssertPlaceHolder>" ; } extractMessageType ( io . vertx . core . json . JsonObject ) { final java . lang . String type = loraMessage . getString ( org . eclipse . hono . adapter . lora . providers . ObjeniousProvider . FIELD_TYPE , LoraConstants . EMPTY ) ; switch ( type ) { case "join" : return org . eclipse . hono . adapter . lora . LoraMessageType . JOIN ; case "uplink" : return org . eclipse . hono . adapter . lora . LoraMessageType . UPLINK ; case "downlink" : return org . eclipse . hono . adapter . lora . LoraMessageType . DOWNLINK ; default : return org . eclipse . hono . adapter . lora . LoraMessageType . UNKNOWN ; } }
org . junit . Assert . assertEquals ( LoraMessageType . UPLINK , type )
testSeg ( ) { org . apdplat . word . segmentation . Segmentation segmentation = new org . apdplat . word . segmentation . impl . MinimumMatching ( ) ; java . util . List < java . lang . String > text = new java . util . ArrayList ( ) ; text . add ( "" ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 1 ) ; text . add ( "" 4 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 7 ) ; text . add ( "" ) ; text . add ( "" 5 ) ; text . add ( "" 3 ) ; text . add ( "" ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 5 ) ; text . add ( "" 7 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 8 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 1 ) ; text . add ( "" 3 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 5 ) ; text . add ( "" 8 ) ; text . add ( "" 1 ) ; text . add ( "" 3 ) ; text . add ( "" 0 ) ; text . add ( "" 8 ) ; text . add ( "" 2 ) ; text . add ( "" 2 ) ; text . add ( "" 0 ) ; text . add ( "" 2 ) ; text . add ( "" 4 ) ; text . add ( "" 6 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 0 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 8 ) ; text . add ( "" 8 ) ; text . add ( "" ) ; text . add ( "" ) ; text . add ( "" 7 ) ; text . add ( "" 4 ) ; text . add ( "" 3 ) ; text . add ( "" 0 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 3 ) ; text . add ( "" 6 ) ; text . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 6 ) ; text . add ( "" ) ; java . util . List < java . lang . String > expResult = new java . util . ArrayList ( ) ; expResult . add ( "" 9 ) ; expResult . add ( "" 0 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 9 ) ; expResult . add ( "" 4 ) ; expResult . add ( "" 5 ) ; expResult . add ( "" 1 ) ; expResult . add ( "" 5 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 0 ) ; expResult . add ( "" 3 ) ; expResult . add ( "" 7 ) ; expResult . add ( "" 5 ) ; expResult . add ( "" 1 ) ; expResult . add ( "" 1 ) ; expResult . add ( "" 1 ) ; expResult . add ( "" 6 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 4 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 2 ) ; expResult . add ( "" 7 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 9 ) ; expResult . add ( "" 9 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 7 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 2 ) ; expResult . add ( "" 6 ) ; expResult . add ( "" 5 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 4 ) ; expResult . add ( "" 2 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>]" ) ; expResult . add ( "" 9 ) ; expResult . add ( "" 8 ) ; expResult . add ( "" 2 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" ) ; expResult . add ( "" 9 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 6 ) ; expResult . add ( "" 6 ) ; expResult . add ( "" 4 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" 3 ) ; expResult . add ( "[,<sp>,<sp>,<sp>,<sp>,<sp>,<sp>]" ) ; expResult . add ( "" 0 ) ; for ( int i = 0 ; i < ( text . size ( ) ) ; i ++ ) { java . util . List < org . apdplat . word . segmentation . Word > result = segmentation . seg ( text . get ( i ) ) ; for ( org . apdplat . word . segmentation . Word word : result ) { word . setPartOfSpeech ( null ) ; } "<AssertPlaceHolder>" ; } } get ( java . lang . String ) { java . lang . String value = org . apdplat . word . util . WordConfTools . conf . get ( key ) ; if ( org . apdplat . word . util . WordConfTools . LOGGER . isDebugEnabled ( ) ) { org . apdplat . word . util . WordConfTools . LOGGER . debug ( ( ( ( "" + key ) + "=" ) + value ) ) ; } return value ; }
org . junit . Assert . assertEquals ( expResult . get ( i ) . toString ( ) , result . toString ( ) )
deveGerarComRecibo ( ) { final com . fincatto . documentofiscal . nfe400 . classes . lote . consulta . NFLoteConsulta consulta = new com . fincatto . documentofiscal . nfe400 . classes . lote . consulta . NFLoteConsulta ( ) ; consulta . setRecibo ( "ItbDxsHiXUqeCEM" ) ; "<AssertPlaceHolder>" ; } getRecibo ( ) { return this . recibo ; }
org . junit . Assert . assertEquals ( "ItbDxsHiXUqeCEM" , consulta . getRecibo ( ) )
testMethane ( ) { org . openscience . cdk . interfaces . IAtomContainer methane = org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . interfaces . IAtom carbon = methane . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , Elements . CARBON ) ; carbon . setImplicitHydrogenCount ( 4 ) ; methane . addAtom ( carbon ) ; org . openscience . cdk . smiles . smarts . SMARTSQueryTool sqt = new org . openscience . cdk . smiles . smarts . SMARTSQueryTool ( "CC" , org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; boolean matches = sqt . matches ( methane ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertFalse ( matches )
testEvents_BothTypesAreEvents ( ) { org . kie . workbench . common . widgets . client . datamodel . AsyncPackageDataModelOracle oracle = new org . kie . workbench . common . widgets . client . datamodel . AsyncPackageDataModelOracleImpl ( serviceCaller , validatorInstance ) ; oracle . setPackageName ( "org.test" ) ; oracle . addModelFields ( new java . util . HashMap < java . lang . String , org . kie . soup . project . datamodel . oracle . ModelField [ ] > ( ) { { put ( "org.test.Event1" , new org . kie . soup . project . datamodel . oracle . ModelField [ ] { modelField ( "this" , "org.test.Event1" ) } ) ; put ( "org.test.Event2" , new org . kie . soup . project . datamodel . oracle . ModelField [ ] { modelField ( "this" , "org.test.Event2" ) } ) ; } } ) ; oracle . addEventTypes ( new java . util . HashMap < java . lang . String , java . lang . Boolean > ( ) { { put ( "org.test.Event1" , true ) ; put ( "org.test.Event2" , true ) ; } } ) ; oracle . filter ( ) ; org . drools . workbench . models . datamodel . rule . FactPattern pattern1 = new org . drools . workbench . models . datamodel . rule . FactPattern ( ) ; pattern1 . setFactType ( "Event1" ) ; pattern1 . setBoundName ( "$e" ) ; org . drools . workbench . models . datamodel . rule . SingleFieldConstraint constraint = new org . drools . workbench . models . datamodel . rule . SingleFieldConstraint ( ) ; constraint . setFactType ( "Event1" ) ; constraint . setFieldName ( "this" ) ; constraint . setFieldType ( "Event1" ) ; constraint . setOperator ( org . kie . soup . project . datamodel . oracle . OperatorsOracle . SIMPLE_CEP_OPERATORS [ 0 ] ) ; pattern1 . addConstraint ( constraint ) ; model . addLhsItem ( pattern1 ) ; org . drools . workbench . screens . guided . rule . client . editor . util . ConstraintValueEditorHelper helper = new org . drools . workbench . screens . guided . rule . client . editor . util . ConstraintValueEditorHelper ( model , oracle , "Event2" , "this" , constraint , "Event2" , new org . kie . soup . project . datamodel . oracle . DropDownData ( ) ) ; helper . isApplicableBindingsInScope ( "$e" , new org . uberfire . client . callbacks . Callback < java . lang . Boolean > ( ) { @ org . drools . workbench . screens . guided . rule . client . editor . Override public void callback ( java . lang . Boolean result ) { "<AssertPlaceHolder>" ; } } ) ; } callback ( org . kie . soup . project . datamodel . oracle . ModelField [ ] ) { for ( org . kie . soup . project . datamodel . oracle . ModelField field : fields ) { final java . lang . String fieldName = field . getName ( ) ; if ( ! ( definitionList . isFieldNameInUse ( fieldName ) ) ) { factFieldSelector . addField ( fieldName ) ; } } }
org . junit . Assert . assertTrue ( result )
testLinkToConstructorHoverQualifiedOnType ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "package<sp>testpackage" ) ; _builder . newLine ( ) ; _builder . append ( "/**" ) ; _builder . newLine ( ) ; _builder . append ( "<sp>" ) ; _builder . append ( "*<sp>see<sp>{@link<sp>Foo#Foo(int)}" ) ; _builder . newLine ( ) ; _builder . append ( "<sp>" ) ; _builder . append ( "*/" ) ; _builder . newLine ( ) ; _builder . append ( "<sp>" 0 ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "new(int<sp>n){}" ) ; _builder . newLine ( ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; final org . eclipse . xtend . core . xtend . XtendFile xtendFile = this . parseHelper . parse ( _builder , this . getResourceSet ( ) ) ; final org . eclipse . xtend . core . xtend . XtendClass clazz = org . eclipse . xtext . xbase . lib . IterableExtensions . < org . eclipse . xtend . core . xtend . XtendClass > head ( com . google . common . collect . Iterables . < org . eclipse . xtend . core . xtend . XtendClass > filter ( xtendFile . getXtendTypes ( ) , org . eclipse . xtend . core . xtend . XtendClass . class ) ) ; final java . lang . String docu = this . documentationProvider . getDocumentation ( clazz ) ; org . eclipse . xtend2 . lib . StringConcatenation _builder_1 = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder_1 . append ( "see<sp><code><a<sp>href=\"eclipse-xtext-doc:__synthetic0.xtend%23/1/@members.0\">Foo#Foo(int)</a></code>" ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( _e ) ; } } toString ( ) { org . eclipse . xtext . xbase . lib . util . ToStringBuilder b = new org . eclipse . xtext . xbase . lib . util . ToStringBuilder ( this ) ; b . add ( "title" , this . title ) ; b . add ( "year" , this . year ) ; b . add ( "rating" , this . rating ) ; b . add ( "numberOfVotes" , this . numberOfVotes ) ; b . add ( "categories" , this . categories ) ; return b . toString ( ) ; }
org . junit . Assert . assertEquals ( _builder_1 . toString ( ) , docu )
testJohann ( ) { com . ning . atlas . space . SpaceQuery sq = new com . ning . atlas . space . QueryParser ( ) . parse ( "/*/<t\\w+>.*:name" ) ; java . util . Set < java . lang . String > rs = sq . query ( space ) ; java . util . Set < java . lang . String > expected = com . google . common . collect . ImmutableSet . of ( "Brian" , "Sam" , "Kate" ) ; "<AssertPlaceHolder>" ; } query ( com . ning . atlas . spi . space . Space ) { java . util . Set < java . lang . String > rs = com . google . common . collect . Sets . newLinkedHashSet ( ) ; OUTER : for ( com . ning . atlas . spi . Identity identity : space . findAllIdentities ( ) ) { java . util . Iterator < java . lang . String > parts = com . google . common . base . Splitter . on ( '/' ) . split ( identity . toExternalForm ( ) ) . iterator ( ) ; parts . next ( ) ; java . util . Iterator < com . google . common . base . Predicate < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > > test_itty = tests . iterator ( ) ; while ( ( parts . hasNext ( ) ) && ( test_itty . hasNext ( ) ) ) { java . lang . String part_together = parts . next ( ) ; com . google . common . base . Predicate < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > test = test_itty . next ( ) ; java . util . Iterator < java . lang . String > pitty = com . google . common . base . Splitter . on ( '.' ) . split ( part_together ) . iterator ( ) ; org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > part = org . apache . commons . lang3 . tuple . Pair . of ( pitty . next ( ) , pitty . next ( ) ) ; if ( ! ( test . apply ( part ) ) ) { continue OUTER ; } } if ( ( ! ( parts . hasNext ( ) ) ) && ( ! ( test_itty . hasNext ( ) ) ) ) { com . ning . atlas . spi . Maybe < java . lang . String > maybe = space . get ( identity , key ) ; if ( maybe . isKnown ( ) ) { rs . add ( maybe . getValue ( ) ) ; } } } return rs ; }
org . junit . Assert . assertThat ( rs , org . hamcrest . CoreMatchers . equalTo ( expected ) )
testGlobalEdgeUniqueConstraintSetProperty ( ) { "<AssertPlaceHolder>" ; com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition < java . lang . String > definition = new com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition ( com . puresoltechnologies . ductiledb . core . graph . ElementType . EDGE , "property" , java . lang . String . class , UniqueConstraint . GLOBAL ) ; com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . schemaManager . defineProperty ( definition ) ; java . util . Map < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) ; properties . put ( "property" , "value" ) ; try { com . puresoltechnologies . ductiledb . core . graph . DuctileDBVertex vertex1 = com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . graph . addVertex ( ) ; com . puresoltechnologies . ductiledb . core . graph . DuctileDBVertex vertex2 = com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . graph . addVertex ( ) ; com . puresoltechnologies . ductiledb . core . graph . DuctileDBVertex vertex3 = com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . graph . addVertex ( ) ; vertex1 . addEdge ( "type1" , vertex2 , properties ) ; vertex2 . addEdge ( "type2" , vertex3 , new java . util . HashMap ( ) ) . setProperty ( "property" , "value" ) ; } finally { com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . graph . rollback ( ) ; } } getPropertyDefinition ( com . puresoltechnologies . ductiledb . core . graph . ElementType , java . lang . String ) { try { com . puresoltechnologies . ductiledb . bigtable . BigTable table = namespace . getTable ( DatabaseTable . PROPERTY_DEFINITIONS . getName ( ) ) ; com . puresoltechnologies . ductiledb . bigtable . Get get = new com . puresoltechnologies . ductiledb . bigtable . Get ( com . puresoltechnologies . ductiledb . logstore . Key . of ( propertyKey ) ) ; com . puresoltechnologies . ductiledb . logstore . Key columnFamily = null ; switch ( elementType ) { case VERTEX : columnFamily = DatabaseColumnFamily . VERTEX_DEFINITION . getKey ( ) ; break ; case EDGE : columnFamily = DatabaseColumnFamily . EDGE_DEFINITION . getKey ( ) ; break ; default : throw new com . puresoltechnologies . ductiledb . core . graph . manager . DuctileDBSchemaManagerException ( ( ( "Cannot<sp>read<sp>property<sp>for<sp>element<sp>'" + elementType ) + "'." ) ) ; } get . addFamily ( columnFamily ) ; com . puresoltechnologies . ductiledb . bigtable . Result result = table . get ( get ) ; if ( result == null ) { return null ; } java . util . NavigableMap < com . puresoltechnologies . ductiledb . logstore . Key , com . puresoltechnologies . ductiledb . columnfamily . ColumnValue > familyMap = result . getFamilyMap ( columnFamily ) ; if ( familyMap == null ) { return null ; } @ com . puresoltechnologies . ductiledb . core . graph . schema . SuppressWarnings ( "unchecked" ) java . lang . Class < T > type = ( ( java . lang . Class < T > ) ( java . lang . Class . forName ( familyMap . get ( GraphSchema . PROPERTY_TYPE_KEY ) . toString ( ) ) ) ) ; com . puresoltechnologies . ductiledb . core . graph . schema . UniqueConstraint unique = com . puresoltechnologies . ductiledb . core . graph . schema . UniqueConstraint . valueOf ( familyMap . get ( GraphSchema . UNIQUENESS_COLUMN_KEY ) . toString ( ) ) ; com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition < T > definition = new com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition ( elementType , propertyKey , type , unique ) ; return definition ; } catch ( java . lang . ClassNotFoundException e ) { throw new com . puresoltechnologies . ductiledb . core . graph . manager . DuctileDBSchemaManagerException ( "Could<sp>not<sp>read<sp>property<sp>names." , e ) ; } catch ( com . puresoltechnologies . ductiledb . storage . api . StorageException e ) { throw new com . puresoltechnologies . ductiledb . core . graph . manager . DuctileDBGraphManagerException ( "Could<sp>not<sp>read<sp>property<sp>definition." , e ) ; } }
org . junit . Assert . assertNull ( com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . schemaManager . getPropertyDefinition ( ElementType . EDGE , "property" ) )
testWaitForEmptyAnswer ( ) { mockAbstractStep . setConsoleReader ( mockConsoleReader ( "\n" ) ) ; mockAbstractStep . setDefaultAnswer ( org . meridor . perspective . shell . interactive . wizard . AbstractStepTest . DEFAULT_ANSWER ) ; java . lang . String answer = mockAbstractStep . waitForAnswer ( ) ; "<AssertPlaceHolder>" ; } waitForAnswer ( ) { try { jline . console . ConsoleReader consoleReader = getConsoleReader ( ) ; java . lang . String answer = consoleReader . readLine ( ) ; java . util . Optional < java . lang . String > defaultAnswer = getDefaultAnswer ( ) ; return ( answer . isEmpty ( ) ) && ( defaultAnswer . isPresent ( ) ) ? defaultAnswer . get ( ) : answer ; } catch ( java . lang . Exception e ) { logger . error ( java . lang . String . format ( "Error<sp>while<sp>getting<sp>input:<sp>%s" , e . getMessage ( ) ) ) ; return "" ; } }
org . junit . Assert . assertThat ( answer , org . hamcrest . Matchers . equalTo ( org . meridor . perspective . shell . interactive . wizard . AbstractStepTest . DEFAULT_ANSWER ) )
decode_empty ( ) { "<AssertPlaceHolder>" ; } decode ( java . lang . String ) { if ( ( tokens == null ) || ( ( tokens . length ( ) ) == 0 ) ) { return emptyList ( ) ; } java . nio . ByteBuffer buffer = java . nio . ByteBuffer . wrap ( java . util . Base64 . getDecoder ( ) . decode ( tokens ) ) ; com . google . common . collect . ImmutableList . Builder < org . eclipse . lsp4j . util . SemanticHighlightingTokens . Token > builder = com . google . common . collect . ImmutableList . builder ( ) ; while ( buffer . hasRemaining ( ) ) { int character = buffer . getInt ( ) ; int lengthAndScope = buffer . getInt ( ) ; int length = lengthAndScope > > > ( org . eclipse . lsp4j . util . SemanticHighlightingTokens . LENGTH_SHIFT ) ; int scope = lengthAndScope & ( org . eclipse . lsp4j . util . SemanticHighlightingTokens . SCOPES_MASK ) ; builder . add ( new org . eclipse . lsp4j . util . SemanticHighlightingTokens . Token ( character , length , scope ) ) ; } return builder . build ( ) ; }
org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , decode ( "" ) )
testDateToString_null ( ) { "<AssertPlaceHolder>" ; } dateToString ( org . joda . time . ReadablePartial ) { if ( readablePartial == null ) { return null ; } return net . ripe . db . whois . common . FormatHelper . DATE_FORMAT . print ( readablePartial ) ; }
org . junit . Assert . assertNull ( net . ripe . db . whois . common . FormatHelper . dateToString ( null ) )
equalsTo ( ) { java . util . List < java . lang . Object > list = new java . util . ArrayList < java . lang . Object > ( ) ; java . lang . Object value = new java . lang . Object ( ) ; java . util . Set < java . lang . Object > set = new java . util . HashSet < java . lang . Object > ( ) ; set . add ( value ) ; doReturn ( set ) . when ( map ) . get ( value ) ; rangeIndex . equalsTo ( value , list ) ; "<AssertPlaceHolder>" ; } contains ( K ) { return ( get ( key ) ) != null ; }
org . junit . Assert . assertTrue ( list . contains ( value ) )
testCombineListItemsToPreferenceString ( ) { "<AssertPlaceHolder>" ; } combineListItemsToPreferenceString ( java . lang . String [ ] ) { java . lang . StringBuffer buffer = new java . lang . StringBuffer ( ) ; if ( listItems != null ) { for ( int i = 0 ; i < ( listItems . length ) ; i ++ ) { buffer . append ( listItems [ i ] ) ; if ( i < ( listItems . length ) ) { buffer . append ( ch . netcetera . eclipse . common . squasher . PreferenceListSquasher . SEPARATOR ) ; } } } return buffer . toString ( ) ; }
org . junit . Assert . assertEquals ( this . expected , ch . netcetera . eclipse . common . squasher . PreferenceListSquasher . combineListItemsToPreferenceString ( this . listItems ) )
testEqualsObject ( ) { boolean result = target . equals ( target ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
p2lineupWithP2Advice ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
quadBond ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getBondExpr ( "*$*" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . ALIPHATIC_ORDER , 4 ) ; "<AssertPlaceHolder>" ; } expr ( org . openscience . cdk . isomorphism . matchers . Expr$Type , int ) { return new org . openscience . cdk . isomorphism . matchers . Expr ( type , val ) ; }
org . junit . Assert . assertThat ( expected , org . hamcrest . CoreMatchers . is ( actual ) )
notifyPrivateMessageArrivedWhenGuiAndPrivateChatOutOfFocusShouldUpdateAndBeep ( ) { when ( kouChatFrame . isVisible ( ) ) . thenReturn ( true ) ; when ( kouChatFrame . isFocused ( ) ) . thenReturn ( false ) ; when ( privchat . isVisible ( ) ) . thenReturn ( true ) ; when ( privchat . isFocused ( ) ) . thenReturn ( false ) ; mediator . notifyPrivateMessageArrived ( user , null ) ; verify ( privchat ) . updateUserInformation ( ) ; verify ( beeper ) . beep ( ) ; verifyZeroInteractions ( sysTray ) ; "<AssertPlaceHolder>" ; } isNewMsg ( ) { return newMsg ; }
org . junit . Assert . assertFalse ( me . isNewMsg ( ) )
testReadAllWithLargeSize ( ) { for ( int i = 10 ; i <= 10000 ; i *= 10 ) { byte [ ] input = randomBytes ( i ) ; byte [ ] output = edu . umd . cs . findbugs . io . IO . readAll ( new java . io . ByteArrayInputStream ( input ) , ( i + 29 ) ) ; "<AssertPlaceHolder>" ; } } readAll ( java . io . InputStream , int ) { try { if ( size == 0 ) { throw new java . lang . IllegalArgumentException ( ) ; } byte [ ] result = new byte [ size ] ; int pos = 0 ; while ( true ) { int sz ; while ( ( sz = in . read ( result , pos , ( size - pos ) ) ) > 0 ) { pos += sz ; } if ( pos < size ) { return edu . umd . cs . findbugs . io . IO . copyOf ( result , pos ) ; } int nextByte = in . read ( ) ; if ( nextByte == ( - 1 ) ) { return result ; } size = ( size * 2 ) + 500 ; result = edu . umd . cs . findbugs . io . IO . copyOf ( result , size ) ; result [ ( pos ++ ) ] = ( ( byte ) ( nextByte ) ) ; } } finally { edu . umd . cs . findbugs . io . IO . close ( in ) ; } }
org . junit . Assert . assertArrayEquals ( input , output )
toStringValues ( ) { ezvcard . property . RawProperty property = new ezvcard . property . RawProperty ( "name" , "value" ) ; "<AssertPlaceHolder>" ; } toStringValues ( ) { ezvcard . property . Related property = new ezvcard . property . Related ( uri ) ; org . junit . Assert . assertFalse ( property . toStringValues ( ) . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( property . toStringValues ( ) . isEmpty ( ) )
onMockFactoryProvided ( ) { final ro . isdc . wro . model . factory . WroModelFactory mockFactory = org . mockito . Mockito . mock ( ro . isdc . wro . model . factory . WroModelFactory . class ) ; final java . util . List < ro . isdc . wro . model . factory . WroModelFactory > list = java . util . Arrays . asList ( mockFactory ) ; factory = new ro . isdc . wro . extensions . model . factory . SmartWroModelFactory ( ) . setFactoryList ( list ) ; injector . inject ( factory ) ; "<AssertPlaceHolder>" ; } create ( ) { return callback ; }
org . junit . Assert . assertNull ( factory . create ( ) )
test_issue10_deserialize ( ) { com . afollestad . ason . Ason ason = new com . afollestad . ason . Ason ( "{\"item\":<sp>[1,<sp>2,<sp>3,<sp>4]}" ) ; com . afollestad . ason . Issue10Example result = com . afollestad . ason . Ason . deserialize ( ason , com . afollestad . ason . Issue10Example . class ) ; java . lang . Object [ ] array = ( ( java . lang . Object [ ] ) ( result . item ) ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . String , java . lang . Class ) { return com . afollestad . ason . Ason . deserialize ( json , cls , false ) ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 } , array ) )
testSerialization ( ) { org . jfree . data . KeyToGroupMap m1 = new org . jfree . data . KeyToGroupMap ( "Test" ) ; org . jfree . data . KeyToGroupMap m2 = ( ( org . jfree . data . KeyToGroupMap ) ( org . jfree . chart . TestUtils . serialised ( m1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( m1 , m2 )
testTimestamp ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inhandler ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( WSSConstants . TIMESTAMP ) ; properties . setActions ( actions ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
testTypedLiteralComponent ( ) { startContainer ( org . apache . webbeans . test . component . TypeLiteralComponent . class ) ; javax . enterprise . util . TypeLiteral < org . apache . webbeans . test . component . ITypeLiteralComponent < java . util . List < java . lang . String > > > tl = new javax . enterprise . util . TypeLiteral < org . apache . webbeans . test . component . ITypeLiteralComponent < java . util . List < java . lang . String > > > ( ) { } ; java . lang . annotation . Annotation [ ] anns = new java . lang . annotation . Annotation [ 1 ] ; anns [ 0 ] = new javax . enterprise . util . AnnotationLiteral < javax . enterprise . inject . Default > ( ) { } ; javax . enterprise . inject . spi . Bean < ? > s = org . apache . webbeans . config . WebBeansContext . getInstance ( ) . getBeanManagerImpl ( ) . getBeans ( tl . getType ( ) , anns ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } next ( ) { return "next" ; }
org . junit . Assert . assertNotNull ( s )
testErToPE ( ) { java . util . List < org . biopax . paxtools . pattern . Match > list = org . biopax . paxtools . pattern . Searcher . search ( model . getByID ( "urn:miriam:uniprot:P04637" ) , new org . biopax . paxtools . pattern . Pattern ( org . biopax . paxtools . pattern . constraint . EntityReference . class , org . biopax . paxtools . pattern . constraint . ConBox . erToPE ( ) , "ER" , "PE" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( lastIndex ) + 1 ; }
org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 5 ) )
testLongValueNegative1 ( ) { byte [ ] aBytes = new byte [ ] { 12 , - 1 , 100 , - 2 , - 76 , - 128 , 45 , 91 , 3 } ; long result = - 43630045168837885L ; long aNumber = new java . math . BigInteger ( aBytes ) . longValue ( ) ; "<AssertPlaceHolder>" ; } longValue ( ) { return value ; }
org . junit . Assert . assertTrue ( ( aNumber == result ) )
testWriteBatchSuccess ( ) { com . streamsets . pipeline . stage . destination . pulsar . PulsarMessageProducer pulsarMessageProducer = org . mockito . Mockito . mock ( com . streamsets . pipeline . stage . destination . pulsar . PulsarMessageProducer . class ) ; org . mockito . Mockito . when ( pulsarMessageProducer . init ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( java . util . Collections . emptyList ( ) ) ; com . streamsets . pipeline . stage . destination . pulsar . PulsarMessageProducerFactory pulsarMessageProducerFactory = org . mockito . Mockito . mock ( com . streamsets . pipeline . stage . destination . pulsar . PulsarMessageProducerFactory . class ) ; org . mockito . Mockito . when ( pulsarMessageProducerFactory . create ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( pulsarMessageProducer ) ; com . streamsets . pipeline . stage . destination . pulsar . PulsarTarget pulsarTarget = new com . streamsets . pipeline . stage . destination . pulsar . PulsarTarget ( getTargetConfig ( ) , pulsarMessageProducerFactory ) ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = pulsarTarget . init ( ) ; "<AssertPlaceHolder>" ; try { com . streamsets . pipeline . api . Batch batch = com . streamsets . pipeline . stage . Utils . TestUtilsPulsar . getBatch ( ) ; pulsarTarget . write ( batch ) ; } catch ( com . streamsets . pipeline . api . StageException e ) { org . junit . Assert . fail ( ) ; } } isEmpty ( ) { return false ; }
org . junit . Assert . assertTrue ( issues . isEmpty ( ) )
testCompactionEmptyHFile ( ) { org . apache . hadoop . hbase . regionserver . ScanInfo oldScanInfo = store . getScanInfo ( ) ; org . apache . hadoop . hbase . regionserver . ScanInfo newScanInfo = oldScanInfo . customize ( oldScanInfo . getMaxVersions ( ) , 600 , oldScanInfo . getKeepDeletedCells ( ) ) ; store . setScanInfo ( newScanInfo ) ; java . util . List < org . apache . hadoop . hbase . regionserver . HStoreFile > candidates = sfCreate ( 0 ) ; for ( org . apache . hadoop . hbase . regionserver . HStoreFile file : candidates ) { if ( file instanceof org . apache . hadoop . hbase . regionserver . MockHStoreFile ) { org . apache . hadoop . hbase . regionserver . MockHStoreFile mockFile = ( ( org . apache . hadoop . hbase . regionserver . MockHStoreFile ) ( file ) ) ; mockFile . setTimeRangeTracker ( org . apache . hadoop . hbase . regionserver . TimeRangeTracker . create ( TimeRangeTracker . Type . SYNC , ( - 1 ) , ( - 1 ) ) ) ; mockFile . setEntries ( 0 ) ; } } org . apache . hadoop . hbase . regionserver . compactions . CompactionRequestImpl result = ( ( org . apache . hadoop . hbase . regionserver . compactions . RatioBasedCompactionPolicy ) ( store . storeEngine . getCompactionPolicy ( ) ) ) . selectCompaction ( candidates , new java . util . ArrayList ( ) , false , false , false ) ; "<AssertPlaceHolder>" ; store . setScanInfo ( oldScanInfo ) ; } getFiles ( ) { return java . util . Collections . unmodifiableCollection ( this . filesToCompact ) ; }
org . junit . Assert . assertTrue ( result . getFiles ( ) . isEmpty ( ) )
shouldPassFromGenericSpringValidator ( ) { org . springframework . springfaces . traveladvisor . integrationtest . page . validator . AbstractValidatorPageObject page = pages . get ( org . springframework . springfaces . traveladvisor . integrationtest . page . validator . GenericSpringBeanValidatorPage . class ) ; page . setInputText ( "10" ) ; page = page . clickSubmitButton ( ) ; "<AssertPlaceHolder>" ; } hasError ( ) { return ( getWebDriver ( ) . getPageSource ( ) . indexOf ( "ul" ) ) != ( - 1 ) ; }
org . junit . Assert . assertThat ( page . hasError ( ) , org . hamcrest . Matchers . is ( false ) )
testGetRows ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 , DataType . DOUBLE ) . reshape ( 3 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray testAssertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 5 , 8 } , new double [ ] { 6 , 9 } } ) ; org . nd4j . linalg . api . ndarray . INDArray test = arr . get ( new org . nd4j . linalg . indexing . SpecifiedIndex ( 1 , 2 ) , new org . nd4j . linalg . indexing . SpecifiedIndex ( 1 , 2 ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String , int , org . nd4j . autodiff . samediff . internal . AbstractSession$FrameIter ) { return get ( variable , frame , iteration , parentFrameIter , true ) ; }
org . junit . Assert . assertEquals ( testAssertion , test )
testGetBatchRequestResponse ( ) { org . apache . ambari . server . state . Clusters clustersMock = createMock ( org . apache . ambari . server . state . Clusters . class ) ; org . apache . ambari . server . state . Cluster clusterMock = createMock ( org . apache . ambari . server . state . Cluster . class ) ; org . apache . ambari . server . configuration . Configuration configurationMock = createNiceMock ( org . apache . ambari . server . configuration . Configuration . class ) ; org . apache . ambari . server . scheduler . ExecutionScheduler executionSchedulerMock = createMock ( org . apache . ambari . server . scheduler . ExecutionScheduler . class ) ; org . apache . ambari . server . security . authorization . internal . InternalTokenStorage tokenStorageMock = createMock ( org . apache . ambari . server . security . authorization . internal . InternalTokenStorage . class ) ; org . apache . ambari . server . actionmanager . ActionDBAccessor actionDBAccessorMock = createMock ( org . apache . ambari . server . actionmanager . ActionDBAccessor . class ) ; com . google . gson . Gson gson = new com . google . gson . Gson ( ) ; long requestId = 5L ; java . lang . String clusterName = "mycluster" ; java . lang . String apiUri = "api/v1/clusters/mycluster/requests/5" ; org . easymock . Capture < java . lang . String > uriCapture = org . easymock . EasyMock . newCapture ( ) ; org . apache . ambari . server . state . scheduler . BatchRequestResponse batchRequestResponse = new org . apache . ambari . server . state . scheduler . BatchRequestResponse ( ) ; batchRequestResponse . setStatus ( HostRoleStatus . IN_PROGRESS . toString ( ) ) ; batchRequestResponse . setRequestId ( requestId ) ; batchRequestResponse . setReturnCode ( 202 ) ; org . easymock . EasyMock . expect ( configurationMock . getApiSSLAuthentication ( ) ) . andReturn ( Boolean . FALSE ) ; org . easymock . EasyMock . replay ( configurationMock ) ; org . apache . ambari . server . scheduler . ExecutionScheduleManager scheduleManager = createMockBuilder ( org . apache . ambari . server . scheduler . ExecutionScheduleManager . class ) . withConstructor ( configurationMock , executionSchedulerMock , tokenStorageMock , clustersMock , actionDBAccessorMock , gson ) . addMockedMethods ( "performApiGetRequest" ) . createNiceMock ( ) ; expect ( scheduleManager . performApiGetRequest ( capture ( uriCapture ) , eq ( true ) ) ) . andReturn ( batchRequestResponse ) . once ( ) ; replay ( clusterMock , clustersMock , executionSchedulerMock , tokenStorageMock , scheduleManager ) ; scheduleManager . getBatchRequestResponse ( requestId , clusterName ) ; verify ( clusterMock , clustersMock , configurationMock , executionSchedulerMock , tokenStorageMock , scheduleManager ) ; "<AssertPlaceHolder>" ; } getValue ( ) { java . lang . Object o = ( ( delegate ) == null ) ? null : delegate . getValue ( ) ; return o == null ? null : o . toString ( ) ; }
org . junit . Assert . assertEquals ( apiUri , uriCapture . getValue ( ) )
canSerializeBytes ( ) { java . lang . String field = "{<sp>\"name\":\"bytes1\",<sp>\"type\":\"bytes\"<sp>}" ; java . nio . ByteBuffer bb = java . nio . ByteBuffer . wrap ( "easy<sp>as<sp>one<sp>two<sp>three" . getBytes ( ) ) ; bb . rewind ( ) ; org . apache . avro . generic . GenericRecord r = serializeAndDeserialize ( field , "bytes1" , bb ) ; "<AssertPlaceHolder>" ; } get ( int ) { return columnMappings . get ( i ) ; }
org . junit . Assert . assertEquals ( bb , r . get ( "bytes1" ) )
testWithCustomType ( ) { org . terracotta . connection . Connection connection = org . terracotta . connection . ConnectionFactory . connect ( java . net . URI . create ( ClusteredConcurrentMapPassthroughTest . CLUSTER_URI ) , new java . util . Properties ( ) ) ; org . terracotta . connection . entity . EntityRef < org . terracotta . entity . map . common . ConcurrentClusteredMap , java . lang . Object , java . lang . Object > entityRef = connection . getEntityRef ( org . terracotta . entity . map . common . ConcurrentClusteredMap . class , ConcurrentClusteredMap . VERSION , "person-map" ) ; entityRef . create ( null ) ; org . terracotta . entity . map . common . ConcurrentClusteredMap < java . lang . Long , ClusteredConcurrentMapPassthroughTest . Person > map = entityRef . fetchEntity ( null ) ; map . setTypes ( Long . class , ClusteredConcurrentMapPassthroughTest . Person . class ) ; map . put ( 33L , new ClusteredConcurrentMapPassthroughTest . Person ( "Iron<sp>Man" , 33 ) ) ; map . close ( ) ; connection = org . terracotta . connection . ConnectionFactory . connect ( java . net . URI . create ( ClusteredConcurrentMapPassthroughTest . CLUSTER_URI ) , new java . util . Properties ( ) ) ; entityRef = connection . getEntityRef ( org . terracotta . entity . map . common . ConcurrentClusteredMap . class , ConcurrentClusteredMap . VERSION , "person-map" ) ; map = entityRef . fetchEntity ( null ) ; map . setTypes ( Long . class , ClusteredConcurrentMapPassthroughTest . Person . class ) ; "<AssertPlaceHolder>" ; map . close ( ) ; } get ( java . lang . Object ) { if ( ! ( keyClass . isAssignableFrom ( key . getClass ( ) ) ) ) { return null ; } org . terracotta . entity . map . common . MapValueResponse response = ( ( org . terracotta . entity . map . common . MapValueResponse ) ( invokeWithReturn ( new org . terracotta . entity . map . common . GetOperation ( keyValueCodec . encode ( ( ( K ) ( key ) ) ) ) ) ) ) ; return valueValueCodec . decode ( response . getValue ( ) ) ; }
org . junit . Assert . assertThat ( map . get ( 33L ) . name , org . hamcrest . Matchers . is ( "Iron<sp>Man" ) )
testGetLoginTimeout ( ) { int timeout = 1000 ; when ( actualDataSource . getLoginTimeout ( ) ) . thenReturn ( timeout ) ; "<AssertPlaceHolder>" ; } getLoginTimeout ( ) { return 0 ; }
org . junit . Assert . assertEquals ( timeout , actualDataSource . getLoginTimeout ( ) )
simpleFunctionCallExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = FunctionCall ( "sort" , java . util . Arrays . asList ( Current ( ) ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "sort(@)" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
testNormalizerMinMaxScalerNotFitLabels ( ) { org . nd4j . linalg . dataset . NormalizerMinMaxScaler original = new org . nd4j . linalg . dataset . NormalizerMinMaxScaler ( 0.1 , 0.9 ) ; original . setFeatureStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.5 , 1.5 } ) . reshape ( 1 , ( - 1 ) ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2.5 , 3.5 } ) . reshape ( 1 , ( - 1 ) ) ) ; SUT . write ( original , tmpFile ) ; org . nd4j . linalg . dataset . NormalizerMinMaxScaler restored = SUT . restore ( tmpFile ) ; "<AssertPlaceHolder>" ; } restore ( org . nd4j . linalg . dataset . api . preprocessor . serializer . InputStream ) { org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream dis = new org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream ( stream ) ; boolean fitLabels = dis . readBoolean ( ) ; double targetMin = dis . readDouble ( ) ; double targetMax = dis . readDouble ( ) ; org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler result = new org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler ( targetMin , targetMax ) ; result . fitLabel ( fitLabels ) ; result . setFeatureStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; if ( fitLabels ) { result . setLabelStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; } return result ; }
org . junit . Assert . assertEquals ( original , restored )
testMaakentityConvertorScheidingsTeken ( ) { nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . ConverterContext ctx = createContext ( nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . IstStapelVoorkomenConverterTest . MINIMAAL ) ; converter . convertInhoudelijk ( ctx , IstStapelVoorkomenConverter . HEADER_SCHEIDINGSTEKEN , java . lang . Character . toString ( scheidingsteken ) ) ; converter . maakEntity ( ctx ) ; nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . StapelVoorkomen stapelVoorkomen = ctx . getStapel ( java . lang . Integer . parseInt ( volgnummer ) ) . getStapelvoorkomens ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getScheidingsteken ( ) { return scheidingsteken ; }
org . junit . Assert . assertEquals ( scheidingsteken , stapelVoorkomen . getScheidingsteken ( ) )
testDelete_Identifier ( ) { System . out . println ( "delete" ) ; com . pearson . docussandra . domain . objects . Database entity = com . pearson . docussandra . testhelper . Fixtures . createTestDatabase ( ) ; com . pearson . docussandra . domain . objects . Identifier identifier = entity . getId ( ) ; com . pearson . docussandra . persistence . impl . DatabaseRepositoryImplTest . f . insertDatabase ( entity ) ; com . pearson . docussandra . persistence . DatabaseRepository instance = new com . pearson . docussandra . persistence . impl . DatabaseRepositoryImpl ( com . pearson . docussandra . persistence . impl . DatabaseRepositoryImplTest . f . getSession ( ) ) ; instance . delete ( identifier ) ; java . util . List < com . pearson . docussandra . domain . objects . Database > allRows = instance . readAll ( ) ; "<AssertPlaceHolder>" ; } readAll ( ) { return databases . readAll ( ) ; }
org . junit . Assert . assertFalse ( allRows . contains ( entity ) )
testConvertFromAvroLogicalTimestampMillis ( ) { org . talend . components . common . config . jdbc . TalendType expectedType = TalendType . DATE ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _logicalTimestamp ( ) ; "<AssertPlaceHolder>" ; } convertFromAvro ( org . apache . avro . Schema ) { org . apache . avro . Schema type = org . talend . daikon . avro . AvroUtils . unwrapIfNullable ( avroType ) ; java . lang . String logicalType = org . talend . daikon . avro . LogicalTypeUtils . getLogicalTypeName ( type ) ; if ( logicalType != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByLogicalType ( logicalType ) ; } java . lang . String javaClass = type . getProp ( SchemaConstants . JAVA_CLASS_FLAG ) ; if ( javaClass != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByJavaClass ( javaClass ) ; } return org . talend . components . common . config . jdbc . TalendType . getTalendByAvroType ( type . getType ( ) ) ; }
org . junit . Assert . assertEquals ( expectedType , org . talend . components . common . config . jdbc . TalendType . convertFromAvro ( fieldSchema ) )
testBadDbid ( ) { final javax . validation . Validator validator = org . opennms . netmgt . xml . event . EventValidationTest . factory . getValidator ( ) ; final org . opennms . netmgt . xml . event . Event event = new org . opennms . netmgt . xml . event . Event ( ) ; event . setSource ( "tests" ) ; event . setTime ( new java . util . Date ( ) ) ; event . setDbid ( ( - 1 ) ) ; final java . util . Set < javax . validation . ConstraintViolation < org . opennms . netmgt . xml . event . Event > > errors = validator . validate ( event ) ; "<AssertPlaceHolder>" ; } size ( ) { m_lock . readLock ( ) . lock ( ) ; try { return m_managedAddresses . size ( ) ; } finally { m_lock . readLock ( ) . unlock ( ) ; } }
org . junit . Assert . assertEquals ( 1 , errors . size ( ) )
testGetSaveAndRenameServiceCaller ( ) { doReturn ( pluginServices ) . when ( presenter ) . getPluginServices ( ) ; "<AssertPlaceHolder>" ; } getSaveAndRenameServiceCaller ( ) { return getPluginServices ( ) ; }
org . junit . Assert . assertEquals ( pluginServices , presenter . getSaveAndRenameServiceCaller ( ) )
testSetCheckable_marksItemCached ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; org . eclipse . nebula . widgets . grid . GridItem item = new org . eclipse . nebula . widgets . grid . GridItem ( grid , org . eclipse . swt . SWT . NONE ) ; item . setCheckable ( 0 , false ) ; "<AssertPlaceHolder>" ; } isCached ( ) { return parent . isVirtual ( ) ? cached : true ; }
org . junit . Assert . assertTrue ( item . isCached ( ) )
testGroup ( ) { final org . apache . calcite . tools . PigRelBuilder builder = org . apache . calcite . tools . PigRelBuilder . create ( org . apache . calcite . test . PigRelBuilderTest . config ( ) . build ( ) ) ; final org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . group ( null , null , ( - 1 ) , builder . groupKey ( "DEPTNO" , "JOB" ) . alias ( "e" ) ) . build ( ) ; final java . lang . String plan = "" + ( ( "LogicalAggregate(group=[{2,<sp>7}],<sp>EMP=[COLLECT($8)])\n" + "<sp>LogicalProject(EMPNO=[$0],<sp>ENAME=[$1],<sp>JOB=[$2],<sp>MGR=[$3],<sp>HIREDATE=[$4],<sp>SAL=[$5],<sp>COMM=[$6],<sp>DEPTNO=[$7],<sp>$f8=[ROW($0,<sp>$1,<sp>$2,<sp>$3,<sp>$4,<sp>$5,<sp>$6,<sp>$7)])\n" ) + "<sp>LogicalTableScan(table=[[scott,<sp>EMP]])\n" ) ; "<AssertPlaceHolder>" ; } str ( java . lang . Object [ ] ) { return objects == null ? null : java . util . Arrays . stream ( objects ) . map ( Object :: toString ) . collect ( java . util . stream . Collectors . joining ( "\n" ) ) ; }
org . junit . Assert . assertThat ( str ( root ) , org . hamcrest . CoreMatchers . is ( plan ) )
testReadSubType ( ) { java . io . DataInputStream in = new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( new byte [ ] { - 128 , 1 , 2 , 3 , 4 } ) ) ; com . amazonaws . proprot . TlvSubTypeRaw subTypeTlv = subTypeAdapter . read ( new com . amazonaws . proprot . InputAssist ( in , false ) , 4 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 2 , 3 } , subTypeTlv . getValue ( ) )
testDatumEindeOpDatumAanvangGeldigheid ( ) { final int datumaanvang = 20010101 ; final nl . bzk . brp . bijhouding . bericht . model . RegistratieNationaliteitActieElement registratieActie = maakRegistratieNationaliteitActie ( "0001" , nl . bzk . brp . bijhouding . bericht . model . BeeindigingNationaliteitActieElementTest . REDEN_VERKRIJGING_ONBEKEND , datumaanvang ) ; final nl . bzk . brp . bijhouding . bericht . model . BeeindigingNationaliteitActieElement actie = maakBeeindigingNationaliteitActie ( registratieActie , datumaanvang , nl . bzk . brp . bijhouding . bericht . model . BeeindigingNationaliteitActieElementTest . REDEN_VERLIES ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = koppelActiesAanAhEnValideerBeeindigingActie ( registratieActie , actie ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
testMapSimpleComment ( ) { java . lang . String cs = "/**Y**/true" ; java . lang . Boolean b = org . nutz . json . Json . fromJson ( org . nutz . json . Boolean . class , org . nutz . lang . Lang . inr ( cs ) ) ; "<AssertPlaceHolder>" ; } inr ( java . lang . CharSequence ) { return new java . io . StringReader ( cs . toString ( ) ) ; }
org . junit . Assert . assertTrue ( b )
testQueueOnlyRequestListReservation ( ) { org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . rm . start ( ) ; setupCluster ( 100 ) ; org . apache . hadoop . yarn . api . records . ReservationId id1 = getReservationIdTestHelper ( 1 ) ; org . apache . hadoop . yarn . api . records . ReservationId id2 = getReservationIdTestHelper ( 2 ) ; reservationSubmissionTestHelper ( "reservation/submit" , MediaType . APPLICATION_JSON , org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . clock . getTime ( ) , "res_1" , id1 ) ; reservationSubmissionTestHelper ( "reservation/submit" , MediaType . APPLICATION_JSON , org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . clock . getTime ( ) , "res_2" , id2 ) ; com . sun . jersey . api . client . WebResource resource = constructWebResource ( org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . LIST_RESERVATION_PATH ) . queryParam ( "queue" , org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . DEFAULT_QUEUE ) ; org . codehaus . jettison . json . JSONObject json = testListReservationHelper ( resource ) ; if ( ( ! ( this . isAuthenticationEnabled ( ) ) ) && ( json == null ) ) { return ; } "<AssertPlaceHolder>" ; testRDLHelper ( json . getJSONArray ( "reservations" ) . getJSONObject ( 0 ) ) ; testRDLHelper ( json . getJSONArray ( "reservations" ) . getJSONObject ( 1 ) ) ; org . apache . hadoop . yarn . server . resourcemanager . webapp . TestRMWebServicesReservation . rm . stop ( ) ; } length ( ) { return ( endIdx ) - ( startIdx ) ; }
org . junit . Assert . assertEquals ( json . getJSONArray ( "reservations" ) . length ( ) , 2 )
testGetQueryEQFilters ( ) { filters . add ( org . nohope . cassandra . mapservice . cfilter . CFilters . eq ( org . nohope . cassandra . mapservice . Value . bound ( org . nohope . cassandra . mapservice . CFilterBuilderTest . INT_COL , 4 ) ) ) ; final java . util . List < org . nohope . cassandra . mapservice . cfilter . CFilter < ? > > builderFilters = org . nohope . cassandra . mapservice . CFilterBuilder . getQueryFilters ( ) . eq ( org . nohope . cassandra . mapservice . CFilterBuilderTest . INT_COL , 4 ) . getFilters ( ) ; "<AssertPlaceHolder>" ; } getFilters ( ) { return java . util . Collections . unmodifiableCollection ( filters ) ; }
org . junit . Assert . assertEquals ( filters , builderFilters )
test_empty_ok_value ( ) { org . milyn . javabean . decoders . LongDecoder decoder = new org . milyn . javabean . decoders . LongDecoder ( ) ; "<AssertPlaceHolder>" ; } decode ( java . lang . String ) { java . util . Date date = ( ( java . util . Date ) ( super . decode ( data ) ) ) ; return new java . sql . Time ( date . getTime ( ) ) ; }
org . junit . Assert . assertEquals ( new java . lang . Long ( 1 ) , decoder . decode ( "1" ) )
testThrowCheckedException ( ) { java . io . IOException expected = new java . io . IOException ( "EXPECTED<sp>ERROR" ) ; java . io . IOException actual = null ; try { org . slieb . throwables . ToIntFunctionWithThrowable . aToIntFunctionThatUnsafelyThrowsUnchecked ( ( v1 ) -> { throw expected ; } ) . applyAsInt ( null ) ; org . junit . Assert . fail ( "Exception<sp>should<sp>have<sp>been<sp>thrown" ) ; } catch ( java . io . IOException e ) { actual = e ; } "<AssertPlaceHolder>" ; } applyAsInt ( T ) { try { return applyAsIntWithThrowable ( v1 ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
testCreateTenantVDC ( ) { boolean response = com . cloud . network . cisco . CiscoVnmcConnectionTest . connection . createTenantVDC ( com . cloud . network . cisco . CiscoVnmcConnectionTest . tenantName ) ; "<AssertPlaceHolder>" ; } createTenantVDC ( java . lang . String ) { java . lang . String xml = com . cloud . network . cisco . CiscoVnmcConnectionImpl . VnmcXml . CREATE_VDC . getXml ( ) ; java . lang . String service = com . cloud . network . cisco . CiscoVnmcConnectionImpl . VnmcXml . CREATE_VDC . getService ( ) ; xml = replaceXmlValue ( xml , "cookie" , _cookie ) ; xml = replaceXmlValue ( xml , "descr" , ( "VDC<sp>for<sp>Tenant<sp>" + tenantName ) ) ; xml = replaceXmlValue ( xml , "name" , getNameForTenantVDC ( tenantName ) ) ; xml = replaceXmlValue ( xml , "dn" , getDnForTenantVDC ( tenantName ) ) ; java . lang . String response = sendRequest ( service , xml ) ; return verifySuccess ( response ) ; }
org . junit . Assert . assertTrue ( response )
queryHeliportByGmlIdentifier ( ) { org . deegree . filter . expression . ValueReference propName = new org . deegree . filter . expression . ValueReference ( org . deegree . feature . persistence . sql . SQLFeatureStoreAIXMTest . GML_IDENTIFIER ) ; org . deegree . filter . expression . Literal literal = new org . deegree . filter . expression . Literal ( "1b54b2d6-a5ff-4e57-94c2-f4047a381c64" ) ; org . deegree . filter . comparison . PropertyIsEqualTo oper = new org . deegree . filter . comparison . PropertyIsEqualTo ( propName , literal , false , null ) ; org . deegree . filter . Filter filter = new org . deegree . filter . OperatorFilter ( oper ) ; org . deegree . feature . persistence . query . Query query = new org . deegree . feature . persistence . query . Query ( org . deegree . feature . persistence . sql . SQLFeatureStoreAIXMTest . HELIPORT_NAME , filter , ( - 1 ) , ( - 1 ) , ( - 1 ) ) ; org . deegree . feature . FeatureCollection fc = fs . query ( query ) . toCollection ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return fragment . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , fc . size ( ) )
getCategory ( ) { model . addLandingpageData ( landingpageData ( newServiceList ( "s1" ) , newCategories ( "cat1" ) ) ) ; org . oscm . internal . vo . VOCategory cat = model . getCategory ( 0 ) ; "<AssertPlaceHolder>" ; } getCategoryId ( ) { return category . getCategoryId ( ) ; }
org . junit . Assert . assertEquals ( cat . getCategoryId ( ) , "cat1" )
testCantRemove ( ) { java . util . Iterator < java . lang . Integer > iter = new org . synchronoss . cloud . nio . multipart . util . collect . AbstractIterator < java . lang . Integer > ( ) { boolean haveBeenCalled ; @ org . synchronoss . cloud . nio . multipart . util . collect . Override public org . synchronoss . cloud . nio . multipart . util . collect . Integer computeNext ( ) { if ( haveBeenCalled ) { endOfData ( ) ; } haveBeenCalled = true ; return 0 ; } } ; "<AssertPlaceHolder>" ; try { iter . remove ( ) ; org . junit . Assert . fail ( "No<sp>exception<sp>thrown" ) ; } catch ( java . lang . UnsupportedOperationException expected ) { } } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new java . util . NoSuchElementException ( ) ; } return array [ ( ( i ) ++ ) ] ; }
org . junit . Assert . assertEquals ( 0 , ( ( int ) ( iter . next ( ) ) ) )
testFindPluginNamesNoAdvanced ( ) { org . codehaus . jackson . map . ObjectMapper mapper = new org . codehaus . jackson . map . ObjectMapper ( ) ; org . codehaus . jackson . JsonNode design = mapper . readTree ( "{<sp>\"pizza\"<sp>:<sp>{<sp>}<sp>}" ) ; com . github . couchapptakeout . App app2 = new com . github . couchapptakeout . App ( "App<sp>Name" , "choose.iriscouch.com" , "choose" , 81 , null ) ; java . util . List < java . lang . String > results = app2 . findPluginNamess ( design ) ; "<AssertPlaceHolder>" ; } findPluginNamess ( org . codehaus . jackson . JsonNode ) { java . util . List < java . lang . String > plugins = new java . util . ArrayList < java . lang . String > ( ) ; try { for ( org . codehaus . jackson . JsonNode plugin : design . get ( "advanced" ) . get ( "plugins" ) ) { plugins . add ( plugin . getTextValue ( ) ) ; } } catch ( java . lang . Exception e ) { } try { java . lang . String appClass = design . get ( "advanced" ) . get ( "appClass" ) . getTextValue ( ) ; plugins . add ( appClass ) ; } catch ( java . lang . Exception e ) { } return plugins ; }
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
applyGlob ( ) { setup ( "n*e" ) ; org . apache . hadoop . fs . shell . PathData item = new org . apache . hadoop . fs . shell . PathData ( "/directory/path/name" , mockFs . getConf ( ) ) ; "<AssertPlaceHolder>" ; } apply ( org . apache . hadoop . fs . shell . PathData , int ) { java . lang . String name = getPath ( item ) . getName ( ) ; if ( ! ( caseSensitive ) ) { name = org . apache . hadoop . util . StringUtils . toLowerCase ( name ) ; } if ( globPattern . matches ( name ) ) { return Result . PASS ; } else { return Result . FAIL ; } }
org . junit . Assert . assertEquals ( Result . PASS , name . apply ( item , ( - 1 ) ) )
testDatumVoozienEindeNaDatumAanvang ( ) { final nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . VerblijfsrechtParameters params = new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . VerblijfsrechtParameters ( ) ; params . aanduidingCode ( "0" ) ; params . datumAanvang ( 20160101 ) ; params . datumMededeling ( 20160101 ) ; params . datumVoorzienEinde ( 20170101 ) ; final nl . bzk . brp . bijhouding . bericht . model . VerblijfsrechtElement element = builder . maakVerblijfsrechtElement ( "comm_id" , params ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = element . valideerInhoud ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )