### Question:
PartitionSettings { public void updateSchema( PartitionSchema schema ) { if ( schema != null && schema.getName() != null ) { stepMeta.getStepPartitioningMeta().setPartitionSchema( schema ); } } PartitionSettings( int exactSize, TransMeta transMeta, StepMeta stepMeta,
                            PartitionSchemasProvider schemasProvider ); void fillOptionsAndCodesByPlugins( List<PluginInterface> plugins ); int getDefaultSelectedMethodIndex(); int getDefaultSelectedSchemaIndex(); String getMethodByMethodDescription( String methodDescription ); String[] getOptions(); String[] getCodes(); List<String> getSchemaNames(); String[] getSchemaNamesArray(); List<PartitionSchema> getSchemas(); StepMeta getStepMeta(); void updateMethodType( int methodType ); void updateMethod( String method ); void updateSchema( PartitionSchema schema ); void rollback( StepMeta before ); StepMeta getBefore(); StepMeta getAfter(); TransMeta getTransMeta();  }### Answer:
@Test public void metaIsUpdated() { PartitionSchema schema = new PartitionSchema( "1", Collections.<String>emptyList() ); StepPartitioningMeta meta = mock( StepPartitioningMeta.class ); when( stepMeta.getStepPartitioningMeta() ).thenReturn( meta ); settings.updateSchema( schema ); verify( meta ).setPartitionSchema( schema ); }
@Test public void metaIsNotUpdatedWithNull() { StepPartitioningMeta meta = mock( StepPartitioningMeta.class ); when( stepMeta.getStepPartitioningMeta() ).thenReturn( meta ); settings.updateSchema( null ); verify( meta, never() ).setPartitionSchema( any( PartitionSchema.class ) ); }
@Test public void metaIsNotUpdatedWithNameless() { PartitionSchema schema = new PartitionSchema( null, Collections.<String>emptyList() ); StepPartitioningMeta meta = mock( StepPartitioningMeta.class ); when( stepMeta.getStepPartitioningMeta() ).thenReturn( meta ); settings.updateSchema( null ); verify( meta, never() ).setPartitionSchema( any( PartitionSchema.class ) ); }